> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cerasai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CerasAI APIs

> OpenAI- and Anthropic-compatible inference APIs powered by CerasAI.

CerasAI provides OpenAI-compatible (`/v1/chat/completions`) and Anthropic-compatible (`/v1/messages`) inference APIs with a single fast standard tier. Use any OpenAI client library, such as [the official OpenAI SDK](https://developers.openai.com/api/docs/libraries?language=python#install-an-official-sdk), to access the CerasAI APIs.

## Base URL

Use the `https://api.cerasai.cloud/v1` base URL for all requests to the CerasAI APIs.

## Your first request

Create a key on the [API Keys](https://console.cerasai.cloud/keys) page, export it as `CERASAI_API_KEY`, and send a request.

```python Python theme={"system"}
import os

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["CERASAI_API_KEY"],
    base_url="https://api.cerasai.cloud/v1",
)

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4.1-Flash-1017",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

```typescript TypeScript theme={"system"}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CERASAI_API_KEY,
  baseURL: "https://api.cerasai.cloud/v1",
});

const response = await client.chat.completions.create({
  model: "deepseek-ai/DeepSeek-V4.1-Flash-1017",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);
```

```bash curl theme={"system"}
curl https://api.cerasai.cloud/v1/chat/completions \
  -H "Authorization: Bearer $CERASAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V4.1-Flash-1017","messages":[{"role":"user","content":"Hello"}]}'
```

## Next steps

> [card] [Authentication](https://docs.cerasai.com/authentication.md)
>
> Create a key and authorize your requests.

> [card] [Chat Completions](https://docs.cerasai.com/api-reference/chat/create-a-chat-completion.md)
>
> Send prompts and stream tokens back.

> [card] [Agent Integrations](https://docs.cerasai.com/agent-integrations)
>
> Connect popular coding agents to CerasAI models.

> [card] [Rate limits](https://docs.cerasai.com/rate-limits.md)
>
> Three per-minute budgets, and how to read them.

> [card] [Billing](https://docs.cerasai.com/billing.md)
>
> Prepaid credit, per-token rates and automatic reload.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.