How to access Inference API using connected developer app

I have set up a connected developer app, and my website successfully authenticates via HF login auth flow. I can get some access tokens through the openID api auth flow, but none of these are HF_TOKEN (it appears) for the inference api.

I have enabled inference-api in the permissions of the connected application in HF (Hugging Face – The AI community building the future.).

Since the inference-api setting exists in the connected application permissions, I assume HF intends to allow users to access the HF inference api on other services and be charged for them, but maybe this is not the case?

How do I get the authenticated HF users’ HF_TOKEN to use from my web app, with the inference API?

Thanks for any help!

1 Like