Skip to main content

OpenAI-compatible API

LLMBoost serves the OpenAI REST API on /v1. If your app already talks to OpenAI, migration is a one-line base-URL change — no SDK swap, no rewrite.

Tailor the examples to your setup:

Migrate in one line

from openai import OpenAI

client = OpenAI(
base_url="http://localhost:8000/v1", # ← point at LLMBoost
api_key="not-needed", # local serving needs no key
)

Everything else — chat.completions.create(...), streaming, function calling — stays exactly as you wrote it.

Endpoints

EndpointPurpose
POST /v1/chat/completionsChat (messages in, assistant message out)
POST /v1/completionsRaw text completion
POST /v1/embeddingsEmbeddings (embedding models)
POST /v1/responsesOpenAI Responses API
POST /v1/audio/transcriptions · …/translationsSpeech-to-text (audio models)
GET /v1/modelsList served models
GET /health · GET /metricsLiveness · Prometheus metrics

Chat completion

resp = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V3.2",
messages=[{"role": "user", "content": "Say hello in one word."}],
)
print(resp.choices[0].message.content)

Compatibility notes

  • Standard sampling params pass through: temperature, top_p, max_tokens, n, stop, seed, logprobs, …
  • Streaming ("stream": true), structured outputs, and tool calls are supported — see Streaming, structured output & tools.
  • Drop the Authorization header for local serving, or put LLMBoost behind your own gateway for auth.