Skip to content

API

The HTTP API exposes recipe validation, preview, cost estimation, generation jobs, catalogs, PDF jobs, result downloads, credit purchases and voucher redemption. Authentication, schemas and error responses are defined by the live OpenAPI contract.

Recipes use GBDDL text (text/plain) or canonical JSON (application/json). The same business rules and credit prices apply to Chef, API and MCP.

Canonical JSON recipes

Set the required input_format query parameter to gbddl for GBDDL text or json for the canonical model. Content-Type does not select the input format. Inference (/api/v1/gbddl/infer) is the exception: there input_format names the sample, json, csv or tsv, and the response is GBDDL text, which can be submitted with input_format=gbddl. The API receives the sample sent by the caller; see sample import for limits and private samples for what the server sees and keeps.

The canonical JSON Schema describes the structural contract. The downloadable JSON example is equivalent to the customers recipe in the documentation overview. Both links are also available from the public /api/v1/reference response as recipe_schema and recipe_example. Semantic rules and current limits are checked by /api/v1/gbddl/validate?input_format=json.

Limits

The public /api/v1/reference response carries the effective limits as limits, read from the live settings; the MCP reference tool returns the same object with section=limits. The values below were current when this page was built:

These are maximums a request may ask for, not guaranteed capacity. A request is also bound by its credit cost and the account balance.

Limit Value
Tables per recipe 50
Columns per recipe 400
Cells per job (rows × columns) 1,000,000,000
Embed nesting depth 3
Recipe document 512 KiB
Request body 10 MiB
Inference sample 1 MiB
Inference sample rows 20
Client JSON sample 16 MiB
Uploaded lists per request 20
Uploaded lists, together 1 MiB
One uploaded list 1 MiB
Result of one job 20 GiB
Preview rows per table 5
Largest recipe a preview accepts 1,048,576 cells
PDF pages per job 1,000
Job run time 1 hour
Result kept for 3 days
Download link valid for 1 hour
Stored results per account 50 GiB
Requests per second per address 30, bursts of 60
Format Rows per table Columns Result size
csv 1,000,000,000 600 20 GiB
gdpdu 1,000,000,000 600 20 GiB
json 50,000,000 600 10 GiB
jsonl 1,000,000,000 600 20 GiB
parquet 1,000,000,000 600 20 GiB
pdf 50,000 64 1 GiB
sql 100,000,000 600 10 GiB
tsv 1,000,000,000 600 20 GiB
xlsx 1,000,000 600 2 GiB
xml 50,000,000 600 10 GiB
yaml 1,000,000 256 2 GiB

Creating an account

GET /api/v1/auth/challenge returns an ALTCHA proof-of-work challenge. Solve it and send the solution as altcha to POST /api/v1/auth/signup with {"email":"...","password":"...","altcha":"...","voucher":"GB-WELCOME30"}. The voucher field is optional. Passwords must be at least 15 characters; addresses at disposable email providers and known-breached passwords are refused.

A successful signup answers HTTP 201 with {"email":"...","verify_message":"Check your inbox for next steps."}. The response is identical whether the address was new or already registered, so it cannot reveal an existing account: the owner of an already-registered address receives a "log in or reset your password" mail instead. The signup bonus is not granted yet — it is granted when the address is verified.

If supplied for a new account, the voucher is attempted after email verification and the signup bonus. An invalid or ineligible voucher does not fail signup or email verification.

Verifying an email address

The signup mail carries both a verification link and a six-digit code; either confirms the address within 24 hours and each can be used once.

  • GET /api/v1/auth/verify-email?token=... renders a small confirmation page without consuming the token, so a mail scanner that only fetches the link does not use it up. The token is consumed when the page's form posts it back.
  • POST /api/v1/auth/verify-email consumes the token or the code. Send {"token":"..."} (from the link) or {"email":"...","code":"123456"} (the six-digit code). Success returns {"message":"Email verified successfully. You can now log in."} and grants the one-time signup bonus. A wrong, expired or already-used token or code answers HTTP 400.

Password login and MFA

