/v1/messages endpoint, so you can point the CLI at Prism
with environment variables. No gateway is required.
Copy for your agent
PRISM_API_KEY.
Configure
Set these variables in the environment that launchesclaude:
/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
PRISM OK. The request appears in your Prism usage once it
completes.
Notes
- Prism accepts both
ANTHROPIC_AUTH_TOKEN(Bearer) andANTHROPIC_API_KEY(x-api-key). PreferANTHROPIC_API_KEYif you want to leave your claude.ai login untouched. - Messages, streaming, thinking blocks, tool use, structured output, and
count_tokensare supported. Prompt-cache hints such ascontext_managementare accepted and ignored. - Prism discards request inputs and outputs after processing. See Zero data retention.