API Reference
Every workflow is also an HTTP endpoint. JSON in, JSON out. Bearer auth, billed per run.
Base URL: https://latentbay.com
Authentication
Create a key in your dashboard and send it in the Authorization header. Keys are shown once.
Authorization: Bearer fv_xxxxxxxxxxxxxxxx
POST /api/v1/run
Run a workflow. Pass the product id (or slug) as workflow; prompt and image are optional. API access requires a paid subscription. The call returns 202; poll poll_url for the result.
curl -X POST https://latentbay.com/api/v1/run \
-H "Authorization: Bearer fv_your_key" \
-H "Content-Type: application/json" \
-d '{
"workflow": "<product-id>",
"prompt": "a product shot on white marble",
"image": null
}'// 202 Accepted
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"status": "queued",
"cost_credits": 3,
"credits_left": 247,
"poll_url": "/api/v1/runs/V1StGXR8_Z5jdHi6B-myT"
}
// GET poll_url
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"status": "succeeded",
"output": "https://cdn.example.com/out/abc.png",
"error": null,
"duration_ms": 8420
}Errors
| 401 | INVALID_API_KEY | Key invalid or revoked |
| 400 | INVALID_INPUT | Malformed body |
| 402 | NO_CREDITS | Out of credits — upgrade your plan |
| 403 | API_REQUIRES_SUBSCRIPTION | API requires a paid subscription |
| 403 | NOT_OWNED | Workflow not redeemed |
| 404 | NOT_FOUND | Workflow not found |
| 429 | TOO_MANY_RUNS | Concurrency limit reached |
Billing
- Subscriptions issue monthly credits. Credits unlock workflows and pay for cloud runs; they cannot be bought separately or withdrawn.
- Each listing shows its redemption price and per-run credit cost. Failed or timed-out runs are refunded automatically.
- Downloading the workflow file costs no extra credits. Redemptions are refundable within 14 days if not downloaded or run.