POST /api/v1/auth/token returns {"token":"<session JWT>"} when authentication is complete. If a second factor is required, it returns {"mfa_required":true,"mfa_token":"<challenge>"} with no token. Send the challenge as mfa_token with a six-digit TOTP code to POST /api/v1/auth/token/mfa; successful completion returns token containing the session JWT. The MFA challenge is not a bearer credential; use the resulting session JWT or a separately issued API key. A rejected or incomplete challenge grants no session.

Lost the device with the authenticator app? Send the same mfa_token to POST /api/v1/auth/token/mfa/reset. The account's address receives a single-use link, valid for one hour, that opens Chef and turns two-factor authentication off; it also signs out every session. The request needs a working password (through the challenge) and access to the inbox. Because a password can also be reset by email, this path protects against a leaked password, not against someone who controls the inbox. Chef offers the same link on its code step.

Buying credits

GET /api/v1/billing/packs lists the credit packs with their ids, credits and tax-included reference prices, whether purchases are open, and max_quantity. It needs no authentication.

POST /api/v1/billing/checkout with {"pack_id":"<id>","quantity":2} creates an order and returns order_id, checkout_url, credits and expires_at. Any login or API key may call it; it charges nothing. Give checkout_url to a person, who pays in the browser within 24 hours. GET /api/v1/billing/orders/{id} returns the order's status: pending until the payment is confirmed, then completed once the credits are granted, or expired when the link lapsed unpaid.

A refused purchase answers 503 while purchases are closed, 403 while a chargeback on the account is open, 422 for a quantity outside 1–max_quantity, and 404 for an unknown pack.

Redeem a voucher

POST /api/v1/vouchers/redeem redeems a voucher for the authenticated account. It requires a user session JWT and a verified email address; API keys receive HTTP 403. Send {"code":"GB-WELCOME30"}. Codes are case-insensitive and tolerate hyphens and spaces. A successful HTTP 200 response contains voucher_id, amount, expires_at and redeemed_at. The grant expires at expires_at.

Quote responses include balance (the total across credit buckets), voucher_balance and voucher_expires_at (the nearest expiry of remaining voucher credits, or null).

HTTP status Error code Meaning
400 invalid_voucher_code The voucher code is not recognized or is malformed.
401 — User credentials are missing or invalid.
403 email_not_verified The account email is not verified.
403 voucher_not_eligible The account is not eligible for this voucher.
409 voucher_not_started Redemption has not opened yet.
409 voucher_used_up The voucher has no redemptions remaining.
409 voucher_already_redeemed This account already redeemed this voucher.
409 voucher_campaign_redeemed This account already redeemed a voucher in this campaign.
410 voucher_expired The redemption period has ended.
410 voucher_revoked The voucher has been revoked.
422 — The request body is invalid.
429 voucher_rate_limited Too many redemption attempts.
500 internal_error Redemption could not be completed.

API keys and scopes

Create an API key in Chef under Account → API keys, then send it as Authorization: Bearer <API_KEY>. Keys expire, can be revoked, carry explicit scopes and have a credit-spending cap. Account, MFA and key-management operations require an interactive login.

Capability Required key scope
Recipe validation, formatting, preview and generation; PDF quotes/jobs generate
Job status and download jobs:read
Read saved recipes recipes:read
Create, update, delete or infer recipes recipes:write
Catalog quotes and exports catalog:read

Voucher redemption is a user-token action and is not available to API keys.

Reference discovery (GET /api/v1/reference), catalog discovery (GET /catalog) and recipe schemas are public.

