Workflows

Run status

The run with per-step and per-take progress and the live phase line. Poll until status is completed, failed, or cancelled — with ?wait=45, each call holds until the run changes instead of answering at once; ?include=activity adds each step's events (its activity trail).

get/v1/runs/{runId}

Request

  • Base URL: https://api.martini.film
  • URL: https://api.martini.film/v1/runs/{runId}
  • Auth: HTTP bearer

Path parameters

runIdstring required

The run id.

Query parameters

include'activity'

activity adds each step's events. Any other value answers 400 INVALID_REQUEST.

waitinteger

Long-poll: hold the call up to this many seconds (0–45) until the run changes — its status, its current step, its phase line, its progress, or its outputs — or settles (completed, failed, needs_revision, cancelled), then answer. A settled run answers at once, and so does every call when the server is holding too many polls; when nothing changed in time the answer is the run as it stands. Replaces sleeping between polls: call again with the same wait until status is terminal. Any other value answers 400 INVALID_REQUEST.

Response

The run.

compileboolean

True for a script build, which generates no media.

thenRunIdstring nullable

Present only when a build will automatically start execution. Null until handoff: keep polling this build, including after completed, until the execution id appears. Then poll /v1/runs/{thenRunId} for media results. Absent for build-only requests.

idstring required
fingerprintstring required
workflowIdstring
status'pending' | 'awaiting_approval' | 'running' | 'paused' | 'completed' | 'failed' | 'needs_revision' | 'cancelled' required
phasestring nullable required

What Martini is doing right now ("unit 3/7 · waiting on generations"), the line the app shows. Display copy, not parseable; null unless the run is running.

origin'ui' | 'chat' | 'mcp' | 'api' required
createdAtstring required
startedAtstring nullable required
completedAtstring nullable required
errorstring nullable required
errorCode'model_provider_unavailable' nullable required

Why a failed run failed, as a stable code to branch on; error carries the copy for a human. Null unless the run failed and Martini can name the cause. model_provider_unavailable: the AI model provider (Anthropic) kept failing or could not be reached, so the run stopped. The workflow and its inputs did not cause it: start the run again.

variablesobject required
binsobject required
openInMartinistring required

Changes

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