---
title: Clipia AI Gateway
description: A single OpenAI-compatible API to Claude, GPT, Gemini, DeepSeek and Grok, billed in rubles. Get a key and make your first request in minutes.
icon: MessagesSquare
---

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 — no foreign card required. It is a drop-in: 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.

<Callout type="info" title="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/video generation** — no separate Gateway key needed: the `generate` scope already grants chat (details — [Authentication](/docs/getting-started/authentication#scopes)). Both `clipia_live_…` and `clipia_test_…` work.
</Callout>

## What's inside

<Cards>
  <Card title="Chat Completions" href="/en/docs/llm-gateway/chat-completions">
    `POST /v1/chat/completions` — streaming and non-streaming responses, tool calling, structured outputs.
  </Card>
  <Card title="Models & pricing" href="/en/docs/llm-gateway/models">
    The `GET /v1/models` catalog and prices in rubles per 1M tokens.
  </Card>
  <Card title="LangChain" href="/en/docs/llm-gateway/langchain">
    `ChatOpenAI` with our `base_url` — chat, tools and agents.
  </Card>
</Cards>

## Quickstart

<Steps>

<Step>

### Get an API key

Create a key in the [developer console](/developer) → **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.

```bash
export CLIPIA_API_KEY=clipia_live_xxxxxxxxxxxxxxxxxxxxxx
```

</Step>

<Step>

### Make 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](/en/docs/llm-gateway/models)).

<Tabs items={['Python', 'Node.js', 'cURL']}>
<Tab value="Python">

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["CLIPIA_API_KEY"],
    base_url="https://api.clipia.ai/v1",
)

resp = client.chat.completions.create(
    model="claude-opus-5",
    messages=[
        {"role": "user", "content": "Hi! Tell me three facts about Mars."},
    ],
)

print(resp.choices[0].message.content)
```

</Tab>
<Tab value="Node.js">

```ts
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CLIPIA_API_KEY,
  baseURL: "https://api.clipia.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "claude-opus-5",
  messages: [
    { role: "user", content: "Hi! Tell me three facts about Mars." },
  ],
});

console.log(resp.choices[0].message.content);
```

</Tab>
<Tab value="cURL">

```bash
curl https://api.clipia.ai/v1/chat/completions \
  -H "Authorization: Bearer $CLIPIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-5",
    "messages": [
      { "role": "user", "content": "Hi! Tell me three facts about Mars." }
    ]
  }'
```

</Tab>
</Tabs>

</Step>

<Step>

### Read the response

The response is a standard `chat.completion` object. The text is in `choices[0].message.content`, the spend is in `usage`.

```json
{
  "id": "chatcmpl-3f9a1c7e2b41",
  "object": "chat.completion",
  "created": 1782300000,
  "model": "claude-opus-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,
    "cost": 0.05
  }
}
```

`usage.cost` is the cost of the request in **credits** (charged to the account balance). Billing is per input and output token — see [pricing](/en/docs/llm-gateway/models).

</Step>

</Steps>

<Callout type="info" title="Sandbox, no charge">
A key prefixed `clipia_test_` runs in test mode — handy for debugging your integration before going live. See [Sandbox](/en/docs/getting-started/sandbox).
</Callout>

## 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/function calling, structured outputs (`response_format`) and the standard OpenAI error envelope are all supported.

<Callout type="info" title="What's next">
- [Chat Completions](/en/docs/llm-gateway/chat-completions) — parameters, streaming, tools, structured outputs.
- [Models & pricing](/en/docs/llm-gateway/models) — catalog and rates.
- [LangChain](/en/docs/llm-gateway/langchain) — chat and agents.
- [Account & limits](/en/docs/llm-gateway/account) — `GET /v1/key`, `GET /v1/generation`, rate limits.
- More about the product on the [Clipia AI Gateway](/ai-gateway) page.

The same models are available as an MCP `chat` tool — see the [MCP](/en/docs/mcp) section.
</Callout>
