跳转到内容
EN

创建草稿片段渲染

POST /cut/v1/projects/{project_id}/renders

Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration (an end up to 0.05 s past it, a rounded duration, is read as the end), and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.

支持状态: supported

参数

名称位置类型必填说明
project_idpathstringtrueProject identifier returned by its create or list operation; use the id, not a display name.

请求体 (application/json)

必填: true

名称类型说明
kindstringaudio renders the mixed soundtrack alone as an .m4a file for listening; video renders a draft-quality .mp4 with picture and sound for looking at. An audio draft is the cheaper of the two and is what a loudness or mix measurement asks for.
fromnumberStart of the interval in seconds on the project clock, inclusive. Must be less than to.
tonumberEnd of the interval in seconds on the project clock, exclusive. At most 120 seconds after from, and never beyond the timeline duration; a longer passage is requested as several ranges.
revisionintegerOptional revision to render. Omitted renders the project’s current revision; a revision that is no longer current is refused with REVISION_CONFLICT, so read the project state first when the interval must match an earlier edit.
{
"type": "object",
"description": "The interval of the timeline to render as a draft.",
"required": [
"kind",
"from",
"to"
],
"properties": {
"kind": {
"type": "string",
"description": "audio renders the mixed soundtrack alone as an .m4a file for listening; video renders a draft-quality .mp4 with picture and sound for looking at. An audio draft is the cheaper of the two and is what a loudness or mix measurement asks for.",
"enum": [
"audio",
"video"
],
"example": "audio"
},
"from": {
"type": "number",
"minimum": 0,
"description": "Start of the interval in seconds on the project clock, inclusive. Must be less than to.",
"example": 12.5
},
"to": {
"type": "number",
"exclusiveMinimum": 0,
"description": "End of the interval in seconds on the project clock, exclusive. At most 120 seconds after from, and never beyond the timeline duration; a longer passage is requested as several ranges.",
"example": 27.5
},
"revision": {
"$ref": "#/components/schemas/cut-Revision",
"description": "Optional revision to render. Omitted renders the project's current revision; a revision that is no longer current is refused with REVISION_CONFLICT, so read the project state first when the interval must match an earlier edit."
}
}
}

响应

HTTP 202

Draft render accepted; poll renders.retrieve until status is done or failed.

application/json

名称 类型 说明
id string Draft render id returned by create; use as render_id for retrieve.
project_id string Project whose timeline is rendered.
status string queued is accepted and not started; rendering is producing the interval; done means file_id and url are usable; failed means inspect error and, if the interval matters, submit it again. Only done yields a url.
kind string What was rendered, as chosen at creation; audio is an .m4a of the mix, video is a draft-quality .mp4.
from number Start of the rendered interval in seconds on the project clock, inclusive.
to number End of the rendered interval in seconds on the project clock, exclusive.
revision integer Revision the interval was sliced from, frozen when the draft was created.
duration number Seconds of rendered material, present once the render finished; this is what the draft bills for.
file_id string Temporary file holding the rendered bytes, present once status is done. It expires 24 hours after it was stored and is not a media asset, so it can be read but never referenced as library material.
url string Short-lived link for reading the finished draft, present only while status is done. It expires within minutes, so retrieve the render again rather than saving it.
error object Present when status is failed; nothing was stored.
error.code string Stable error code, EXPORT_FAILED for a render that could not finish.
error.message string Bounded cause of the failure, safe to read; provider URLs are stripped.
create_time string When the draft was accepted, as an RFC 3339 timestamp.
finish_time string When the draft reached done or failed, as an RFC 3339 timestamp; absent while it is still running.