OpenAI compatible API

OpenAI Compatible API — Change Three Fields, Keep the JSON Body

Three values change: LumeAPI key, base URL https://api.lumeapi.site/v1, and a catalog model id. The Chat Completions messages array stays the same — that is why the OpenAI Python/Node SDK and Cursor custom endpoints work.

Last verified 2026-08-14. Claude and Gemini use the same client: pass claude-sonnet-4-6 or gemini-3.5-flash. Embeddings and Assistants are not implied — check /docs first.

  • One API key
  • Dozens of models
  • Text, image & video
  • Up to 70% off

What “OpenAI compatible” covers here

Last verified: 2026-08-15

Compatibility is endpoint-specific. It does not mean every OpenAI product or provider-native feature is available.

CapabilityStatusWhat to do before cutover
Chat Completions messagesCompatibleRun one non-streaming and one streaming request
GPT, Claude, and Gemini text modelsSame OpenAI clientUse an exact LumeAPI catalog model id
Tool calling and JSON modeModel-dependentReplay your golden prompts and validate parsed output
Images and async videoDocumented separate pathsUse the endpoint shown in /docs
Embeddings, Assistants, provider-native Batch or GroundingNot impliedKeep the official provider until /docs explicitly lists support
On-premise or air-gapped deploymentNot supportedLumeAPI is a managed gateway

The exact three-field migration

Last verified: 2026-08-15

Keep the messages array and Chat Completions call. Change configuration, not application architecture.

FieldBeforeAfter
API keyOfficial provider keyLumeAPI key from Console
Base URLProvider defaulthttps://api.lumeapi.site/v1
Model idProvider model stringExact id copied from /models
Request bodymessages / tools / streamKeep the same shape, then test behavior

Do not append /chat/completions to the SDK base URL; the client appends the route.

Prove the endpoint before configuring an IDE or agent

Last verified: 2026-08-15

bash
curl https://api.lumeapi.site/v1/chat/completions \
  -H "Authorization: Bearer $LUMEAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-terra","messages":[{"role":"user","content":"Reply with pong"}],"max_tokens":16}'

A 401 points to authentication, a 402 to wallet balance, and a model-not-found response to the catalog id. Fix curl before debugging Cursor, LangChain, or an agent framework.

Production cutover checklist

Last verified: 2026-08-15

A compatible response shape is only the first test. Production acceptance needs behavior, latency, and rollback evidence.

  • Smoke test authentication and the exact catalog id with curl
  • Replay golden prompts for text, tools, JSON mode, and streaming parsing
  • Shadow 5–10% of matched traffic without changing prompts or retry policy
  • Compare task success, p95 latency, retries, input tokens, and output tokens
  • Keep the old base URL, key, and model id behind one rollback flag
  • Promote model by model; leave unsupported provider-native features on the official API

OpenAI compatible API — exact match for GSC queries

OpenAI compatible API (also written openai-compatible api or openai sdk compatible) means your client speaks Chat Completions JSON against a custom base URL. LumeAPI exposes GPT, Claude, and Gemini through https://api.lumeapi.site/v1 with the same request shape as OpenAI.

Frameworks that accept openai_api_base—including LangChain, many agent runners, and IDE tools—typically work after you change key, base URL, and model id. Provider-exclusive APIs such as OpenAI Assistants or vendor-native caching are out of scope unless documented in /docs.

Common migration failures are wrong model id, missing /v1 on the base URL, or embedding keys in a public frontend. Fix those first — use GET /v1/models to confirm your catalog id before load tests.

Near-win technical queries (Python streaming, 429 retries) belong on /research/openai-compatible-api-python — this page owns the commercial Owner intent for openai compatible api.

Migrate in minutes

Three values change: API key, base URL, model id. Everything else stays the same.

Before (official OpenAI)

python
from openai import OpenAI

client = OpenAI(api_key="YOUR_OPENAI_API_KEY")

response = client.chat.completions.create(
    model="gpt-5.6-terra",
    messages=[{"role": "user", "content": "Hello"}],
)

After (LumeAPI)

python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_LUMEAPI_KEY",
    base_url="https://api.lumeapi.site/v1",
)

response = client.chat.completions.create(
    model="gpt-5.6-terra",
    messages=[{"role": "user", "content": "Hello"}],
)

Full step-by-step rollout, streaming checks, and FAQ: OpenAI-compatible migration checklist →

Related guides

FAQ

What is an OpenAI compatible API?

It accepts OpenAI Chat Completions JSON at a custom base URL (https://api.lumeapi.site/v1) with Bearer authentication. Your Python or Node OpenAI SDK works when you set base_url / baseURL and a LumeAPI catalog model id.

Is this an OpenAI SDK compatible API?

Yes. openai compatible api, openai sdk compatible, and openai-compatible api are the same integration pattern — three config values change: API key, base URL, model id.

Need Anthropic or Google SDK?

No for standard chat — use OpenAI SDK with catalog ids.

Embeddings or Assistants API?

Check /docs for supported endpoints before migrating.

Streaming works?

Yes — validate partial JSON handling in your client.

Same key for image and video?

Yes. One wallet debits all modalities.

Common migration errors?

Wrong model id, missing Bearer token, or base URL without /v1.

Full API reference?

Start at /docs, then /docs/models/{id}.

How do I change the OpenAI base URL in Python?

Use OpenAI(api_key=LUMEAPI_KEY, base_url="https://api.lumeapi.site/v1") — same Chat Completions body. Full walkthrough: /research/openai-compatible-api-python.

Is openai-api-compatible the same as openai compatible api?

Yes — hyphen and space variants are the same search intent. Change API key, base_url, and model id; keep your SDK.

Can I use LangChain with an OpenAI compatible API?

Set openai_api_base=https://api.lumeapi.site/v1 and your LumeAPI key on ChatOpenAI. Use catalog model ids from /models.

Cursor custom OpenAI endpoint — does it work?

Point Cursor at https://api.lumeapi.site/v1 with your LumeAPI key and a catalog model id. Validate tool use on your repo before full rollout.

openai-compatible api

Hyphen variant — same migration as openai compatible api. See /openai-compatible-api.

openai-совместимый api

Russian search variant — same OpenAI-compatible migration at /openai-compatible-api.

Point your OpenAI client at LumeAPI

Register, create a key, and set base_url to https://api.lumeapi.site/v1. Need help with the three-field swap? See the OpenAI-compatible checklist or contact support.