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

401INVALID_API_KEYKey invalid or revoked
400INVALID_INPUTMalformed body
402NO_CREDITSOut of credits — upgrade your plan
403API_REQUIRES_SUBSCRIPTIONAPI requires a paid subscription
403NOT_OWNEDWorkflow not redeemed
404NOT_FOUNDWorkflow not found
429TOO_MANY_RUNSConcurrency 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.