Validate a composition body without saving it (dry-run)
Dry-run the FULL save-time authoring guard set against a Composition body WITHOUT persisting it and without a project. Runs the same pure, DB-free guards saveComposition enforces — wire shape, primitive membership (unknown_primitive / custom_missing_sourcecode), required-param shape (invalid_primitive_params), clip↔track family (clip_source_track_mismatch), and reframe coverage (reframe_coverage_gap) — and returns ONE shape, `200 { valid, errors[] }`, for BOTH wire-shape and deep-invariant failures (no 400-vs-200 split). `valid:false` lists every authoring error (sanitized envelopes) to fix before save/render. The ONLY checks NOT run here are the two DB-bound ones — trim-bounds (media duration) and image/asset-on-video-track (media kind) — which can only be caught at save/render.
API key auth. Prefix cf_live_ for production orgs, cf_test_ for sandbox.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Canonical composition wire shape (multi-track; carries reframe, captions, markers).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/composition/validate" \ -H "Content-Type: application/json" \ -d '{ "v": 1, "format": { "aspectRatio": "16:9" }, "tracks": [ { "id": "string", "kind": "video", "contents": [ { "id": "string", "startTime": 0, "duration": 1, "source": { "kind": "media", "mediaId": "string" } } ] } ] }'{ "valid": true, "errors": [ { "code": "string", "stage": "string", "category": "string", "retryable": true, "message": "string", "fix": { "property1": null, "property2": null } } ], "advisories": [ { "rule": "string", "criterion": "string", "clipId": "string", "detail": "string", "fix": "string" } ], "quote": { "thisStepUsd": 0, "jobSpendSoFarUsd": 0, "estimatedJourneyTotalUsd": 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 } }}Replace a project's composition PUT
Required permission: projects:write
Ask the multi-agent Director for editing advice (never writes) POST
Ask the Director for editing advice on the project's current composition — it NEVER saves; you stay the decider. Async: poll the returned job for the advisory envelope. Modes: 'advise' = the planner agent (fast, ~30s-2min) returns a PLAN (framing/cuts/captions/graphics intents) as guidance you re-author from — no grounded scores; 'amend' = the full author→judge→refine loop (minutes) returns a GRADED assessment + an adoptable fix candidate (adopt via POST /compose/jobs/:jobId/select with its candidateIndex). ('explore' — a ranked slate of directions — is coming soon.)