Claude OpenAI-Compatible Format
You can call Claude models through the standard OpenAI Chat Completions API format without modifying existing code.Non-Streaming Request
Response
Streaming Request
Available Claude Models
| Model | Description |
|---|---|
claude-sonnet-4-20250514 | Claude Sonnet 4, balancing capability and speed |
claude-opus-4-20250514 | Claude Opus 4, strongest capability |
claude-3.5-sonnet | Claude 3.5 Sonnet |
claude-3.5-haiku | Claude 3.5 Haiku, fast response |
Parameter Mapping
Crazyrouter automatically maps OpenAI format parameters to Claude native parameters:| OpenAI Parameter | Claude Native Parameter | Description |
|---|---|---|
messages[0].role="system" | system | System prompt auto-extracted |
max_tokens | max_tokens | Direct mapping |
temperature | temperature | Direct mapping |
top_p | top_p | Direct mapping |
stop | stop_sequences | Format auto-converted |
stream | stream | Direct mapping |
tools | tools | Tool format auto-converted |
When using the OpenAI-compatible format, responses are automatically converted to the OpenAI Chat Completion format. If you need access to Claude-specific features (such as Extended Thinking’s thought process), it is recommended to use the native format.