Lumart DevelopersAPI Reference

API Documentation
OpenAI/v1Anthropic/anthropic

OpenAI- and Anthropic-compatible endpoints with ready-to-paste IDE integration guides.

5-Minute Quickstart

~5 min

Sign up, mint a key, copy one request — and see your first reply. Follow the four steps in order.

  1. 1

    Create an account

    New users get free Stars on sign-up — plenty to run this Quickstart end to end.

  2. 2

    Create an API key

    Open the console and create a key. The full key is shown only once, so copy it right away and keep it safe.

  3. 3

    Copy the minimal request

    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
    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!"}]
      }'
  4. 4

    See your first reply

    A successful call returns a standard chat completion object — the reply is in choices[0].message.content.

    Expected response · JSON
    {
      "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.

OpenAI-compatible by design

Already have an OpenAI SDK project? Swap base_url to https://lumart.ai/v1 and reuse all your existing code — no rewrite needed.

Quickstart

Call multimodal models with one key

OpenAI and Anthropic compatibility across text, images, video, audio, and embeddings with unified auth, routing, and Stars billing.

One-minute setup
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);
Point baseURL to Lumart and keep the OpenAI SDK code you already use.
01

Choose a protocol

Use the OpenAI baseURL for existing OpenAI SDK apps; use the Anthropic endpoint for Claude-style tools.

02

Create or paste a key

Full keys are shown only once. Examples show prefixes; live requests need the full key pasted manually.

03

Copy an example

Examples use the current origin automatically while keeping native SDK conventions.

Choose a protocol

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.

OpenAI-compatible

Recommended

Drop-in replacement for the OpenAI API — no code change needed

  • Works with every official OpenAI SDK (Python / Node / TS)
  • /chat/completions, /embeddings, /images, /audio paths preserved
  • Tested with ChatBox, NextChat, LobeChat, Cursor, Cline, Codex
/v1

Claude-compatible

Native Anthropic Messages API support, including streaming

  • Works with the Anthropic SDK and Claude Code CLI
  • Full /v1/messages with streaming SSE events
  • Tested with CC Switch and LobeChat (Claude provider)
/anthropic

Endpoint directory

Organized by developer task so you can pick a capability, then read parameters and examples.

Visible 16
Account / Balance
Chat
Images
Audio
Video
Embeddings
Models
OpenAI-Compatible and Claude-Compatible API Documentation | Lumart AI