> ## 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.

# Coding agents

> Run Prism models in Claude Code and OpenAI-compatible agent harnesses.

Prism exposes OpenAI Chat Completions and Anthropic Messages. Choose the format
your coding agent already uses.

## Claude Code

Claude Code uses the Anthropic Messages API. Point it at Prism with environment
variables:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export ANTHROPIC_BASE_URL="https://api.prisminference.com"
export ANTHROPIC_AUTH_TOKEN="$PRISM_API_KEY"
export ANTHROPIC_MODEL="prism-glm53"
export ANTHROPIC_SMALL_FAST_MODEL="prism-qwen"

claude
```

To persist the configuration:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.prisminference.com",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_PRISM_API_KEY",
    "ANTHROPIC_MODEL": "prism-glm53",
    "ANTHROPIC_SMALL_FAST_MODEL": "prism-qwen"
  }
}
```

Save this as `~/.claude/settings.json`. Prefer an environment variable or secret
injection mechanism over writing a real key directly into the file.

Claude Code tools use the normal Anthropic `tool_use` and `tool_result` loop.
Streaming, system prompts, and conversation history use the standard Messages
format.

## OpenAI-compatible harnesses

For an agent that accepts an OpenAI-compatible provider, configure:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
base URL: https://api.prisminference.com/v1
API key:  $PRISM_API_KEY
model:    prism-glm53
```

Use the Chat Completions wire format. Prism V0 does not expose the OpenAI
Responses endpoint.

```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,
  tools,
  prompt_cache_key: conversationId,
});
```

## Codex compatibility

Current Codex clients use the OpenAI Responses API. Prism V0 serves Chat
Completions and Messages, not Responses, so Codex does not connect directly.
Use a gateway that translates Responses requests to Chat Completions, or use an
agent harness with native Chat Completions support.

## Choose models by role

| Agent role                          | Starting model    |
| ----------------------------------- | ----------------- |
| Main coding and reasoning loop      | `prism-glm53`     |
| Reasoning-heavy or multimodal work  | `prism-kimik3`    |
| Fast background tasks and summaries | `prism-qwen`      |
| Fast coding and tool loops          | `prism-dsv4flash` |

Measure your own workload before routing production traffic. Context size,
tool-schema size, cache reuse, and output length all affect end-to-end latency.
