// api

3 API surfaces on one port.

// api surface

Endpoints reference

GET /v1/models List available models with detected capabilities
GET /v1/models/{id} Single-model lookup with full metadata
POST /v1/chat/completions Chat completion — streaming + non-streaming, think / thinking_budget
POST /v1/completions Text completion
POST /v1/embeddings Generate embeddings — batched, auto-chunked
POST /v1/rerank Rerank documents (llama.cpp only — 501 elsewhere)

// api in action

Real requests, real responses

Chat completion

OpenAI-compatible. Drop in OPENAI_API_BASE=http://localhost:11430/v1 and call from any OpenAI SDK.

POST /v1/chat/completions bash
curl http://localhost:11430/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen3:8b:4bit",
    "messages": [
      {"role": "user", "content": "Why is Rust good for inference servers?"}
    ],
    "stream": true
  }'
First SSE chunk json
data: {
  "id": "chatcmpl-...",
  "object": "chat.completion.chunk",
  "model": "qwen3:8b:4bit",
  "choices": [{
    "index": 0,
    "delta": { "role": "assistant", "content": "Zero-cost" },
    "finish_reason": null,
    "logprobs": null
  }]
}

Thinking model with budget cap

Reasoning streams live up to thinking_budget, then the final answer streams with reasoning frozen — reasoning_content and content stay separate.

POST /v1/chat/completions bash
curl http://localhost:11430/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen3.5:4b:4bit",
    "messages": [{"role": "user", "content": "Prove the Pythagorean theorem."}],
    "think": true,
    "thinking_budget": 4096,
    "stream": true
  }'

Embeddings (auto-batched)

Inputs over embed_batch_size are auto-chunked across multiple engine calls; usage.prompt_tokens and indices are re-merged transparently.

POST /v1/embeddings bash
curl http://localhost:11430/v1/embeddings \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen3-embed:0.6b:4bit",
    "input": ["doc one", "doc two"]
  }'
Response json
{
  "object": "list",
  "model": "qwen3-embed:0.6b:4bit",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.012, -0.034, ...] },
    { "object": "embedding", "index": 1, "embedding": [0.045, 0.018, ...] }
  ],
  "usage": { "prompt_tokens": 6, "total_tokens": 6 }
}

What can this model do?

Detected capabilities ride along on /v1/models — and stay current after upgrades thanks to detector self-heal.

GET /v1/models bash
curl -s http://localhost:11430/v1/models \
  | jq '.data[] | {id, capabilities}'
Excerpt json
{
  "id": "qwen3.5:4b:mtp:4bit",
  "capabilities": {
    "chat": true,
    "thinking": true,
    "mtp": true,
    "vision": false,
    "embeddings": false
  }
}

Warm a model from your app's startup

Idempotent — no-op if the model is already resident. Load progress streams on GET /lf/status/stream (SSE).

POST /lf/model/switch bash
for m in qwen3.5:4b:4bit qwen3-vl:2b:4bit qwen3-embed:0.6b:8bit; do
  curl -sS -X POST http://localhost:11430/lf/model/switch \
    -H 'Content-Type: application/json' \
    -d "{\"model\":\"$m\"}"
done

// model catalog

Curated shortcuts

A sample of the 130+ entry curated catalog. Each shortcut resolves to the right artifact for your engine — MLX on Apple Silicon, GGUF elsewhere — and you can always paste a Hugging Face repo directly.

ShortcutRoleWhy pull it
qwen3.5:9b:4bitchat · thinkingflagship quality that fits consumer GPUs
qwen3:8b:4bitchat · thinkingsolid all-rounder, the 5-minute-eval default
gemma3:12b:4bitchatstrong general chat at 12B
qwen3:4b:thinking:4bitreasoningnative reasoning — think control locked on
phi4:4b:reasoning:4bitreasoningcompact dedicated reasoner
qwen3.5:4b:mtp:4bitchat · MTPspeculative decoding — higher tokens/sec
qwen3-vl:2b:4bitvisionimage chat — URL or base64 inputs
qwen3-embed:0.6b:8bitembeddingsRAG building block, batched /v1/embeddings
qwen3-reranker:0.6b:8bitrerank/v1/rerank for retrieval pipelines
🧠

Phoenix

Ready when you are

Hey! I'm Phoenix — I know Titas's work, projects, and experience. Ask me anything — from distributed systems to production RAG, or what it's like building at Tesco and VMware.