"Authentication failed" (401 / 403) with a key I think is correct.

Last updated: August 6, 2026

401 means the key is missing or invalid. Check whether the valid FRIENDLI_API_KEY is provided.

403 means that the API key is valid but does not have permission to access the requested endpoint, or that the associated plan or payment is not active. To identify the cause, capture the exact HTTP status code and error message, and note which endpoint you are calling. Verify the API key in Friendli Suite or generate a new one. Also make sure that the key’s default team matches the team that owns the endpoint, the correct team you want to send an API request.

By default, API requests are sent under the API key’s default team. To send request to an endpoint at different team, include the X-Friendli-Team header in your request with the appropriate team ID.

For example,

curl --location 'https://api.friendli.ai/dedicated/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer FRIENDLI_API_KEY' \
--header 'X-Friendli-Team: YOUR_TEAM_ID' \
--data '{
    "model": "YOUR_ENDPOINT_ID",
    "input": "Hello"
}