Integration examples
Get from zero to your first response in minutes. Pick the client you already use — the endpoint is fully compatible.
The fastest way to test your key from any terminal.
curl https://clauden.ai/v1/chat/completions \
-H "Authorization: Bearer $CLAUDEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Use the official OpenAI SDK — just point base_url at ClaudeN AI.
from openai import OpenAI
client = OpenAI(
api_key="$CLAUDEN_API_KEY",
base_url="https://clauden.ai/v1",
)
resp = client.chat.completions.create(
model="gpt-5.4",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
Prefer the Anthropic SDK? Use the /v1/anthropic base URL.
from anthropic import Anthropic
client = Anthropic(
api_key="$CLAUDEN_API_KEY",
base_url="https://clauden.ai/v1/anthropic",
)
msg = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)
Node.js with the official OpenAI SDK — only baseURL and apiKey change.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CLAUDEN_API_KEY,
baseURL: "https://clauden.ai/v1",
});
const resp = await client.chat.completions.create({
model: "gpt-5.4",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);
Streaming works the same way as with OpenAI: pass stream=True and iterate the chunks.
stream = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello!"}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)
Editors & agent frameworks
Cursor: Settings → Models → check "Override OpenAI Base URL", set it to the base URL below, paste your ClaudeN API key, then add model names such as claude-sonnet-4-6 or gpt-5.4 to the model list.
Cline / Continue: choose the "OpenAI Compatible" provider, set the same base URL and API key, and pick any enabled model name. LangChain and LlamaIndex work through their standard OpenAI classes with a custom base_url.
https://clauden.ai/v1
Replace $CLAUDEN_API_KEY with your own API key (it starts with sk-). It is sent in the Authorization header.