API Reference
Endpoint index. Full JSON schema at gateway.cerver.ai/v2/docs.
Base URL
https://gateway.cerver.ai
Auth header
Authorization: Bearer ck_…
Quick Start
Everything you need to use Cerver as an AI agent.
How Cerver Works
You ask for a session. Cerver finds compute, provisions it, and gives you a session ID. You run code through the session. When done, pause it — come back later with full context. Need more compute? Spawn a child session. You never manage infrastructure.
0. Get an API key
Login with email to get one automatically:
curl -X POST https://gateway.cerver.ai/v2/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@company.com"}'
→ Returns: {"account_id": "acct_...", "api_key": "ck_...", "name": "you"}
1. Create a session
Cerver picks the best available compute. Or specify preferences:
curl -X POST https://gateway.cerver.ai/v2/sessions \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "run tests for my project",
    "session_name": "test-run",
    "requirements": {
      "runtime": "shell",
      "persistence_level": "high",
      "timeout_minutes": 30
    }
  }'
→ Returns:
{
  "session_id": "5d2db690-...",
  "status": "ready",
  "provider": "cerver_local_provider",
  "compute_id": "comp_d9b34ac..."
}
To pin to a specific compute: add "target_compute_id": "comp_...". List available computes with GET /v2/computes.
2. Run code
curl -X POST https://gateway.cerver.ai/v2/sessions/SESSION_ID/run \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code": "npm test"}'
→ Returns:
{
  "session_id": "5d2db690-...",
  "duration_ms": 4523,
  "result": { "stdout": "...", "stderr": "...", "exit_code": 0 }
}
Use /run/stream for streaming output (SSE).
3. Save work — pause
Releases compute but keeps the session (transcript, metadata).
curl -X POST https://gateway.cerver.ai/v2/sessions/SESSION_ID/pause \
  -H "Authorization: Bearer ck_YOUR_KEY"
→ Returns: {"status": "paused"}. Compute is freed. Session record stays.
4. Come back — resume
Re-provisions compute. Can resume on a different machine.
curl -X POST https://gateway.cerver.ai/v2/sessions/SESSION_ID/resume \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
→ Creates a new session linked to the paused one. Returns new session_id.
Get a preview from the paused session: GET /v2/sessions/OLD_SESSION_ID?tail=50. Use ?full=1 only for intentional full transcript downloads.
5. Need more compute — spawn
Create a child session from a running parent. Inherits compute by default.
curl -X POST https://gateway.cerver.ai/v2/sessions/PARENT_ID/spawn \
  -H "Authorization: Bearer ck_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"task": "run tests in parallel", "session_name": "test-child"}'
→ Returns child session with parent_session_id linked to parent.
To spawn on different compute: add "target_compute_id": "comp_...".
6. Clean up — terminate
curl -X DELETE https://gateway.cerver.ai/v2/sessions/SESSION_ID \
  -H "Authorization: Bearer ck_YOUR_KEY"
Releases compute, keeps session record for history.
Requirements reference
runtime"shell", "node", "python"
persistence_level"low", "medium", "high" — how long to keep files
timeout_minutesMax session duration (default 20)
package_installtrue/false — need npm/pip
public_previewtrue/false — need a public URL
Skill
A drop-in instruction set for any AI agent that uses cerver.
view raw download
Install path
~/.claude/skills/cerver/SKILL.md
Claude Code auto-loads from this path. Or drop the markdown into any other agent's system prompt. WebFetch-callable at cerver.ai/skill.md.
Loading skill…
Computes
Your machines and shared providers. Provider integrations (Vercel, E2B, Cloudflare…) live on Vault — they're vault-scoped.
Loading...
Sessions
Active, paused, and past sessions.
Loading...
Runs
Multi-step jobs — each run decomposed into steps, with its own cost and status. A plain chat or one-shot is a session, not a run.
Loading…
Profile
Account identity and quick stats. Opens from the sidebar identity block.
Loading…

This browser's key

The ck_… token this browser tab is using to talk to cerver. Click Show to reveal, Copy to copy, or replace it with another key (e.g. from ~/.cerver/cerver.env). This browser tab only — doesn't create, rotate, or revoke account keys; those live in Vault.

Apps
Group sessions, keys, and (soon) billing under named integrations. An API key bound to an app auto-stamps its sessions, so the App column is trustworthy.
Loading...
UIs
Embeddable front-ends — like a chat — attached to a project. Configure one here and drop it on your site with two lines. An app doesn't need a UI.
Loading...
API keys
Long-lived ck_… tokens that let your machines, apps, and CI talk to cerver. The Label column is just whatever the key was created as — installer-minted keys default to the machine's hostname, dashboard-minted ones say dashboard, etc. Internal sandbox-bootstrap keys are hidden.
Loading...
Environments
Per-app runtime contexts. Each environment binds repos and can override the app's Infisical config. Sessions specify an environment at create time.
Loading…
Vaults
Your Infisical connections. The relay reads provider secrets at runtime — cerver's gateway never stores the values. Add more for work, personal, or different projects; the default is what new cloud sandbox sessions use.
Loading...

Integrations

Drop a missing key into your vault with one click.

Loading...
Secrets cerver looks for 7 well-known names · click to expand

A missing entry only matters if you use the feature it enables.

Secret name What it enables Category
ANTHROPIC_API_KEYClaude models (Opus, Sonnet, Haiku) — sessions using --cli claude --bill api.LLM
OPENAI_API_KEYGPT-5 / Codex CLI sessions, or any direct OpenAI SDK use from the relay.LLM
XAI_API_KEYGrok models. Grok has no subscription mode, so this is the only way to use it.LLM
VERCEL_TOKENVercel Sandbox compute (also requires VERCEL_TEAM_ID + VERCEL_PROJECT_ID).Compute
E2B_API_KEYE2B sandbox compute — longer-running and desktop-capable.Compute
CLOUDFLARE_API_TOKENCloudflare Workers compute (also requires CLOUDFLARE_ACCOUNT_ID).Compute
GITHUB_TOKENClone private repos into the sandbox via cerver run --repo. Public repos work without it.Other

Per-secret status detection (present / missing in YOUR vault) is on the roadmap. The dashboard doesn't have your Infisical credentials — only your relay does.

Usage
Your sessions, sandbox compute, LLM tokens, and what each cost.
Loading…
Spending limit
A monthly cap on what this account can spend. Sessions return 402 at the cap — a runaway agent stops at your number, not at a five-figure invoice.
Loading…
Welcome to cerver
You're in — $5 free tier active, no card. Run your first session right here, right now.
Routing policies
Let cerver pick the best agent, model & compute for each task — within limits you set. Browse community policies →
Loading…

Get started

0 of 3 done

Setup