BlizGPT
Docs

Local AI for BlizCloud apps

Language models on BlizCloud's own hardware, behind an API every OpenAI client already speaks. Nothing an app sends is written anywhere, and a private app's data never leaves the cluster.

OpenAI-compatibleChat completions, streaming, tools, JSON answers, pictures in, and embeddings.
Private by defaultA private app's request is only ever sent to nodes inside the cluster.
Nothing is keptCounts only: the app, the model, tokens, milliseconds, an error's code.

Ask it something

An app's server asks, with the app's key, from inside the cluster: the API is not reachable from outside (through the public address only the admin page answers, behind BlizSSO). The base URL (the service's address inside the cluster) and the key come from the app's environment (BLIZAI_URL, BLIZAI_KEY).

curl "$BLIZAI_URL/chat/completions" \
  -H "Authorization: Bearer $BLIZAI_KEY" -H "Content-Type: application/json" \
  -d '{"model": "smart", "messages": [{"role": "user", "content": "Hvad er hovedstaden i Danmark?"}]}'

Any OpenAI client library works with a new base URL:

from openai import OpenAI
client = OpenAI(base_url=os.environ["BLIZAI_URL"], api_key=os.environ["BLIZAI_KEY"])
answer = client.chat.completions.create(model="smart", messages=[{"role": "user", "content": "Hej!"}])
vectors = client.embeddings.create(model="embed", input=["en tekst", "en anden"])

The whole API is in /openapi.json: chat completions (also streaming, tools, JSON answers, pictures in), embeddings, the models, jobs for work that can wait, and an app's own queue and counts.

Ask for a kind of model, not a machine

An app names an alias, or a model by its id. The model behind an alias can change (when a GPU is added, when a better model arrives); the answer's model field and the header x-blizai-model say which model answered. The first candidate that a node this request may use can run wins.

AliasCandidates, best first
fastgemma-4-e4b-it
smartgemma-4-26b-a4b-it → gemma-4-12b-it
visiongemma-4-26b-a4b-it → gemma-4-12b-it → gemma-4-e4b-it
ultragemma-4-31b-it → gemma-4-26b-a4b-it
codeqwen3.8-flash-next → gemma-4-26b-a4b-it
rogueqwen3.8-27b-uncensored
rogue-codeqwen3.8-flash-next-uncensored → qwen3.8-27b-uncensored
embedbge-m3
transcribeedda-v0.2 → whisper-large-v3-turbo
ModelWhat it isCanContext (tokens)Licence
bge-m3BGE-M3 (Q8)embeddings, 1024 numbers8,192MIT
edda-v0.2Edda v0.2 (Whisper large-v3-turbo trained on Danish, Q5)speech to text448Apache-2.0
gemma-4-12b-itGemma 4 12B (QAT, 4-bit)chat, tools, JSON answers, pictures16,384Apache-2.0
gemma-4-26b-a4b-itGemma 4 26B A4B (QAT, 4-bit)chat, tools, JSON answers, pictures16,384Apache-2.0
gemma-4-31b-itGemma 4 31B (QAT, 4-bit)chat, JSON answers, pictures16,384Apache-2.0
gemma-4-e4b-itGemma 4 E4B (QAT, 4-bit)chat, tools, JSON answers, pictures16,384Apache-2.0
qwen3.8-27b-uncensoredQwen3.8 27B Uncensored (orcarouter, abliterated; bartowski Q4_K_M)chat, JSON answers, pictures16,384Apache-2.0
qwen3.8-27bQwen3.8 27B (Q4_K_M)chat, JSON answers, pictures16,384Apache-2.0
qwen3.8-flash-next-uncensoredQwen3.8 Flash-Next 180B abliterated v2 (huihui-ai; unsloth UD-Q4_K_XL)chat, JSON answers32,768Qwen Community License 1.0
qwen3.8-flash-nextQwen3.8 Flash-Next 180B (UD-Q4_K_XL)chat, tools, JSON answers32,768Qwen Community License 1.0
whisper-large-v3-turboWhisper large-v3-turbo (Q5)speech to text448MIT

GET /v1/models says what each alias means for your key right now, and whether it is loaded.

These models can think before they answer. Here they do not unless you ask: "reasoning_effort": "low" (or medium, high) turns it on, the answer then also has reasoning_content, and the thoughts count toward max_tokens. On CPUs thinking costs many seconds; leave it off for an answer someone waits for.

Embeddings from two models cannot be compared. Keep the answer's model with an index and make the index again when it changes, or ask for the model by id instead of embed.

A key and its privacy class

A key is <app-id>.<secret> and belongs in a server or a headless node, never in a phone or a web page. BlizGPT keeps only its SHA-256. Every app has a privacy class:

ClassWhat it means
private (the default)The app's data is only ever sent to nodes inside the cluster, whatever the alias and whatever else is free; if none can serve it the answer is 503 no_private_capacity. Never answered through the public address, whatever the service's settings: there Cloudflare ends the TLS and could read what passes.
standardThe data may also be served by a remote backend where an alias has one. One request can ask for more with X-BlizAI-Privacy: private.

Any key that comes through the public address gets 403 private_route_required. An app's own users (a phone) never ask BlizGPT directly: they ask the app's server, which asks here. (A service can be set to answer standard keys there, BLIZAI_PUBLIC_API=1; BlizCloud's is not.)

For both classes a prompt, a picture, an answer or an embedding is never written to a log, a trace, a file or a database. What is kept is counts: the app, the model, tokens, milliseconds, an error's code.

Speech to text

POST /v1/audio/transcriptions is OpenAI's: a form with file (a WAV file of 16-bit PCM; 16 kHz mono is what the model hears, so send that; at most 25 MB and 15 minutes), model (transcribe), and if you like language (da), prompt (names and words to expect) and response_format (json, verbose_json with the time of each part, or text).

curl "$BLIZAI_URL/audio/transcriptions" -H "Authorization: Bearer $BLIZAI_KEY" \
  -F model=transcribe -F language=da -F [email protected]

GET /v1/audio/stream is a WebSocket for sound as it is spoken: a start message, then 16 kHz mono 16-bit PCM in pieces, and the text comes back while it is said (partial) and for good at each pause (final). The messages are in /openapi.json.

The sound is held in memory while it is turned into text, and nowhere after. What is counted is its seconds.

Waiting, and work that can wait

A loaded model answers a few requests at once; the rest wait their turn, fairly between apps. A streaming request is told where it is with comment lines (: queued 3, : loading) that OpenAI clients skip. X-BlizAI-Max-Wait: 30 bounds the wait (then 503 queue_timeout with Retry-After); closing the connection cancels.

X-BlizAI-Priority: batch marks work that can wait: it runs when nobody waits for an answer. POST /v1/jobs hands over up to 1000 requests at once, to run now or in the night. Because nothing is written anywhere, a job and its answers live in memory only: they are gone 24 hours after it finished, when it is deleted, and when the service restarts. A job must be safe to send twice.

Errors

OpenAI's shape: {"error": {"message", "type", "code", "param"}}. 429 and 503 carry Retry-After. The message never repeats anything from the request.

StatusCodeWhen
400invalid_requestThe request is not valid.
400context_length_exceededThe messages are longer than the model's context.
400capability_not_supportedThe model cannot do what the request asks of it.
401unauthorizedA valid key is required.
403https_requiredPlain http is not accepted.
403private_route_requiredThe API is only reachable inside the cluster, not through the public address.
403model_not_allowedThis key may not use that model.
403sealed_requiredThrough the public address the body must be sealed to the service's key.
403scope_not_allowedThis token may not use that route.
403forbiddenNot allowed.
403learning_offThe learning layer is switched off for this app.
404model_not_foundNo such model or alias.
404job_not_foundNo such job. Jobs are kept in memory only: send it again.
404learning_item_not_foundNo such learning item for this app (and subject).
404not_foundNot found.
405method_not_allowedMethod not allowed.
409learning_fullThe learning layer's limit is reached: delete items first.
413request_too_largeThe request is too large.
415unsupported_audioThe sound must be a WAV file of 16-bit PCM.
429device_rate_limitedThis device's allowance is used up.
429rate_limitedThe app's requests a minute are used up.
429queue_fullToo many requests are waiting.
500internal_errorSomething went wrong in the service.
502upstream_errorThe model's runtime failed.
503no_capacityNo node can run this model now.
503no_private_capacityNo node inside the cluster can run this model now, and the request is private.
503queue_timeoutThe request waited too long in the queue.
503learning_unavailableThe learning layer is not set up here, or its store cannot be reached now.
504timeoutThe model did not finish in time.

Testing an app against it

With the fake runtime (BLIZAI_FAKE_NODE=1) no model is loaded and nothing leaves the machine. The answer is fake(<model>): and the last user message, or exactly the text after [[say: … ]] in it, so a test can make it answer anything. [[fail:<code>]] makes it fail and [[wait:<ms>]] makes it wait. Embeddings are a unit vector made from a hash of the text.