Chat completions
POST /v1/chat/completions — OpenAI-compatible chat inference.
Models
List available MLX models and memory tiers.
Headers
Malibu-specific request and response headers.
Usage object
Token counts, cached prompt tokens, billing fields.
Network stats
Pool size, routing weights, live network metrics.
Endpoint
Request body
Standard OpenAI shape:Request headers
Response body
Standard OpenAI shape:cached_prompt_tokens.
Response headers
Full reference: Headers.
Streaming
Setstream: true and consume Server-Sent Events. Each data: line is a JSON chunk with a partial delta:
Errors
Errors follow OpenAI’s error shape: