Docs
Quota developer quickstart
Use Quota through a standard OpenAI-compatible API, issue your own API keys, and choose the route that fits the task.
Quickstart
- 1. Buy a prepaid Quota Token pack.
- 2. Create a Quota API key in the dashboard.
- 3. Send requests to the base URL with a model alias such as
quota/sonnet.
Base URL
https://api.quota.host/v1
API key format
qta_live_...
Model aliases
quota/fast
Quick tasks, low-cost coding
quota/balanced
Daily coding and chat
quota/sonnet
Stronger coding route
quota/sonnet-pro
Advanced reasoning and code edits
quota/opus
Deep tasks and complex refactors
quota/opus-max
Highest-cost route for heavy reasoning
Streaming
Streaming support depends on the selected route. Check route availability and test with your Quota API key before wide rollout.
Controlled user note
Do not send highly sensitive data through best-effort community routes. Route multipliers apply to total token usage.
bash
curl https://api.quota.host/v1/chat/completions \
-H "Authorization: Bearer qta_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "quota/sonnet",
"messages": [
{"role": "user", "content": "Summarize this diff and suggest next edits."}
]
}'javascript
const response = await fetch("https://api.quota.host/v1/chat/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer qta_live_...",
},
body: JSON.stringify({
model: "quota/sonnet",
messages: [{ role: "user", content: "Review this pull request." }],
}),
});
const data = await response.json();python
import requests
response = requests.post(
"https://api.quota.host/v1/chat/completions",
headers={
"Authorization": "Bearer qta_live_...",
"Content-Type": "application/json",
},
json={
"model": "quota/sonnet",
"messages": [{"role": "user", "content": "Generate release notes from these commits."}],
},
)
print(response.json())json
{
"error": {
"code": "insufficient_balance",
"message": "Your Quota balance is too low for this route.",
"type": "billing_error"
}
}json
{
"usage": {
"input_tokens": 1800,
"output_tokens": 3400,
"route_multiplier": "x3",
"charged_quota_tokens": 15600
}
}