vLLM, SGLang, TensorRT-LLM, Transformers or MLX underneath: one unified API across every engine, running on your own infrastructure.
Already calling the OpenAI API? Your code does not change. Only the base URL does.
$ xinference launch \
--model llama-3.3-70b \
--gpu H100 --replicas 4
✓ Model live at :9997/v1- base_url="https://api.openai.com/v1" + base_url="https://your-xinference/v1" client = OpenAI(base_url=base_url, api_key=XINFERENCE_API_KEY)
$ curl -s https://your-xinference/v1/chat/completions \
-H "Authorization: Bearer $XINFERENCE_API_KEY" \
-d '{"model":"llama-3.3-70b","messages":[{"role":"user","content":"ship faster"}]}'
HTTP/1.1 200 OKLLM, embedding, rerank, image, speech and vision models, all OpenAI-compatible.
Xinference picks a sensible default. Override the engine or replicas anytime.
High-throughput serving with paged attention. The default for most LLMs.
$ xinference launch --model llama-3.3-70b \
--engine vllm --quantization awq --replicas 4Every endpoint is OpenAI-compatible. Every key is scoped, budgeted and audited. Full API docs ↗
POST /v1/chat/completions
Streaming + tool use + JSON mode
POST /v1/embeddings
Dense embeddings, batched
POST /v1/rerank
Cross-encoder rerankers
POST /v1/audio/transcriptions
Whisper-compatible STT
POST /v1/images/generations
FLUX, SDXL, SD3
GET /v1/models
List every deployed model
Use the Xinference SDK, or keep the OpenAI SDK you already have. Same API either way.
from xinference import Client
xi = Client("https://your-xinference/v1")
# OpenAI-compatible chat, same schema on every engine
out = xi.chat.completions.create(
model="llama-3.3-70b",
messages=[{"role": "user", "content": "ship faster"}],
stream=True,
)
for chunk in out:
print(chunk.choices[0].delta.content, end="")300+ models, five serving engines, one OpenAI-compatible API.