AI Gateway
Key and limits
GET /v1/key (key, 30-day usage, balance and request limit), GET /v1/generation (request cost by id), rate-limit headers and the 429 response for LLM chat.
GET /v1/key shows which key you're using, how much it spent over the last 30 days, how many credits the account has available and the key's request limit. The cost of an individual chat request is returned by GET /v1/generation for the response id.
Key information
/v1/keycurl https://api.clipia.ai/v1/key \
-H "Authorization: Bearer $CLIPIA_KEY"Response 200
{
"data": {
"label": "prod key (····a1b2)",
"limit": null,
"usage": 1240.5,
"limit_remaining": 8320,
"is_free_tier": false,
"rate_limit": { "requests": 120, "interval": "1m" }
}
}Prop
Type
The same balance, split into subscription and purchased credits, is returned by GET /v1/account.
Request cost
The chat response's usage holds token counts only (in a stream, in the last chunk when stream_options: { "include_usage": true } is set — see Chat Completions). The cost of a completed request in credits is returned by GET /v1/generation: pass the response identifier chatcmpl-… (for POST /v1/completions, cmpl-…) or a generation request_id as id.
/v1/generationcurl "https://api.clipia.ai/v1/generation?id=chatcmpl-3f9a1c7e2b41" \
-H "Authorization: Bearer $CLIPIA_KEY"Response 200
{
"data": {
"id": "chatcmpl-3f9a1c7e2b41",
"total_cost": 0.046,
"tokens_prompt": 28,
"tokens_completion": 64,
"native_tokens_prompt": 28,
"native_tokens_completion": 64,
"finish_reason": null,
"model": "claude-opus-5-5",
"provider": "Clipia",
"streamed": null,
"created_at": "2026-11-04T12:00:00.000Z"
}
}Prop
Type
The lookup covers only your own account's requests: someone else's or an unknown id returns 404 not_found. The key's total 30-day spend is in GET /v1/key, and the request log is on the Logs tab of the Developer Console.
Limits
LLM chat is subject to the same limits as the rest of the API:
- 120 requests per minute per key and 600 across all of the account's keys; 60 requests per minute for an OAuth connection;
- a concurrency limit, if one is set for the key or the account;
- a tokens-per-minute limit, if the Clipia team has set one, and a credit budget, if the key owner has set one; none by default.
See Rate limits for details.
Response headers
Prop
Type
Streaming responses (stream: true) do not carry these headers: the server sends only the SSE headers. Read the limits from a regular request instead, such as GET /v1/key.
429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 12
Content-Type: application/json{
"error": {
"message": "API rate limit exceeded. Slow down and retry after the reset window.",
"type": "rate_limit_error",
"param": null,
"code": "rate_limit_exceeded"
}
}Respect Retry-After
On a 429, wait the number of seconds given in Retry-After before retrying — that's more reliable than a fixed delay.
LangChain
Connect Clipia AI Gateway to LangChain via ChatOpenAI with the Clipia base_url — chat, tool calling, agents and structured output on Claude, GPT and Gemini.
Use Clipia with AI agents
Give AI agents video, image, speech, music and presentation tools through Clipia MCP, or automate image and video generation with the REST API.