Docs · Quickstart
Get a key. Make a request.
The Krexel API is the same surface the dashboard and the CLI sit on top of. Every dashboard button corresponds to one HTTP call. The full reference is on the API reference page. This page is just the five-minute onboarding.
1Get an API key
You have two paths. Pick one — they produce the same key.
- From the dashboard: sign in at krexel.com/login, then open /keys and click Create key. The plaintext key is shown once and hashed at rest — copy it before closing the dialog.
- From the API: an existing key can mint a new one. Useful for bootstrapping a CI runner from your laptop without opening a browser:
curlcurl -X POST https://api.krexel.com/api/v1/keys \ -H "Authorization: Bearer $YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"CI runner"}'
The plaintext key starts with krx_sk_live_ followed by 44 base62 characters. Store it in a secret manager (1Password, Doppler, GitHub Actions secrets), never in source.
2Make your first authenticated request
The simplest one: ask the API “who am I?”. Confirms your key is live and tells you which plan you're on.
curlcurl https://api.krexel.com/api/v1/me \
-H "Authorization: Bearer $KREXEL_KEY"Response on a healthy key:
json{
"email": "you@example.com",
"plan": "builder",
"is_admin": false,
"deploy_count": 7,
"tour_dismissed": true,
"created_at": "2026-07-01T10:00:00.000Z"
}A 401 means the key is wrong or revoked. A 403 means the request hit a resource that belongs to a different customer.
3Ship a site in one call
The POST /api/v1/deploy endpoint accepts a multipart body: a JSON manifest + the file tree. From curl you can do it in one go:
curl# Build a tar of the site (excluding node_modules, .git, etc.)
tar czf site.tgz dist/
curl -X POST https://api.krexel.com/api/v1/deploy \
-H "Authorization: Bearer $KREXEL_KEY" \
-F 'manifest={"name":"my-site","framework":"next"};type=application/json' \
-F 'file=@site.tgz;type=application/gzip'Response (201) on success:
json{
"deploy_id": "krx_d_a3f1b8c92e4d",
"status": "queued",
"preview_url": "https://my-site.krexel.pages.dev"
}The build is asynchronous — poll GET /api/v1/deploys/:id or stream /api/v1/deploys/:id/stream for live progress. Status hits ready or error within ~30-60s for typical static sites.
4Edit the live site without a full rebuild
Once a deploy is live, use POST /api/v1/deploy/patch to mutate the file tree in place. A patch weighs 0.1 against the monthly quota; a full deploy weighs 1.0. If your AI edits 10 files for a single prompt, you ship one patch instead of 10 full deploys.
curlcurl -X POST https://api.krexel.com/api/v1/deploy/patch \
-H "Authorization: Bearer $KREXEL_KEY" \
-H "Content-Type: application/json" \
-d '{
"parent_deploy_id": "krx_d_a3f1b8c92e4d",
"ops": [
{"op":"replace","path":"index.html","content_base64":"PGgxPi..."},
{"op":"replace","path":"about.html","content_base64":"PGgyPi..."}
]
}'Three ops are supported: replace, replace_all, delete. Each patch is itself a deploy — poll the returned deploy_id to confirm it's ready.
5Or use an SDK
Three opinionated ways to skip writing the boilerplate:
- JS / TS:
npm install krexel— wraps fetch with retry, types, and pagination helpers. The dashboard uses it internally. - Python:
pip install krexel— same API, sync + async clients, returns typed records. - MCP:
krexel mcp installwires the Krexel tools into Claude Code, Cursor, or Windsurf so your AI can deploy + patch directly. The CLI is the MCP server.
Whichever path you pick, the underlying HTTP shape is the same — every SDK calls the endpoints listed in /docs/api.
What to read next
- The full API reference — every endpoint grouped by domain.
- Connect a custom domain — what to point your CNAME at.
- The blog — specific “how we ship from X” walk-throughs.