Build and persist a composition from a clip suggestion
Builds a composition from the suggestion and saves it as the active one. When the project already has a composition, send `If-Match` with its ETag (409 stale_etag on mismatch, 428 precondition_required without it).
API key auth. Prefix cf_live_ for production orgs, cf_test_ for sandbox.
In: header
Path Parameters
Header Parameters
The composition ETag you observed; required when the project already has a composition.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
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/composition/from-suggestion" \ -H "Content-Type: application/json" \ -d '{ "suggestionId": "sug_01J8Z3K9Q2X4Y5W6V7T8R9S0P1" }'{ "compositionId": "string", "versionId": "string", "etag": "string", "composition": { "v": 1, "format": { "aspectRatio": "16:9", "fps": 24, "resolution": "hd", "platform": "string" }, "tracks": [ { "id": "string", "kind": "video", "name": "string", "enabled": true, "volume": 0, "contents": [ { "id": "string", "startTime": 0, "duration": 1, "source": { "kind": "media", "mediaId": "string", "trim": { "start": 0, "end": 0 }, "excludedRanges": [ { "start": 0, "end": 0, "reason": "string" } ], "volume": 0, "muted": true, "playbackRate": 1, "sync": "video", "kenBurns": "in", "volumeDb": 0, "fadeInMs": 0, "fadeOutMs": 0, "loop": true, "audioRole": "sfx", "duck": { "duckDb": 0, "attackMs": 0, "releaseMs": 0, "windows": [ { "startMs": 0, "endMs": 0 } ] }, "anchor": { "clipId": "string", "offsetMs": 0 }, "reframe": { "segments": [ { "startSec": 0, "endSec": 1, "focus": { "mode": "frame-center" }, "intent": "string", "zoom": 0.1, "ease": { "in": 0, "out": 0 }, "bias": { "x": -0.3, "y": -0.3 } } ] } }, "kind": "video", "opacity": 0, "scale": 1, "rotation": 0, "position": { "x": -1, "y": -1 }, "region": { "x": 0, "y": 0, "w": 1, "h": 1 }, "fit": "cover", "captionVisibility": "visible", "effects": [ { "id": "string", "component": { "version": 3, "componentId": "string", "sourceVersionId": "string", "params": { "property1": "string", "property2": "string" }, "seed": "string", "assets": { "property1": "string", "property2": "string" }, "mediaBindings": { "property1": [ "string" ], "property2": [ "string" ] } }, "window": { "startTime": 0, "duration": 1 }, "primitiveId": "string", "params": { "property1": null, "property2": null } } ], "transitionIn": { "type": "string", "duration": 1, "id": "string", "component": { "version": 3, "componentId": "string", "sourceVersionId": "string", "params": { "property1": "string", "property2": "string" }, "seed": "string", "assets": { "property1": "string", "property2": "string" }, "mediaBindings": { "property1": [ "string" ], "property2": [ "string" ] } }, "fromClipId": "string", "toClipId": "string", "handlePolicy": "outgoing-overrun-at-cut-v1" }, "linkGroupId": "string", "tweens": [ { "id": "string", "propertyGroup": "visual", "position": 0, "duration": 1, "keyframes": { "format": "percentage", "easeEach": "none", "keyframes": [ { "percentage": 0, "properties": { "property1": 0, "property2": 0 }, "ease": "string" }, { "percentage": 0, "properties": { "property1": 0, "property2": 0 }, "ease": "string" } ] } } ], "automation": { "version": 1, "lanes": [ { "target": "volume", "points": [ { "t": 0, "v": 0 }, { "t": 0, "v": 0 } ] } ] }, "color": { "version": 1, "enabled": true, "grade": { "exposure": -4, "contrast": -1, "highlights": -1, "shadows": -1, "whites": -1, "blacks": -1, "temperature": -1, "tint": -1, "vibrance": -1, "saturation": -1 }, "looks": [ { "mediaId": "string", "sha256": "string", "enabled": true } ], "display": { "mediaId": "string", "sha256": "string", "enabled": true }, "creative": { "mediaId": "string", "sha256": "string", "enabled": true, "strength": 0 }, "halation": { "enabled": true, "amount": 0, "radius": 0.0005, "threshold": 0, "tint": [ 0, 0, 0 ] }, "grain": { "enabled": true, "profile": "daylight-negative", "gauge": "super8", "amount": 0, "size": 0.5, "seed": 0 } }, "legacyKeyframes": { "needsUpgrade": true, "channels": [ "string" ], "record": null } } ] } ], "markers": [ { "id": "string", "startTime": 0, "endTime": 0, "kind": "string", "name": "string", "metadata": { "property1": null, "property2": null } } ], "captions": { "source": "derived", "from": { "clipId": "string" }, "segments": [ { "words": [ { "text": "string", "startMs": 0, "endMs": 0, "emphasis": true, "annotate": "circle" } ] } ], "style": { "fontFamily": "string", "fontSize": 1, "fontWeight": 100, "color": "string", "highlightColor": "string", "backgroundColor": "string", "plate": "glass", "position": "top", "region": { "x": 0, "y": 0, "w": 1, "h": 1 }, "textTransform": "none", "letterSpacing": -5, "wordGapEm": 0, "lineGapEm": 0, "emphasisColor": "string", "emphasisGradient": "string", "emphasisScale": 1, "emphasisFontFamily": "string", "emphasisFontWeight": 100, "emphasisTextTransform": "none", "emphasisLetterSpacing": 0, "emphasisFontStyle": "normal", "entrance": "none", "entranceMs": 0, "entranceStaggerMs": 0, "exitMs": 0, "emphasisPlate": true, "emphasisPlateColor": "string", "emphasisPlateTextColor": "string", "emphasisPlateAltColor": "string", "emphasisPlateAltTextColor": "string", "emphasisPlateRadius": 0, "emphasisPlatePadX": 0, "emphasisPlatePadY": 0, "emphasisPlateReveal": true, "annotationColor": "string", "annotationStrokeWidth": 0.5, "annotationTexture": "clean", "maxWidthPercent": 1 }, "layouts": [ { "segmentIndex": 0, "wordStartIndex": 0, "wordEndIndex": 1, "region": { "x": 0, "y": 0, "w": 1, "h": 1 }, "scale": 0.25, "rotation": -45, "style": { "fontFamily": "string", "fontSize": 1, "fontWeight": 100, "color": "string", "highlightColor": "string", "backgroundColor": "string", "plate": "glass", "textTransform": "none", "letterSpacing": -5, "wordGapEm": 0, "lineGapEm": 0, "emphasisColor": "string", "emphasisScale": 1, "emphasisFontFamily": "string", "emphasisFontWeight": 100, "emphasisTextTransform": "none", "emphasisLetterSpacing": 0, "emphasisFontStyle": "normal", "emphasisPlate": true, "emphasisPlateColor": "string", "emphasisPlateTextColor": "string", "emphasisPlateAltColor": "string", "emphasisPlateAltTextColor": "string", "emphasisPlateRadius": 0, "emphasisPlatePadX": 0, "emphasisPlatePadY": 0, "emphasisPlateReveal": true, "annotationColor": "string", "annotationStrokeWidth": 0.5, "annotationTexture": "clean", "entrance": "none", "entranceMs": 0, "entranceStaggerMs": 0, "exitMs": 0 }, "holdThroughWordIndex": 0, "wordMarks": [ { "wordIndex": 0, "emphasis": true, "annotate": "circle" } ], "wordSignature": "string" } ], "zPlane": "front" }, "sourceSuggestionId": "string", "license": { "type": "string", "source": "string", "notes": "string" }, "licenseVerification": "attested", "accessibility": { "audioDescriptionTrackId": "string", "captionsTrackId": "string", "signLanguageTrackId": "string", "notes": "string" }, "ownerOrgId": "string", "acl": { "public": true, "readerOrgIds": [ "string" ], "writerOrgIds": [ "string" ] }, "media": { "property1": { "inputTransform": { "version": 1, "id": "rec709", "table": { "mediaId": "string", "sha256": "string", "enabled": true }, "ycbcr": { "matrix": "bt709", "range": "limited" } } }, "property2": { "inputTransform": { "version": 1, "id": "rec709", "table": { "mediaId": "string", "sha256": "string", "enabled": true }, "ycbcr": { "matrix": "bt709", "range": "limited" } } } } }, "notes": [ { "code": "color_grade_unavailable", "field": "string", "message": "string" } ]}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "x402Version": 2, "accepts": [ {} ], "error": "string"}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "contract": "string", "contractVersion": "string", "details": { "property1": null, "property2": null } }}Trigger standalone subject/face detection POST
Track faces or people across a video so renders can use the subject track. Async: returns 202 with a fact id and quote, then poll GET /v1/media/{id}/facts; a detection already pending or ready is returned free of charge.
List clip suggestions for a media item GET
Read the ranked short-form clip suggestions for a video along with the analysis status, filtered by platform, format, or topic if needed. Poll it after POST /v1/media/{id}/suggestions until the status is completed.