AI Gateway
Clipia AI Gateway
One OpenAI-compatible API for Claude, GPT, Gemini, DeepSeek and Grok, paid with Clipia credits. Get a key and send your first request in a couple of minutes.
Clipia AI Gateway is a single OpenAI-compatible API to flagship language models: Claude, GPT, Gemini, DeepSeek and Grok. One key, one contract, billed with your Clipia account credits. If you already have code on the openai SDK or LangChain, just point base_url at https://api.clipia.ai/v1 and use a Clipia key.
Base URL
https://api.clipia.ai/v1 — compatible with OpenAI Chat Completions. Authenticate with a regular Clipia API key: Authorization: Bearer clipia_.... It's the same key and the same credit balance you use for image and video generation. You don't need a separate Gateway key: chat is part of the generate permission that every key has (see Authentication). Both clipia_live_… and clipia_test_… work; a test key returns a canned reply that costs 0.
What's inside
Chat Completions
POST /v1/chat/completions — streaming and non-streaming responses, tool calling, structured outputs.
Models & pricing
The GET /v1/models catalog and prices in US dollars per 1M tokens.
LangChain
ChatOpenAI with our base_url — chat, tools and agents.
Quickstart
Get an API key
Create a key in the developer console → API keys tab. The full key is shown only once — save it immediately. It is a server-side secret; never put it in a browser or a public repository.
export CLIPIA_KEY=clipia_live_xxxxxxxxxxxxxxxxxxxxxxMake your first request
Use the official openai SDK — change only base_url and the key. The model is passed as a string (see the catalog).
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["CLIPIA_KEY"],
base_url="https://api.clipia.ai/v1",
)
resp = client.chat.completions.create(
model="claude-opus-5-5",
messages=[
{"role": "user", "content": "Hi! Tell me three facts about Mars."},
],
)
print(resp.choices[0].message.content)Read the response
The response is a standard chat.completion object. The text is in choices[0].message.content, the spend is in usage.
{
"id": "chatcmpl-3f9a1c7e2b41",
"object": "chat.completion",
"created": 1782300000,
"model": "claude-opus-5-5",
"provider": "Clipia",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "1. ...\n2. ...\n3. ..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 72,
"total_tokens": 90,
"prompt_tokens_details": { "cached_tokens": 0 }
}
}usage is the input and output token spend. The cost in credits is charged to the account balance at the model's rate (see pricing); you can look it up by the response id with GET /v1/generation — see Key and limits.
Sandbox, no charge
A key prefixed clipia_test_ returns a canned reply in the same format and charges nothing, so you can debug response parsing before going live. See Sandbox.
Compatibility
The gateway responds in the OpenAI Chat Completions format, so clients built for the OpenAI contract work out of the box: the openai SDK (Python and Node.js), LangChain, and agent tools that accept a custom base_url. Streaming (SSE with data: [DONE]), tool calling (tools), structured outputs (response_format) and the standard OpenAI error envelope are all supported.
Long answers in a stream
A long-running non-streaming request can get a 504: use stream: true for long answers and reasoning models, and the Idempotency-Key header for safe retries — see Timeouts and retries.
What's next
- Chat Completions — parameters, streaming, tools, errors.
- Models & pricing — catalog and rates.
- LangChain — chat and agents.
- Key and limits —
GET /v1/key, request cost byidand request limits. - More about the product on the Clipia AI Gateway page.
The same models are available as an MCP chat tool — see the MCP section.
Versioning and compatibility
The Clipia API evolves within one version, /v1 — which changes count as compatible, what goes in the changelog, deprecated fields and SDK versions.
Chat Completions
POST /v1/chat/completions — the OpenAI-compatible chat endpoint of Clipia AI Gateway. Streaming and regular responses, parameters, roles, tools and errors.