Connect to the Prefill Systems API
The gateway exposes an OpenAI-compatible chat completions API. Examples below work as-is once you replace the YOUR_API_KEY literal with a key from your dashboard.
Base URL
All endpoints below are relative to this base. The same origin serves this website and the API.
1 · Get access
Access is invitation-only during the pilot. Once an administrator invites you, open the invitation link, set a password, and sign in to the dashboard.
2 · Create an API key
In the dashboard → API keys, create a key and give it a name you will recognize in usage records. The raw key is shown once — copy it somewhere safe, because only a hashed form is stored and it can never be retrieved again. You can create several keys (for example one per environment) and revoke any of them at any time. Revocation takes effect immediately.
3 · Make a request
Non-streaming chat completion:
curl https://prefillsystems.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.8-27b",
"messages": [
{"role": "user", "content": "Say hello in one short sentence."}
]
}'Streaming (SSE) — add "stream": true and use -N so tokens arrive as they are generated:
curl -N https://prefillsystems.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.8-27b",
"stream": true,
"messages": [
{"role": "user", "content": "Write a haiku about tokens."}
]
}'Python with the official OpenAI SDK — point it at our base URL:
from openai import OpenAI
client = OpenAI(
base_url="https://prefillsystems.com/v1",
api_key="YOUR_API_KEY", # replace with your dashboard key
)
response = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[{"role": "user", "content": "Explain prefill in one sentence."}],
)
print(response.choices[0].message.content)
# usage is reported per request:
print(response.usage)Token usage
Every response reports usage with prompt_tokens and completion_tokens; cached prompt tokens are reported separately when the backend provides them. Your dashboard shows the same numbers from gateway-side accounting.
Errors
Errors are JSON with a human-readable detail field:
| Status | Meaning |
|---|---|
| 400 | Malformed request body (for example, missing messages) |
| 401 | Missing or invalid bearer key |
| 404 | Unknown model — the gateway serves only qwen/qwen3.8-27b |
| 413 | Request body exceeds the configured size limit |
| 429 | Capacity — retry after a short delay; tracked separately from availability |
| 503 | No healthy backend available — check the status page |
Operational notes
- Zero data retention: no persistent prompt or completion storage. Transient in-memory prompt caching supports efficient inference. See the data policy.
- Metadata accounting: request id, timestamps, model, token counts, status, timing, and charge are recorded per request for your usage view and for operations.
- Keys are per-account. A key can only be used by the account that created it, and usage is attributed to that account and key.
- No SLA. This is an invitation-only pilot; if you depend on availability, monitor the status page or wait for the production service.
- OpenRouter: once our OpenRouter integration is approved and live, consumers will reach the same gateway through OpenRouter. That channel is planned, not yet available.
Data policy & legal
Read the data policy, privacy policy, and terms of service for details.