Choose a protocol
Use the OpenAI baseURL for existing OpenAI SDK apps; use the Anthropic endpoint for Claude-style tools.
/v1Anthropic/anthropicOpenAI- and Anthropic-compatible endpoints with ready-to-paste IDE integration guides.
Sign up, mint a key, copy one request — and see your first reply. Follow the four steps in order.
New users get free Stars on sign-up — plenty to run this Quickstart end to end.
Open the console and create a key. The full key is shown only once, so copy it right away and keep it safe.
Set LUMART_API_KEY to the key you just created, then run one of these. Same code as the OpenAI SDK — only base_url changes.
curl https://lumart.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LUMART_API_KEY" \
-d '{
"model": "lumart-chat",
"messages": [{"role":"user","content":"Hello Lumart!"}]
}'A successful call returns a standard chat completion object — the reply is in choices[0].message.content.
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1700000000,
"model": "lumart-chat",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello! How can I help you today?" },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 9, "completion_tokens": 9, "total_tokens": 18 }
}Want token-by-token streaming? Add "stream": true and read the response as Server-Sent Events.
Already have an OpenAI SDK project? Swap base_url to https://lumart.ai/v1 and reuse all your existing code — no rewrite needed.
OpenAI and Anthropic compatibility across text, images, video, audio, and embeddings with unified auth, routing, and Stars billing.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LUMART_API_KEY,
baseURL: "/v1",
});
const result = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello Lumart!" }],
});
console.log(result.choices[0].message.content);Use the OpenAI baseURL for existing OpenAI SDK apps; use the Anthropic endpoint for Claude-style tools.
Full keys are shown only once. Examples show prefixes; live requests need the full key pasted manually.
Examples use the current origin automatically while keeping native SDK conventions.
Lumart AI provides a unified API fully compatible with OpenAI and Anthropic — use the SDK you already know to access multiple upstream models, billed in Stars under a single key.
Drop-in replacement for the OpenAI API — no code change needed
/v1Native Anthropic Messages API support, including streaming
/anthropicOrganized by developer task so you can pick a capability, then read parameters and examples.