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.

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.

ModelInOut
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

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" } }.

StatusCodeMeans
401bad_run_keyNo run key, or not a valid one.
402run_closedThe run isn't live.
402not_approvedWaiting for approval. Your own key still works.
402starter_exhaustedThe $50 is spent and the run has fewer than 5 backers.
402backed_exhaustedThe $100 is spent too.
402no_budgetThat model isn't hosted and nothing pays for it yet.
402lease_exhaustedThis milestone's share of the funded budget is used up.
429rate_limitedMore than 60 calls in a minute.
429day_cap$15 of Crowdrun-paid calls today.
503hosted_offThe hosted endpoints are down.