API Reference

Messages

Anthropic-format endpoint — for Claude Code, Claude Desktop, and the Anthropic SDK.

Endpoint

POST https://api.prismma.ai/v1/messages — the same request and response shape as Anthropic's Messages API. Point the Anthropic SDK or an Anthropic-compatible tool at Prismma's root base URL and it works unchanged.

Auth accepts either header: x-api-key: sk-eu-... or Authorization: Bearer sk-eu-....

Request

shell
curl https://api.prismma.ai/v1/messages \
  -H "x-api-key: $PRISMMA_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-7",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello, Prismma"}]
  }'

max_tokens is required, same as upstream Anthropic. model is any Claude id from Guides → Available Models — a key scoped to the OpenAI provider group returns 403 here. Set stream: true for SSE — see Guides → Streaming.

Who uses this endpoint

  • Claude Code — via ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN.
  • Claude Desktop — via its built-in third-party inference setting.
  • The Anthropic Python/Node SDK — see SDKs → Anthropic SDK.
Claude Code v2.x reads ANTHROPIC_API_KEY before ANTHROPIC_AUTH_TOKEN when both are set — a stale direct-Anthropic ANTHROPIC_API_KEY silently bypasses Prismma. Always unset it first. See SDKs → Claude Code.