Skip to main content

Endpoint

The native Anthropic/Claude protocol endpoint provides full support for Claude Code CLI and advanced features like extended thinking, system prompts, and tool use.

Authentication

string
required
Anthropic-style API key header
Alternatively, use standard Bearer authentication:
string
Bearer token format

Request Headers

string
required
Must be application/json
string
API version, e.g., 2023-06-01
string
Beta features to enable. Automatically injected:

Request Body

string
required
Model identifier:
  • claude-sonnet-4-6 - Latest Claude Sonnet 4.6
  • claude-sonnet-4-6-thinking - With extended thinking
  • claude-opus-4-6-thinking - Opus with thinking
  • gemini-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.
Unlike OpenAI format, max_tokens is mandatory for Anthropic endpoints.
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 message
string
Always assistant
string
Model used for generation
array
Response content blocks
string
Completion reason: end_turn, max_tokens, tool_use, stop_sequence
object
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

Common error types:
  • invalid_request_error - Malformed request
  • authentication_error - Invalid API key
  • rate_limit_error - Quota exceeded
  • server_error - Internal error