Skip to main content
The Anthropic SDK Base URL does not include /v1. The SDK adds /v1/messages.

HTTP example

Set the environment variable as shown in the quickstart. Select a model available to your key.

Python example

Differences from OpenAI Chat

  • Put the system prompt in the top-level system field rather than a system message inside messages.
  • max_tokens is required.
  • Read text blocks from content[], not choices.
  • Streaming uses named events and requires protocol-specific parsing.
Compatibility does not imply every extension field can be translated. Reduce unsupported requests to a minimal example. See APIONE’s protocol documentation.