Generate and download

  1. Send the recipe to POST /api/v1/gbddl/validate?input_format=gbddl (or json). Validation is free. Inspect errors even on HTTP 200; a valid result includes cost, column weights and balance.
  2. Use POST /api/v1/gbddl/preview with the same required input_format to inspect sample rows for free. Previews and sample inferences share a queue: usually the answer is HTTP 200 with the rows. When the queue is busy it is HTTP 202 with a Location header (GET /api/v1/previews/{id}, or GET /api/v1/inferences/{id} for an inference) and Retry-After: poll it until it answers 200. HTTP 503 with Retry-After means the service is busy and nothing was stored; send the request again later.
  3. Submit to POST /api/v1/jobs?input_format=gbddl with the same recipe and mandatory X-Max-Cost header set to the maximum credits you accept. The server recomputes the cost and refuses it above the ceiling without charging. A new job answers HTTP 202 with job_id, status, cost, charged, outcome and message.
  4. Poll GET /api/v1/jobs/{id} until completed or failed. Status includes progress, any job error, expires_at and downloadable.
  5. Download via GET /api/v1/jobs/{id}/download. It checks ownership and may redirect to a temporary signed URL. Keep credentials on the API request; do not forward them to a different download host.

Repeats and retries

A finished result is kept for the result lifetime, three days by default. Sending the same recipe again is safe: when one of your jobs with the same recipe, uploaded lists and output is queued, running or still stored, the API returns that job with HTTP 200, reused: true, outcome: "reused" and charged: 0. Nothing is generated or charged, at any balance. The match is on the canonical recipe, so formatting changes and GBDDL versus canonical JSON do not matter, while any change to the recipe, the uploads or the output format does. With several matches the newest is returned.

  • regenerate=true asks for new data: a new paid job with fresh randomness (outcome: "regenerated"). The earlier result stays until its own expiry, so both can be listed and downloaded.
  • Once no matching result is stored, the request generates and charges again, bounded by X-Max-Cost, with outcome: "recharged" and a message saying the earlier result is no longer stored.
  • recipe_id=<id> records the saved recipe a run comes from, for listing; it must be one of yours.
  • PDF jobs follow the same rules, matched on language and pages.
  • Catalog extracts follow them too: each export is stored as a job (journey: "catalog"), and the same request returns the stored file free; see catalogs.

Job lifecycle and held jobs

A job is queued, then processing, then completed, failed or held.

  • A failure caused by the input is final: the status is failed, the credits are refunded under the credit refund rules, and the uploaded lists are deleted. This covers a recipe that does not validate or decode, a list that does not parse, and an output over a ceiling.
  • A failure caused by us is tried again automatically, up to the attempt limit. A timeout, or an attempt that keeps failing, ends in held. The error field says why.
  • A held job keeps its credits and your recipe and uploaded lists. hold_expires_at is the deadline (24 hours by default). POST /api/v1/jobs/{id}/retry queues the same job again at no charge (503 with Retry-After during maintenance); POST /api/v1/jobs/{id}/cancel gives up: the credits are refunded once under the credit refund rules, and the lists are deleted. Sending the same recipe and lists again also resumes the held job instead of charging a second time.
  • If you do neither before hold_expires_at, the job is cancelled as if you had given up.

Your uploaded lists are therefore deleted when the job completes, fails for good, is cancelled, or its hold ends. A job that is not held answers 409 to retry and cancel.

Maintenance and status notices

During maintenance, a request that would create a new paid job (a new recipe, regenerate=true, a PDF or a catalog export) answers HTTP 503 with Retry-After and charges nothing; sending the same request after the window is safe. A request that matches a job you already have is still answered with that job, and jobs already queued or running finish. Sign-in, validation, previews, inference and reading jobs keep working. GET /api/v1/reference carries the current notices in status: banner (message and level: info, warning or incident) when the operators published one, and maintenance_since while maintenance is on.

List jobs

GET /api/v1/jobs (scope jobs:read) lists your jobs newest first. Each item carries status, cost, output_format, size, recipe_id, created_at, expires_at and downloadable; expired means the result is no longer stored. Filter with status, recipe_id and stored=true, page with limit (up to 100) and the returned next_cursor as cursor. The response also reports storage.used_bytes against storage.max_bytes: each account keeps up to that many bytes of results, and a new result that would exceed it deletes the account's oldest results first.

Use POST /api/v1/gbddl/format to format text or convert canonical JSON to GBDDL. Saved recipe CRUD lives at /api/v1/recipes and /api/v1/recipes/{id}. Sample import, uploads, catalogs and PDF describe their separate contracts.