Cancel an in-flight compose job
Cancel a running compose so an agent (or a cost guard) can abort a mis-priced or runaway ensemble without waiting out its budget or TTL. The director-worker cancel is confirmed BEFORE the row flips; the terminal seam fires compose.cancelled and releases any linked charge. Already-terminal jobs are rejected (422 compose_not_cancellable).
API key auth. Prefix cf_live_ for production orgs, cf_test_ for sandbox.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/projects/string/compose/jobs/string/cancel"{ "composeJobId": "string", "projectId": "string", "status": "queued", "error": "string", "request": { "suggestionId": "string", "fromComposition": true, "scope": null, "critique": "string", "parentJobId": "string", "maxCandidates": 0, "budgetUsd": 0, "qualityThreshold": 0 }, "candidates": [ null ], "winner": { "candidateIndex": 0, "compositionRunId": "string" }, "cost": { "llmUsd": 0, "visionUsd": 0, "modalUsd": 0, "totalUsd": 0 }, "listUsd": 0, "startedAt": 0, "completedAt": 0, "advisoryResult": { "mode": "advise", "assessment": { "editorial": { "score": 0, "grounding": "measured", "abstained": true, "reliability": 0 }, "spatial": { "score": 0, "grounding": "measured", "abstained": true, "reliability": 0 }, "brand": { "score": 0, "grounding": "measured", "abstained": true, "reliability": 0 }, "caption": { "score": 0, "grounding": "measured", "abstained": true, "reliability": 0 } }, "proposals": [ { "label": "string", "candidateIndex": 0, "changeSummary": [ "string" ], "boundToEtag": "string", "expectedDelta": { "property1": "string", "property2": "string" } } ], "principles": [ "string" ], "plan": null, "checkpointId": "string" }, "checkpoint": { "checkpointId": "string", "stage": "content", "version": 0 }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "x402Version": 2, "accepts": [ {} ], "error": "string"}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}Answer a held checkpoint (approve / revise / abandon) POST
The A1 review grammar: one `decision` for the gate, optionally carrying anchored `comments` ({beatId} or {timecodeMs} anchors; per-anchor verdict approve|revise|lock — lock freezes the element contractually) and/or `edits` (your revised stage artifact). `revise` loops IN-JOB: the director revises and re-presents this same gate with a new packet (version+1); the brief quote states the included revision cycles — beyond them, revise is refused 402 with the path forward. `abandon` ends the run. Approve-with-comments is legal: the notes record without gating.
Start an async Director compose workflow POST
Async sibling of `composeFromSuggestion`. The Director Temporal workflow authors a canonical wire-shape Composition and saves it to `projects.composition`. Watch progress via the SSE stream at `/v1/projects/:id/compose/:composeJobId/stream`.