Problems obtaining a Bearer API_TOKEN
Getting started states:Get your API tokenin your Hugging Face profile.You should see a tokenapi_XXXXXXXXorapi_org_XXXXXXX.However, /huggingface.co/settings/token only provides READ and WRITE tokens. Using them produces{“error”:“Authorization header is invalid, use ‘Bearer API_TOKEN’”}And the CURL examples state:“Authorization: Bearer ${HF_API_TOKEN}”which is what the READ and WRITE tokens start with unlike the api… tokens mentioned in the getting started.Could this be because I’m current signed up for the free plan. But it states “Try Inference API: CPUUp to 30k input characters /month”
2022-02-14T09:14:08Z
Hello!How are you sending your request viacurl?It should look something like this (for the GPT2 endpoint):$ curl -X POST "https://api-inference.huggingface.co/models/gpt2" \
       --header "Authorization: Bearer <YOUR READ API TOKEN HERE>" \
       -d '{"inputs": "Hi, my name is "}'

[{"generated_text":"Hi, my name is ive only a few hours away from this game and I have just finished buying a pack of 8 and am not in one of your queue anymore. I have been playing with 2-3 players and am a huge die roll"}]
2022-02-14T09:20:20Z
Hi. Thanks.That’s pretty much what I did:curlhttps://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-ru-en\-X POST \

    -d '{"inputs": "Меня зовут Вольфганг и я живу в Берлине"}' \

    -H "Authorization: Bearer ${REDACTED_TOKEN...w}"Should my API key start with api_ as thegetting started pagesuggests?
2022-02-14T09:23:28Z
I can tell you my read API key certainly doesn’t start withapi_.
2022-02-16T16:43:58Z
ToonTalk:-H "Authorization: Bearer ${REDACTED_TOKEN...w}"Should have been-H “Authorization: Bearer REDACTED_TOKEN…w”Sorry for the trouble.But perhaps the documentation about the api_… key should be updated