cURL (Unified Mode)
Raw HTTP examples for the unified endpoint
The unified endpoint is POST /v1/chat/completions. It accepts an OpenAI-compatible request body and returns an OpenAI-compatible response, regardless of which provider handles the request.
Basic request
Calling Anthropic
Calling Gemini
Streaming
Add "stream": true to get Server-Sent Events:
The response is a stream of data: lines in OpenAI’s SSE format:
Tool calling
Response format
All responses follow the OpenAI chat completion format:
The model field in the response reflects the provider and model that handled the request (e.g., anthropic/claude-sonnet-4-6 or google/gemini-2.5-flash).