Authentication
Creating an API Key (Dashboard)
- Go to Account Settings → API Tokens
- Click Generate New Token
- Provide a name for your key
- Copy the token — it will only be shown once
Using Your API Key
Include your key in the Authorization header with every request:
curl https://api.puq.ai/v1/chat/completions \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
Use the Token prefix:
Authorization: Token <api_key>
API Key Lifecycle
- API keys do not expire as long as their status is active (
status=1). - Keys can be created, listed, and deleted via the dashboard.