Built for agents
How to point an AI agent or coding assistant at the Flambe API.
A large share of the traffic to these docs is not human. This section is the short version of everything an agent needs.
Three ways in
MCP server
Connect a client to docs.flambe.dev/api/mcp and search the docs as tools.
Plain-text context
llms.txt, llms-full.txt, and .md for any page.
OpenAPI spec
The complete contract for all 131 operations — the same document the API
itself serves at api.flambe.dev/openapi.json.
The fastest possible orientation
https://docs.flambe.dev/llms.txt # index of every page
https://docs.flambe.dev/llms-full.txt # the entire corpus, one file
https://docs.flambe.dev/openapi.yaml # the API contract
https://docs.flambe.dev/openapi.json # same, as JSONAppend .md to any docs URL for its Markdown source. The site also honours
content negotiation — send Accept: text/markdown and you get Markdown back
from the canonical URL.
curl -H 'Accept: text/markdown' https://docs.flambe.dev/docs/guides/imports
# or
curl https://docs.flambe.dev/docs/guides/imports.mdThe eight things that actually trip agents up
Most integration failures against this API come from the same handful of assumptions. If you read nothing else:
- Imports are asynchronous.
POST /api/importsreturns201withstatus: "pending"and no recipe. Poll the import or subscribe to the event stream. See Imports. mediaandimage_batchare different.mediareads several images as one recipe;image_batchtreats each image as its own. Picking wrong collapses unrelated photos into one garbled recipe.- The 401 message matters.
Access token requiredmeans the header was never sent — refreshing cannot help and retrying loops forever.Invalid or expired tokenis the one worth a refresh. See Authentication. - Delta sync has a 25-day cliff. A watermark older than 25 days returns
full_sync_required: trueand an empty result. Ignore the flag and the client silently stops updating. See Syncing. EventSourcecannot authenticate. The browser API cannot set anAuthorizationheader. Use a fetch-based SSE reader. See Live events.- Household
bulkgrants revoke omissions.PUT .../library/{type}/bulkreplaces the entire grant set. A partial list un-shares everything missing from it. See Households. - CDN widths are a fixed list. Only
320, 480, 640, 800, 960, 1200, 1600exist; any other width silently serves the full-resolution original. See Files. /changestakes a sequence number, not a timestamp. Unlikeupdated_since, thesinceon/api/recipes/changesis numeric. An ISO string returns400.
Writing code against this API
- Base URL is
https://api.flambe.dev. There is no sandbox host — use a dedicated test user. - Every endpoint except
GET /healthandGET /api/shared/{token}needsAuthorization: Bearer <clerk session jwt>. - Fields are
snake_case. Timer fields arecamelCase— the one exception. - Retry
429and5xxwith jittered backoff. Never retry other4xx. - Writes are not idempotent unless documented.
POST /api/importshas no idempotency key, so a timed-out create must be reconciled againstGET /api/imports/working-setrather than retried blindly. Timers do acceptidempotencyKey. See Errors and retries.
Check status before debugging
If calls fail broadly, status.flambe.dev publishes
live component health — the web service, the apps, and each import queue
separately. https://status.flambe.dev/api/v1/status.json is the machine-readable
form.