API reference
Messages
Anthropic-compatible. Use it with the Anthropic SDKs, Claude Code, or anything that speaks the Messages API.
POST/v1/messages
Request body
modelstringrequiredAny model id from the market. Claude models are served natively; others are translated.
max_tokensintegerrequiredMaximum tokens to generate.
messagesarrayrequiredAlternating user and assistant turns. Content can be a string or an array of content blocks.
systemstringSystem prompt.
streambooleanStream events. Defaults to false.
Example
ts
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ baseURL: "https://api.useorbix.app", apiKey: process.env.ORBIX_API_KEY });
const msg = await client.messages.create({
model: "anthropic/claude-sonnet-5.5",
max_tokens: 512,
system: "You are concise.",
messages: [{ role: "user", content: "Summarise the ORBIX pool rules." }],
});
console.log(msg.content[0].type === "text" ? msg.content[0].text : "");Headers
x-api-key and Authorization: Bearer are both accepted. anthropic-version is accepted and ignored.
Streaming
Events follow the Anthropic format: message_start, content_block_delta, message_delta, message_stop. Billing values arrive in the final message_delta under orbix.