Integrate
Copy-paste snippets for your favorite tools, agents, and languages. Fill in your details below and all code blocks update automatically.
OpenAI Compatible Anthropic Messages Responses API
Pi by Mario Zechner
1. Install
2. Configure ~/.pi/agent/models.json
Codex CLI by OpenAI
1. Set environment variable
2. Configure ~/.codex/config.toml
Aider
Run with environment variables
Continue.dev VS Code extension
Add to ~/.continue/config.yaml
Cursor
Configure via the Cursor settings UI:
2. Set "Override OpenAI Base URL" to:
SERVER_URL/v13. Set "OpenAI API Key" to your API key
4. Add your model name:
MODEL_NAME
curl
Python pip install openai
Node.js / TypeScript npm install openai
Go github.com/sashabaranov/go-openai
curl with -N for unbuffered output
Python pip install openai
Node.js / TypeScript npm install openai
Go github.com/sashabaranov/go-openai
curl
Uses the Anthropic x-api-key header and anthropic-version header.
Python pip install anthropic
curl streaming with -N
Python pip install anthropic
curl
The newer OpenAI Responses API uses a simpler input field instead of a messages array.
Python pip install openai
curl streaming with -N
Python pip install openai
Chat Completions /v1/chat/completions
Standard OpenAI chat completions response format.
Chat Completions Streaming Server-Sent Events
When stream: true, returns SSE events with delta content.
Anthropic Messages /v1/messages
Standard Anthropic Messages API response format.
Anthropic Messages Streaming Server-Sent Events
When stream: true, returns named SSE events with content deltas.
OpenAI Responses /v1/responses
Newer OpenAI Responses API format.
Responses API Streaming Server-Sent Events
When stream: true, returns named SSE events.