Account & limits
GET /v1/key and GET /v1/generation in Clipia AI Gateway — check key limits and spend, exact request cost, rate-limit headers and the 429 response.
Clipia AI Gateway offers OpenAI-compatible endpoints to control your key and spend: GET /v1/key for key limits and usage, GET /v1/generation for the actual cost of a specific request. Billing runs in credits against the account balance.
Key info (GET /v1/key)
/v1/keycurl https://api.clipia.ai/v1/key \
-H "Authorization: Bearer $CLIPIA_API_KEY"Response 200
{
"data": {
"label": "prod key",
"usage": 1240.5,
"limit": null,
"limit_remaining": null,
"rate_limit": { "requests": 120, "interval": "1m" }
}
}Prop
Type
Request cost (GET /v1/generation)
Pass the id from a chat response (chatcmpl-…) to get the actual cost and token spend of an already-completed request.
/v1/generation?id={id}curl "https://api.clipia.ai/v1/generation?id=chatcmpl-3f9a1c7e2b41" \
-H "Authorization: Bearer $CLIPIA_API_KEY"Response 200
{
"data": {
"id": "chatcmpl-3f9a1c7e2b41",
"model": "claude-opus-4-8",
"provider_name": "Clipia",
"streamed": false,
"total_cost": 0.046,
"tokens_prompt": 28,
"tokens_completion": 64,
"finish_reason": "stop",
"created_at": "2026-06-26T12:00:00Z"
}
}total_cost is the actual cost of the request in credits. This is handy for auditing spend per call, independently of the usage field in the chat response.
Limits
Each key is limited by requests per minute (RPM, default 120) and, optionally, by tokens per minute (TPM) and a credit budget. Exceeding RPM/TPM is rejected with 429; exhausting the budget with 402.
Response headers
Prop
Type
429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 12
Content-Type: application/json{
"error": {
"message": "Rate limit exceeded. Try again later.",
"type": "rate_limit_error",
"param": null,
"code": "rate_limit_exceeded"
}
}Respect Retry-After
On 429, wait the number of seconds given in Retry-After before retrying — it is more reliable than a fixed delay. Key limits can be raised in the developer console.
Verify against the live response
The exact shape of GET /v1/key and GET /v1/generation, as well as the set of rate-limit headers, may differ — verify against the live API. Limit values are configurable per key.
LangChain
Connect Clipia AI Gateway to LangChain via ChatOpenAI with the Clipia base_url — chat, tools and tool agents on Claude, GPT and Gemini.
Clipia MCP
Connect Clipia to Claude Code, claude.ai, ChatGPT, Cursor, VS Code and Windsurf — 50+ image and video models right inside your agent's chat with a single API key.