pq.io — LLM API

OpenAI-compatible · bearer-gated · https://llm.pq.io

Quick start

Get a bearer token from matthew@pq.io, then:

curl https://llm.pq.io/main/v1/chat/completions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-coder-next",
    "messages": [{"role": "user", "content": "hello"}]
  }'

Swap "model" for any model below. Add "stream": true for SSE.

Chat & agentic models — /main/v1

Two concurrent lanes, each with full 192K context. One request runs at ~28 tok/s; two at once share to ~17 each (decode is RAM-bandwidth-capped — lanes buy concurrency, not more total throughput). A third simultaneous request queues until a lane frees. Decode rates are fresh-context.

qwen3-coder-nextdefault
Qwen3-Coder-Next 80B-A3B — code-specialist, non-thinking. 2 concurrent lanes; MoE experts offloaded to socket-0 RAM.
Context: 192K × 2 lanes Decode: ~28 solo / ~17 dual Compaction fires: ~171K input (89%)

Legacy names qwen3-coder, qwen3.6, qwen3.5 are aliases that all route to qwen3-coder-next (the three separate lanes were retired 2026-09-15).

Utility models — /small/v1

qwen2.5-coder
Qwen2.5-Coder-7B — quick utility lane (summarize, classify, tag, structured JSON).
Context: 32K Decode: ~35 tok/s
bge-m3
Multilingual embeddings (1024-dim).
Input: up to 8K tokens
curl https://llm.pq.io/small/v1/embeddings \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model": "bge-m3", "input": "hello world"}'

OpenCode setup

Drop into ~/.config/opencode/opencode.json. Replace <your-token> with your bearer.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "pq.io": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "pq.io",
      "options": {
        "baseURL": "https://llm.pq.io/main/v1",
        "headers": {
          "Authorization": "Bearer <your-token>"
        }
      },
      "models": {
        "qwen3-coder-next": { "name": "Qwen3-Coder-Next", "limit": { "context": 196608, "input": 188416, "output": 8192 } }
      }
    }
  },
  "model": "pq.io/qwen3-coder-next",
  "compaction": {
    "auto": true,
    "prune": true,
    "reserved": 17000,
    "tail_turns": 2,
    "preserve_recent_tokens": 8000
  }
}

Explicit limit.input is required (upstream bug #13980 silently no-ops reserved without it). The trigger formula is limit.input - reserved — that's where the per-model compaction points above come from.

Other clients

OpenAI SDKOpenAI(base_url="https://llm.pq.io/main/v1", api_key=TOKEN)
Aider--openai-api-base https://llm.pq.io/main/v1 --openai-api-key $TOKEN --model openai/qwen3-coder-next
Cline / Continue / RooOpenAI-compatible provider, model qwen3-coder-next
Advanced — sampling defaults

Per Qwen team recommendations. Already applied server-side; override per-request via standard OpenAI sampling fields.

modeltemperaturetop_ptop_kmin_prepeat_penaltythinking
qwen3-coder-next1.00.95400.01—no