# Claude Code and the Anthropic SDKs on any model

OmniRail speaks the Anthropic Messages API: `POST https://omnirail.org/api/v1/messages` (stream supported, auth `x-api-key` or Bearer) and `POST /messages/count_tokens` (free estimate), on any text model of the catalog.

Run Claude Code on another model:

```bash
export ANTHROPIC_BASE_URL=https://omnirail.org/api
export ANTHROPIC_AUTH_TOKEN=$OMNIRAIL_KEY
claude --model openai/gpt-5.6-sol
```

- `--model` takes any catalog id; Claude ids such as `claude-sonnet-5-5` map to the catalog's Claude models. The `X-OmniRail-Model` header says which model ran.
- Billed like chat completions, with the same key limits; read `usage` and `X-OmniRail-Charge`.
- Anthropic SDKs: set the base URL to `https://omnirail.org/api` and the key to your OmniRail key.

Details: https://omnirail.org/docs#anthropic
