Authentication
All API requests to KiosAPI require an API key passed in the HTTP header. The exact header you use depends on which endpoint format you’re calling.
API Key
Your KiosAPI API key starts with sk- and looks like:
Treat your API key as a secret — do not expose it in client-side code, public repositories, or logs.
Use this when calling the OpenAI-compatible endpoints (/v1/chat/completions, /v1/responses):
This is the most common format. All OpenAI SDK libraries send the key automatically when you set api_key.
Use this when calling the Claude-native endpoint (/v1/messages):
When using the Claude native endpoint, the anthropic-version header is mandatory. Omitting it will cause a 400 Bad Request error.
Use this when calling the Gemini-native endpoint (/v1beta/models/{model}:generateContent):
Getting Your API Key
You can obtain and manage your API key from the KiosAPI dashboard:
- Log in to kiosapi.com.
- Navigate to Dashboard > Token Management.
- Create a new token or copy an existing one.
Your API key carries full access to your KiosAPI account. Never share it publicly, commit it to version control, or embed it in client-side applications. Use environment variables or a secrets manager to load it at runtime.
Don’t Mix Up Your Base URL and Key
KiosAPI keys are not interchangeable with keys from OpenAI, Anthropic, or Google. Make sure you:
- Use a KiosAPI key (
sk-kioo-...) for requests to kiosapi.com.
- Do not send your KiosAPI key to
api.openai.com, api.anthropic.com, or googleapis.com — it will be rejected.
- Do not send an OpenAI/Anthropic/Google key to
kiosapi.com — it will also be rejected.
Mixing up the base URL and key is the most common cause of 401 Unauthorized errors.