Skip to main content

Claude Code

Prism speaks the Anthropic Messages API natively at POST /v1/messages, so Claude Code and the official Anthropic SDKs work against Prism with three environment variables and no code changes.

Claude Code

Use the Prism model id, not the bare Anthropic one — anthropic/claude-opus-5, not claude-opus-5. Prism resolves it through the catalog, which is what applies your organization’s pricing and model policy.

Anthropic SDK

Both x-api-key and Authorization: Bearer are accepted, so whichever your client sends works.

What is supported

  • Non-streaming and streaming (stream: true, full Anthropic SSE event sequence)
  • system as a string or as a list of text blocks
  • Text and image content blocks (base64 and URL sources)
  • tools, tool_choice, tool_use and tool_result — the agent loop works
  • temperature, top_p, stop_sequences
max_tokens is required, as it is on Anthropic. Prism does not substitute a default: max_tokens is what the credit reservation uses to bound the request, so a silent default would reserve an amount you never asked for.

Billing is identical

/v1/messages is a translation layer over the same path as /v1/chat/completions — the same authentication, the same credit reservation, the same metering. A request costs the same through either protocol, and x-prism-trace-id on the response looks the response up in usage exactly the same way.

Errors

Errors come back in Anthropic’s envelope:
Prism’s 402 payment_required (out of credit) has no Anthropic equivalent and arrives as invalid_request_error with the real reason in the message. Check billing if you see one.

Not yet supported

Gemini generateContent and OpenAI /v1/responses are not translated. Prism’s “unified gateway” is about model coverage; protocol coverage today is OpenAI-compatible plus Anthropic-native.