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

# API Playground

> Call Corvic and other models from your own code through Corvic's OpenAI-compatible gateway.

Corvic's LLM gateway is OpenAI-compatible. Any OpenAI SDK or HTTP client can call Corvic models and the other models your organization is offered, billed to your organization and governed by its [policy](https://docs.corvic.ai/rbac/policies.md).

## Get a key and a snippet

**1. Open a model**

Go to [**Settings → Models**](https://app.corvic.ai/settings/model) and open the model you want.

**2. Use via API**

The **Use via API** section shows the model ID and the **Base URL**. Choose **Create API key**. The key can only call models, lasts 90 days, and is shown once, so copy it now.

**3. Copy a snippet**

Copy the ready-made curl, Python, or TypeScript example. The examples read the key from the `CORVIC_API_KEY` environment variable.

Revoke keys under [**Settings → Access Tokens**](https://app.corvic.ai/settings/accessTokens).

## Call the API

The base URL is `https://api.corvic.ai/openai/v1`. Authenticate with `Authorization: Bearer <key>`.

```bash curl theme={null}
curl https://api.corvic.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer $CORVIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "corvic/rook",
    "messages": [{"role": "user", "content": "Summarize Q3 revenue drivers in three bullets."}]
  }'
```

```python Python theme={null}
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.corvic.ai/openai/v1", api_key=os.environ["CORVIC_API_KEY"])
reply = client.chat.completions.create(
    model="corvic/rook",
    messages=[{"role": "user", "content": "Summarize Q3 revenue drivers in three bullets."}],
    reasoning_effort="medium",
)
print(reply.choices[0].message.content)
```

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

const client = new OpenAI({ baseURL: "https://api.corvic.ai/openai/v1", apiKey: process.env.CORVIC_API_KEY });
const reply = await client.chat.completions.create({
  model: "corvic/rook",
  messages: [{ role: "user", content: "Summarize Q3 revenue drivers in three bullets." }],
});
console.log(reply.choices[0].message.content);
```

## Endpoints

| Endpoint | Use it for |
| - | - |
| `GET /models` | List the models your organization can call |
| `POST /chat/completions` | Chat completions, streaming supported |
| `POST /responses` | The Responses API, including `corvic/web-augment` |
| `POST /audio/transcriptions` | Speech to text |

Calls run as your organization. To run a call under a room's policy and billing, add the `X-Corvic-Room-Id` header.

> [!NOTE]
>
> The gateway is stateless: send the whole conversation with each call. `store`, `previous_response_id`, `conversation`, and `background` are not supported. `corvic/auto` isn't available over the API; call a tier such as `corvic/rook`.

## MCP Playground

To try Corvic's room tools rather than models, open a room's **MCP Playground** (beta). It shows the room's MCP endpoint, creates an access token, lists the tools, and lets you run one and see the raw request and response. See [Room MCP](https://docs.corvic.ai/mcp-connect/room-tools.md).


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