API Reference
Use Existing SDKs
Point official OpenAI and Anthropic SDKs at Camel Stream by changing the base URL
OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CAMEL_API_KEY,
baseURL: "https://stream.camelai.com/v1",
});
const stream = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Hello from Camel Stream" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}Anthropic SDK
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.CAMEL_API_KEY,
baseURL: "https://stream.camelai.com",
});
const message = await client.messages.create({
model: "deepseek-v4-flash",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello from Camel Stream" }],
});
console.log(message.content);