Endpoint
Authentication
string
required
Anthropic-style API key header
string
Bearer token format
Request Headers
string
required
Must be
application/jsonstring
API version, e.g.,
2023-06-01string
Beta features to enable. Automatically injected:
Request Body
string
required
Model identifier:
claude-sonnet-4-6- Latest Claude Sonnet 4.6claude-sonnet-4-6-thinking- With extended thinkingclaude-opus-4-6-thinking- Opus with thinkinggemini-3-pro-high- Mapped to Gemini (via protocol conversion)
array
required
Conversation messages in Anthropic format
string | array
System prompt to guide model behavior. Can be:
- String: Simple system message
- Array: Structured system blocks for advanced control
integer
required
Maximum tokens to generate. Required for Claude protocol.
boolean
default:"false"
Enable Server-Sent Events (SSE) streaming
number
Sampling temperature (0.0 to 1.0)
number
Nucleus sampling (0.0 to 1.0)
integer
Top-K sampling parameter
object
Extended thinking configuration for reasoning models
object
Output configuration (Claude API v2.0.67+)
array
Available tools for function callingServer tools like
web_search can be enabled via:Response Format
Non-Streaming Response
string
Unique message identifier
string
Response type, always
messagestring
Always
assistantstring
Model used for generation
array
Response content blocks
string
Completion reason:
end_turn, max_tokens, tool_use, stop_sequenceobject
Token usage statistics
Example: Basic Chat
Example: With System Prompt
Example: Extended Thinking
Example: Claude Code CLI Integration
Example: Tool Use
Example: Web Search (Server Tool)
Content Block Types
Text Block
Thinking Block
Tool Use Block
Tool Result Block (in messages)
Image Upload
Features
- Full Claude Protocol: 100% compatible with Claude Code CLI and Anthropic SDKs
- Extended Thinking: Support for reasoning tokens with signature validation
- Tool Use: Client tools, server tools (web_search), and MCP integration
- Streaming: Real-time SSE streaming with thinking blocks
- Context Caching: Automatic prompt caching for repeated contexts
- Multi-modal: Images, documents, audio support
Error Format
invalid_request_error- Malformed requestauthentication_error- Invalid API keyrate_limit_error- Quota exceededserver_error- Internal error