Claude Code sends Anthropic Messages requests, and Prism exposes an
Anthropic-compatible /v1/messages endpoint, so you can point the CLI at Prism
with environment variables. No gateway is required.
Copy for your agent
If no key exists, create one at
prisminference.com/signup first.
Set these variables in the environment that launches claude:
Use the host without a /v1 suffix. Claude Code appends /v1/messages
itself, so a /v1 in ANTHROPIC_BASE_URL produces /v1/v1/messages and a 404.
ANTHROPIC_MODEL overrides Claude Code’s built-in Claude model IDs, which Prism
does not serve. ANTHROPIC_SMALL_FAST_MODEL covers background requests such as
title generation; set it to a Prism model so those requests succeed too.
Verify
You should see PRISM OK. The request appears in your Prism usage once it
completes.
Notes
- Prism accepts both
ANTHROPIC_AUTH_TOKEN (Bearer) and ANTHROPIC_API_KEY
(x-api-key). Prefer ANTHROPIC_API_KEY if you want to leave your claude.ai
login untouched.
- Messages, streaming, thinking blocks, tool use, structured output, and
count_tokens are supported. Prompt-cache hints such as
context_management are accepted and ignored.
- Prism discards request inputs and outputs after processing. See
Zero data retention.
Last modified on September 25, 2026