DevelopersAPI reference
API reference
Run any cApp you've published from your own code. Each app has its own API keys, made by its owner.
Base URL and keys
https://bo.flobi.ai/v1Send the key as a bearer token. Keys start with flobi_sk_ and belong to one app. The app's owner makes and revokes them in Flow, in the cApp's settings under API (how). Keep the key on your server: it spends the owner's credits.
Authorization: Bearer flobi_sk_…Start a run
Send the app's inputs by name. Leave out version to run the live version, or name one, such as "V3". Add a webhook URL to be told when it settles.
curl https://bo.flobi.ai/v1/capps/YOUR-APP/run \
-H "Authorization: Bearer flobi_sk_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{
"inputs": { "prompt": "A bottle on travertine, hard light" },
"webhook": "https://example.com/flobi"
}'Idempotency-Key: send the same key twice and you get the same run back, not a second one.Prefer: wait=30: hold the reply up to that many seconds (60 at most) so a quick run comes back finished.- Bodies are JSON, up to 2 MB. Send media as URLs.
Get the result
Poll the run, or wait for its webhook. Polling is always the source of truth.
curl https://bo.flobi.ai/v1/capps/YOUR-APP/runs/RUN_ID \
-H "Authorization: Bearer flobi_sk_…"Endpoints
| Request | What it does |
|---|---|
POST/capps/{app}/run | Start a run. Returns the run object (201). |
GET/capps/{app} | The app's inputs and outputs, so you know what to send. |
POST/capps/{app}/quote | What a run with these inputs would cost, in credits. |
GET/capps/{app}/runs | This key's runs, newest first. limit, starting_after and status filter the list. |
GET/capps/{app}/runs/{run} | One run: its status, outputs and any choice it is waiting on. |
POST/capps/{app}/runs/{run}/resume | Answer the choice a waiting run asks for. |
POST/capps/{app}/runs/{run}/cancel | Stop a run and release its credit hold. |
POST/capps/{app}/runs/{run}/rerun | Run again from a checkpoint with another choice. dry_run prices it. |
GET/capps/{app}/generations | Every file this key's runs made, as one feed. |
GET/capps/{app}/versions | The app's published versions. |
GET/capps/{app}/account | This key: its label, what it has spent, its limits and the owner's credits left. |
The run object
{
"id": "RUN_ID",
"app": "your-app",
"version": "V3",
"status": "completed",
"inputs": { "prompt": "A bottle on travertine, hard light" },
"outputs": { … },
"required_action": null,
"checkpoints": [],
"rerun_of": null,
"error": null,
"credits": { "estimated": 120, "used": 96 },
"created_at": "2026-11-08T21:29:12.000Z",
"started_at": "2026-11-08T21:29:13.000Z",
"completed_at": "2026-11-08T21:30:00.000Z",
"urls": {
"get": "https://bo.flobi.ai/v1/capps/your-app/runs/RUN_ID",
"cancel": "https://bo.flobi.ai/v1/capps/your-app/runs/RUN_ID/cancel"
}
}| Status | Meaning |
|---|---|
queued | Accepted, waiting to start. |
running | Working. |
waiting_input | Paused for an answer. required_action says what to send and by when. At a checkpoint, the run carries on with its starting choice when the time is up. |
completed | Done. outputs holds the files and text. |
failed | Stopped with an error. error.code says why. |
cancelled | Stopped by you. |
expired | Ended before it finished. error.code says why: decision_timeout when nobody answered in time, stalled when the run stopped or a restart cut it off. |
Errors
Errors come back as { "error": { "code", "message" } } with the HTTP status below. A failed run carries the same codes in error.code, plus ones such as content_moderated, timeout and provider_unavailable.
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The key is missing, wrong or revoked. |
| 402 | insufficient_credits | The key owner's workspace is out of credits. |
| 404 | not_found | No such app or run for this key. |
| 409 | not_waiting | The run isn't waiting for input. |
| 410 | app_unavailable | The app was deleted or has no published version. |
| 413 | payload_too_large | The body is over 2 MB. Send media as URLs. |
| 422 | invalid_inputs | An input is missing or the wrong type. The message names it. |
| 422 | invalid_request | A field is malformed, such as the Idempotency-Key or the webhook URL. |
| 429 | rate_limited | Too many runs started. Wait for Retry-After. |
| 429 | concurrency_limit | This key already has 5 runs going. Wait for one to end, or cancel one. |












