API Documentation
Quick integration guide and complete API reference
Authentication
Fastest 3-step setup
01
Open the console
After signing in, open the console and go to the API Token management page.
02
Create and copy a key
Generate a new API key, then copy and save it immediately for later requests.
03
Put it in the header
Paste the copied key into the Authorization header using the exact format Bearer sk-xxxx.
Request example
Minimal working request example
curl https://your-domain.example/v1/chat/completions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Things to keep in mind
- There must be one space between Bearer and the API key.
- A 401 usually means the API key is missing, invalid, or expired.
- If you have not created an API key yet, open API Token to create and manage one.
