API Overview
LLMoxy provides a fully compatible Anthropic Messages API interface. Just change the Base URL and use the official SDK seamlessly.
Base URL
https://llmoxy.com/v1
TIP Tools like Claude Code use the address without
/v1, i.e.https://llmoxy.com. SDK calls include/v1.
Authentication
Method 1: x-api-key (recommended)
x-api-key: YOUR_API_KEY
Method 2: Authorization
Authorization: Bearer YOUR_API_KEY
Quick Start
Python
from anthropic import Anthropic
client = Anthropic(
api_key="YOUR_API_KEY",
base_url="https://llmoxy.com/v1"
)
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(message.content[0].text)
Node.js
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://llmoxy.com/v1'
});
const message = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
messages: [
{ role: 'user', content: 'Hello!' }
]
});
console.log(message.content[0].text);
OpenAI Compatible (Chat Completions)
curl
curl https://llmoxy.com/v1/chat/completions \
-H "Authorization: Bearer <LLMOXY_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{ "role": "user", "content": "Say hello in one short sentence." }
]
}'
TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LLMOXY_API_KEY,
baseURL: "https://llmoxy.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Write a haiku about routers." }],
});
console.log(response.choices[0]?.message?.content);
Python
from openai import OpenAI
client = OpenAI(
api_key="<LLMOXY_API_KEY>",
base_url="https://llmoxy.com/v1",
)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Write a haiku about routers."}],
)
print(response.choices[0].message.content)
Streaming Output
Set stream: true in Chat or Responses requests, and LLMoxy returns an OpenAI-compatible SSE stream.
curl https://llmoxy.com/v1/chat/completions \
-H "Authorization: Bearer <LLMOXY_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"stream": true,
"messages": [
{ "role": "user", "content": "Count from one to five." }
]
}'
Supported Models
Claude Series (available groups: Max, Kiro)
| Model | Description |
|---|---|
| claude-opus-4-20250514 | Best performance |
| claude-sonnet-4-20250514 | Balanced choice |
| claude-haiku-4-20250414 | Fast response |
Gemini Series (available group: Gemini)
| Model | Description |
|---|---|
| gpt-5.4 | Image generation |
Latest Model List See the official model hub for currently available models.
Billing
Billed by actual token usage (including cache write and cache read). Prices vary by model. See Groups and Pricing for details.
Next Steps
- Anthropic Format — request parameters, response format, code examples
- Chat Completions — OpenAI-compatible request format
- Routing, Billing, and Errors — learn about fees and error codes
