API
One base URL, one key.
OpenAI-compatible. Your run pays.
Connect
The key is on your run's dashboard, under API. It goes in as the bearer token, or in an X-Crowdrun-Key header.
base_url = "https://api.crowdrun.ai/v1" api_key = "cr_live_…"
from openai import OpenAI
client = OpenAI(base_url="https://api.crowdrun.ai/v1", api_key="cr_live_…")
r = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4.1-Flash",
messages=[{"role": "user", "content": "Hello"}],
max_tokens=800,
)
print(r.choices[0].message.content)
curl https://api.crowdrun.ai/v1/chat/completions \
-H "Authorization: Bearer cr_live_…" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-ai/DeepSeek-V4.1-Flash","messages":[{"role":"user","content":"Hello"}]}'
Chat completions
POST /v1/chat/completions. The request and the reply are the OpenAI shape, streaming included ("stream": true; usage arrives in the last chunk). The model field picks the model on every call.
- A hosted model, one of the ids
GET /v1/modelslists with"owned_by": "crowdrun", runs on Crowdrun's own endpoints and is paid from your run. - Any other model id is forwarded to OpenRouter under that name, paid from the backed budget once it's open, or by your own OpenRouter key.
Two headers come back on every call: X-Crowdrun-Run, the run it was charged to, and X-Crowdrun-Paid-By: starter, backed, launch, crowd or builder.
Models
GET /v1/models. Crowdrun's hosted models come first, each with pricing.prompt and pricing.completion in dollars per token; OpenRouter's list follows.
| Model | In | Out |
|---|---|---|
| deepseek-ai/DeepSeek-V4.1-Flash | $0.30 | $1.20 |
| deepseek-ai/DeepSeek-V4.1-Flash-1017 | $0.25 | $1.00 |
| zai-org/GLM-5.3-Flash | $0.45 | $1.50 |
| zai-org/GLM-5.3 | $1.40 | $4.40 |
| nvidia/GLM-5.3-Flash-NVFP4 | $0.15 | $0.50 |
| thinkingmachines/Inkling-NVFP4 | $1.20 | $5.00 |
| moonshotai/Kimi-K3 | $3.00 | $15.00 |
| meta-models/Muse-Spark-Open-816B-A42B | $1.25 | $4.25 |
| Qwen/Qwen3.8-2.4T-A95B | $2.00 | $6.00 |
| Qwen/Qwen3.8-Max-VL-Thinking | $2.00 | $6.00 |
Per million tokens. Kimi K3 and DeepSeek Flash 1017 reason before they answer, so give them a few hundred tokens of room or the reply comes back empty.
Who pays
- Starter: $50 on every approved run, hosted models only.
- Backed: $100 more once the run has 5 backers, on any model.
- Crowd: once the run funds, the pledged budget, a quarter per milestone.
- Builder: send your own OpenRouter key as the bearer token and you pay, Crowdrun meters.
Two brakes on Crowdrun-paid calls: 60 calls a minute per run, and $15 a day per run, resetting at midnight UTC.
Balance
GET /v1/balance says where the run stands. GET /v1/usage is the same.
{
"run": "hollow-keep", "state": "live", "approved": true,
"starter": { "usd": 50, "used": 0.13, "left": 49.87, "models": "hosted" },
"backed": { "usd": 100, "used": 0, "left": 0, "open": false, "backers": 0, "opens_at": 5, "models": "any" },
"crowd": { "released_usd": 0, "used": 0, "left": 0 },
"today": { "crowdrun_paid": 0, "cap": 15, "resets": "midnight UTC" },
"limits": { "calls_per_minute": 60 },
"builder_paid_all_time": 0,
"hosted_models": ["deepseek-ai/DeepSeek-V4.1-Flash", "…"]
}
Spend the gateway can't see
A render, an image, speech: POST /v1/usage with the run key and no other key, and it lands on the run's chart like a chat call.
{ "cost": 0.42, "label": "render" }
{ "gpu_seconds": 90, "label": "matte" }
Errors
Errors are JSON: { "error": { "message", "code", "type": "crowdrun" } }.
| Status | Code | Means |
|---|---|---|
| 401 | bad_run_key | No run key, or not a valid one. |
| 402 | run_closed | The run isn't live. |
| 402 | not_approved | Waiting for approval. Your own key still works. |
| 402 | starter_exhausted | The $50 is spent and the run has fewer than 5 backers. |
| 402 | backed_exhausted | The $100 is spent too. |
| 402 | no_budget | That model isn't hosted and nothing pays for it yet. |
| 402 | lease_exhausted | This milestone's share of the funded budget is used up. |
| 429 | rate_limited | More than 60 calls in a minute. |
| 429 | day_cap | $15 of Crowdrun-paid calls today. |
| 503 | hosted_off | The hosted endpoints are down. |