runs

Create Run

Create a new one-off pipeline run.

This is what the /content/new dashboard form calls. It validates the request, verifies the brand belongs to the caller's workspace, pre-checks credits and the monthly video cap, creates a Run row, and enqueues a Job for the worker to pick up.

We do NOT deduct credits here — the worker does that when the run actually executes. This prevents charging for queued-but-never-run jobs (e.g., the worker dies before dequeue) and matches the pattern used by coo_engine.dispatch_run. The pre-check below is just a fast-fail so the UI can tell the customer "you don't have enough credits" before filling out a form.

Returns the persisted Run so the dashboard can redirect to /content/runs/{id} and start polling progress immediately.

post/v1/runs

Request

  • Base URL: https://api.theagentc.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.theagentc.io/v1/runs
  • Auth: HTTP bearer

Request body

brand_idstring uuid required
modeinteger required

Content mode: 1, 2, or 3

ideastring nullable
video_urlstring nullable
strategystring nullable
platformsstring[]
formatsstring[]

Response

Successful Response

idstring uuid required
brand_idstring uuid nullable
campaign_idstring uuid nullable
modeinteger nullable
statusstring required
credits_usedinteger
created_atstring required
started_atstring nullable
completed_atstring nullable
errorobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.