Endpoints
Messages API (Anthropic)
OpenAdapter also supports the native Anthropic Messages format on `/v1/messages`. This is what Claude Code, Claude Desktop, and the Anthropic SDK use. Your same
Base URL & authentication
Base URL: https://api.openadapter.in
All requests need an Authorization: Bearer sk-cv-... header. Generate or copy your API key from the Dashboard → API Keys page.
OpenAdapter also supports the native Anthropic Messages format on /v1/messages. This is what Claude Code, Claude Desktop, and the Anthropic SDK use. Your same API key works for both endpoints.
curl https://api.openadapter.in/v1/messages \
-H "x-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "GLM-4.7",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "What is the capital of France?"}
]
}'Claude Code / Claude Desktop: Set
ANTHROPIC_BASE_URL=https://api.openadapter.inandANTHROPIC_AUTH_TOKEN=$API_KEY— the Messages API handles the rest. See the Integration page for auto-setup scripts.
import anthropic
client = anthropic.Anthropic(
api_key="$API_KEY",
base_url="https://api.openadapter.in"
)
message = client.messages.create(
model="GLM-4.7",
max_tokens=1024,
messages=[
{"role": "user", "content": "What is the capital of France?"}
]
)
print(message.content[0].text)import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: '$API_KEY',
baseURL: 'https://api.openadapter.in',
});
const message = await client.messages.create({
model: 'GLM-4.7',
max_tokens: 1024,
messages: [
{ role: 'user', content: 'What is the capital of France?' }
],
});
console.log(message.content[0].text);