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

# Introduction

> Run open-weight models through OpenAI and Anthropic compatible inference endpoints.

Prism is an inference API for coding agents. Use the OpenAI client already in
your application, change its base URL, and select a Prism model.

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
OpenAI base URL:   https://api.prisminference.com/v1
Anthropic base URL: https://api.prisminference.com
```

Prism serves GLM-5.3, Kimi K3, Qwen, MiniMax, and DeepSeek-V4-Flash. The same
API key works with both supported wire formats.

## API formats

| Endpoint                         | Format                   | Purpose                                                                 |
| -------------------------------- | ------------------------ | ----------------------------------------------------------------------- |
| `POST /v1/chat/completions`      | OpenAI Chat Completions  | Generate text, stream tokens, call tools, and return structured output. |
| `GET /v1/models`                 | OpenAI Models            | List models available to the authenticated API key.                     |
| `GET /v1/models/{model}`         | OpenAI Models            | Retrieve one available model by ID.                                     |
| `POST /v1/messages`              | Anthropic Messages       | Use Prism models with Anthropic clients and Claude Code.                |
| `POST /v1/messages/count_tokens` | Anthropic token counting | Count input tokens before creating a message.                           |

<Note>
  Prism V0 supports the inference endpoints listed above. Additional API
  formats may be added after the initial release.
</Note>

## OpenAI-compatible request

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.PRISM_API_KEY,
  baseURL: "https://api.prisminference.com/v1",
});

const response = await client.chat.completions.create({
  model: "prism-glm53",
  messages: [
    { role: "user", content: "Find the race condition in this worker: ..." },
  ],
});

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

Keep API keys on your server. Do not put them in browser code, client bundles,
or public repositories.

## Start building

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Send a request with cURL, TypeScript, or Python.
  </Card>

  <Card title="Models" icon="cpu" href="/models">
    Compare model IDs, context windows, and intended workloads.
  </Card>

  <Card title="Chat Completions" icon="messages-square" href="/api-reference/chat-completions">
    Read the OpenAI-compatible request and response contract.
  </Card>

  <Card title="Anthropic Messages" icon="braces" href="/api-reference/messages">
    Connect Anthropic SDKs and Claude Code.
  </Card>
</CardGroup>
