API reference
Workflows API
Workflows are durable, asynchronous jobs. A prepare workflow structures text into narration and dialogue; a Create Audio workflow casts voices and generates multi-voice audio. Poll a workflow until it reaches a terminal status.
BetaUpdated
- Base URL
- https://lyricwinter.com/api/v1
- Authentication
- Authorization: Bearer lw_…
- Contract
- openapi.json
Start a workflow
POST/studio/projects/{projectId}/workflows
studio:writeRetry with the same client_mutation_idStarts a prepare_sections workflow, which structures text into narration and dialogue, or a create_audio workflow, which prepares text, casts voices, directs performances, adds sound effects, and generates audio. Returns 202 with the run; poll it until it reaches a terminal status. Replaying the same client_mutation_id returns the same workflow instead of starting another.
Path parameters
projectIdstringrequireduuid
Request body application/json
One of 2 shapes:
schema_version: 1, workflow_kind: "prepare_sections"
Start ordered section preparation.
schema_version1requiredworkflow_kind"prepare_sections"requiredactor_session_idstringrequireduuidClient session that issued the request.
client_mutation_idstringrequireduuidIdempotency key; the workflow ID is derived from it. Reusing it for different content returns 409.
section_idsarray of stringrequired1–100 itemsuniqueSections to prepare, in order; values must be unique.
schema_version: 2, workflow_kind: "create_audio"
Create Audio v2. Generated sound effects and automatic placement of linked project sounds are independent; when both run, project sounds are placed first. Section limit: 12 with both sound lanes enabled (the default), 14 with one, 16 with none. A target_scope requires exactly one section and both lanes set to false.
schema_version2requiredworkflow_kind"create_audio"requiredactor_session_idstringrequireduuidClient session that issued the request.
client_mutation_idstringrequireduuidIdempotency key; the workflow ID is derived from it. Reusing it for different content returns 409.
section_idsarray of stringrequired1–16 itemsuniqueSections to create audio for; values must be unique.
include_generated_sfxbooleandefault trueEnables the generated-SFX authoring lane.
place_project_soundsbooleandefault trueEnables automatic matching and placement from ready, accessible sounds explicitly linked to this project.
direct_emotionbooleandefault trueEnables automatic emotion: a direct_emotion step adds provider delivery directions to spoken blocks that have none for their engine. Direction text sent to the provider is billed (ElevenLabs v4 audio tags). For pre-run estimates, clients add about 18 ElevenLabs v4 tokens per untagged ElevenLabs v4 block while this is on; the charge is the tokens actually sent. Omitted means true.
target_scopeobject | nullOptional focused source-block scope. Null or omitted targets the selected sections. Focused requests must set both optional sound lanes to false.
2 child attributes
kind"source_blocks"requiredblocksarray of objectrequired1–250 itemsuniqueFocused source blocks; block_id values must be unique.
4 item attributes
block_idstringrequireduuidbase_block_versionintegerrequired≥ 1text_length_utf16integerrequired1–1000000text_hashstringrequiredpattern ^[0-9a-f]{64}$
Response 202
Durable project workflow accepted and first advancement attempted. Replaying the same client_mutation_id with the same request returns the same workflow. Fields below are inside data.
runobjectrequiredDurable Studio project workflow run.
21 child attributes
idstringrequireduuidWorkflow run ID.
project_idstringrequireduuidrequested_by_user_idstringrequireduuidpayer_user_idstring | nullrequireduuidUser billed for Create Audio work; null for prepare_sections workflows.
workflow_kindstringrequiredOne of
prepare_sectionscreate_audioautomation_profilestring | nullrequiredCreate Audio profile label from profile_snapshot.profile; null for prepare_sections.
One of
quickbalanceddirectedprofile_snapshotobjectrequiredEmpty object for prepare_sections workflows; the frozen Create Audio options for create_audio workflows.
statusstringrequiredWorkflow run status, recomputed from step statuses after every step transition. Non-terminal: queued (unfinished steps remain and none is active), running (at least one step is active), canceling (cancellation was requested and unfinished steps remain). Terminal (completed_at is set and the status no longer changes): completed (every step succeeded or was skipped), partially_completed (at least one failed or conflict step and at least one succeeded or skipped step), failed (failed or conflict steps and no succeeded or skipped step), cancelled (all steps finished after cancellation was requested).
One of
queuedrunningcompletedpartially_completedfailedcancelingcancelledcurrent_stagestring | nullrequiredStage of the next unfinished step while the run is queued, running, or canceling. Null once the run is terminal, or when the next unfinished step is render_section.
One of
preparing_sectionsassigning_speakerscasting_voicesplanning_emotiondirecting_deliveryplacing_project_soundsdirecting_sfxpreparing_voicesgenerating_audiostep_countintegerrequired1–100completed_step_countintegerrequired0–100Steps in a terminal status (succeeded, skipped, failed, conflict, cancelled).
progressobjectrequiredStep counts by status. Currently contains integer counts pending, active, succeeded (succeeded or skipped), failed (failed or conflict), cancelled, completed (all terminal), and total; treat unknown keys as additive.
7 child attributes
pendinginteger≥ 0activeinteger≥ 0succeededinteger≥ 0failedinteger≥ 0cancelledinteger≥ 0completedinteger≥ 0totalinteger≥ 0
error_summaryarray of objectrequiredmax 100 itemsOne entry per failed or conflict step in step order. Entries currently contain step_id, section_id, step_kind, code, and message; treat unknown keys as additive.
5 item attributes
step_idstringuuidsection_idstringuuidstep_kindstringKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectioncodestring | nullmessagestring | null
cancel_requested_atstring | nullrequireddate-timeWhen cancellation was first requested.
cancel_acknowledged_atstring | nullrequireddate-timeWhen the run reached cancelled.
created_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timeWhen execution first started; null before then.
completed_atstring | nullrequireddate-timeSet when the run reaches a terminal status (completed, partially_completed, failed, cancelled); null otherwise.
resumes_workflow_run_idstring | nullrequireduuidPredecessor run this run resumes; null for an original run.
resumablebooleanrequiredTrue when status is failed or partially_completed and at least one step is failed or conflict. Only resumable runs can be resumed.
stepsarray of objectrequired1–100 itemsAll steps in ascending step_index order.
19 item attributes
idstringrequireduuidworkflow_run_idstringrequireduuidsection_idstringrequireduuidstep_keystringrequired1–200 charsStable key of the step within its workflow.
step_indexintegerrequired0–99Zero-based position; steps are returned in ascending step_index order.
step_kindstringrequiredKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectionstatusstringrequiredStep status. pending and active are non-terminal; succeeded, skipped, failed, conflict, and cancelled are terminal. The run counts skipped as success and conflict as failure. conflict means the section document changed underneath the step.
One of
pendingactivesucceededskippedfailedconflictcancelledrequested_document_versionintegerrequired≥ 1Section document version the step was planned against.
execution_document_versioninteger | nullrequired≥ 1Section document version the step executed against, when recorded.
assistant_batch_idstring | nullrequireduuidChild assistant batch started by an assistant-driven step.
render_run_idstring | nullrequireduuidRender run started by a render_section step.
result_summaryobjectrequiredStep-specific result data, typed by the contract as an open JSON object. generate_stale_audio steps may carry the StudioWorkflowAudioResultSummary fields; steps cancelled before starting carry cancelled_before_start: true.
issue_kindstring | nullrequiredSet for failed and conflict steps; null for every other status.
One of
document_changedservice_out_of_syncassistant_failedworkflow_failederror_codestring | nullrequired1–200 charserror_messagestring | nullrequiredmax 10000 charscreated_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timecompleted_atstring | nullrequireddate-time
Errors 400, 401, 403, 404, 409, 500, 503 use the standard error envelope.
curl -X POST "https://lyricwinter.com/api/v1/studio/projects/$PROJECT_ID/workflows" \
-H "Authorization: Bearer $LYRICWINTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema_version": 1,
"workflow_kind": "prepare_sections",
"actor_session_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"client_mutation_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"section_ids": [
"45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30"
]
}'const projectId = "<projectId>";
const response = await fetch(`https://lyricwinter.com/api/v1/studio/projects/${projectId}/workflows`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LYRICWINTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"schema_version": 1,
"workflow_kind": "prepare_sections",
"actor_session_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"client_mutation_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"section_ids": [
"45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30"
]
}),
});
const { data, error, request_id } = await response.json();import os
import requests
project_id = "<projectId>"
response = requests.request(
"POST",
f"https://lyricwinter.com/api/v1/studio/projects/{project_id}/workflows",
headers={
"Authorization": f"Bearer {os.environ['LYRICWINTER_API_KEY']}",
},
json={
"schema_version": 1,
"workflow_kind": "prepare_sections",
"actor_session_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"client_mutation_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"section_ids": [
"45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30"
]
},
)
payload = response.json(){
"data": {
"run": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"project_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"requested_by_user_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"payer_user_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_kind": "prepare_sections",
"automation_profile": "quick",
"profile_snapshot": {},
"status": "queued",
"current_stage": "preparing_sections",
"step_count": 1,
"completed_step_count": 1,
"progress": {
"pending": 1,
"active": 1,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"completed": 1,
"total": 1
},
"error_summary": [
{
"step_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_kind": "prepare_section",
"code": "string",
"message": "string"
}
],
"cancel_requested_at": "2026-09-30T17:00:00.000Z",
"cancel_acknowledged_at": "2026-09-30T17:00:00.000Z",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z",
"resumes_workflow_run_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"resumable": true
},
"steps": [
{
"id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_run_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_key": "string",
"step_index": 1,
"step_kind": "prepare_section",
"status": "pending",
"requested_document_version": 1,
"execution_document_version": 1,
"assistant_batch_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"render_run_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"result_summary": {},
"issue_kind": "document_changed",
"error_code": "string",
"error_message": "string",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z"
}
]
},
"request_id": "req_01J9Z3K8QF4"
}Get the latest project workflow
GET/studio/projects/{projectId}/workflows
studio:readReturns the project's most recent workflow with its steps, or null if none has run. Pass section_id to get the most recent workflow that includes that section.
Path parameters
projectIdstringrequireduuid
Query parameters
section_idstringuuidRestrict to the workflow that most recently added a step for this section. Returns null when none exists or that workflow belongs to another project.
Response 200
Latest project workflow or null when none exists. Fields below are inside data.
runobjectrequiredDurable Studio project workflow run.
21 child attributes
idstringrequireduuidWorkflow run ID.
project_idstringrequireduuidrequested_by_user_idstringrequireduuidpayer_user_idstring | nullrequireduuidUser billed for Create Audio work; null for prepare_sections workflows.
workflow_kindstringrequiredOne of
prepare_sectionscreate_audioautomation_profilestring | nullrequiredCreate Audio profile label from profile_snapshot.profile; null for prepare_sections.
One of
quickbalanceddirectedprofile_snapshotobjectrequiredEmpty object for prepare_sections workflows; the frozen Create Audio options for create_audio workflows.
statusstringrequiredWorkflow run status, recomputed from step statuses after every step transition. Non-terminal: queued (unfinished steps remain and none is active), running (at least one step is active), canceling (cancellation was requested and unfinished steps remain). Terminal (completed_at is set and the status no longer changes): completed (every step succeeded or was skipped), partially_completed (at least one failed or conflict step and at least one succeeded or skipped step), failed (failed or conflict steps and no succeeded or skipped step), cancelled (all steps finished after cancellation was requested).
One of
queuedrunningcompletedpartially_completedfailedcancelingcancelledcurrent_stagestring | nullrequiredStage of the next unfinished step while the run is queued, running, or canceling. Null once the run is terminal, or when the next unfinished step is render_section.
One of
preparing_sectionsassigning_speakerscasting_voicesplanning_emotiondirecting_deliveryplacing_project_soundsdirecting_sfxpreparing_voicesgenerating_audiostep_countintegerrequired1–100completed_step_countintegerrequired0–100Steps in a terminal status (succeeded, skipped, failed, conflict, cancelled).
progressobjectrequiredStep counts by status. Currently contains integer counts pending, active, succeeded (succeeded or skipped), failed (failed or conflict), cancelled, completed (all terminal), and total; treat unknown keys as additive.
7 child attributes
pendinginteger≥ 0activeinteger≥ 0succeededinteger≥ 0failedinteger≥ 0cancelledinteger≥ 0completedinteger≥ 0totalinteger≥ 0
error_summaryarray of objectrequiredmax 100 itemsOne entry per failed or conflict step in step order. Entries currently contain step_id, section_id, step_kind, code, and message; treat unknown keys as additive.
5 item attributes
step_idstringuuidsection_idstringuuidstep_kindstringKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectioncodestring | nullmessagestring | null
cancel_requested_atstring | nullrequireddate-timeWhen cancellation was first requested.
cancel_acknowledged_atstring | nullrequireddate-timeWhen the run reached cancelled.
created_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timeWhen execution first started; null before then.
completed_atstring | nullrequireddate-timeSet when the run reaches a terminal status (completed, partially_completed, failed, cancelled); null otherwise.
resumes_workflow_run_idstring | nullrequireduuidPredecessor run this run resumes; null for an original run.
resumablebooleanrequiredTrue when status is failed or partially_completed and at least one step is failed or conflict. Only resumable runs can be resumed.
stepsarray of objectrequired1–100 itemsAll steps in ascending step_index order.
19 item attributes
idstringrequireduuidworkflow_run_idstringrequireduuidsection_idstringrequireduuidstep_keystringrequired1–200 charsStable key of the step within its workflow.
step_indexintegerrequired0–99Zero-based position; steps are returned in ascending step_index order.
step_kindstringrequiredKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectionstatusstringrequiredStep status. pending and active are non-terminal; succeeded, skipped, failed, conflict, and cancelled are terminal. The run counts skipped as success and conflict as failure. conflict means the section document changed underneath the step.
One of
pendingactivesucceededskippedfailedconflictcancelledrequested_document_versionintegerrequired≥ 1Section document version the step was planned against.
execution_document_versioninteger | nullrequired≥ 1Section document version the step executed against, when recorded.
assistant_batch_idstring | nullrequireduuidChild assistant batch started by an assistant-driven step.
render_run_idstring | nullrequireduuidRender run started by a render_section step.
result_summaryobjectrequiredStep-specific result data, typed by the contract as an open JSON object. generate_stale_audio steps may carry the StudioWorkflowAudioResultSummary fields; steps cancelled before starting carry cancelled_before_start: true.
issue_kindstring | nullrequiredSet for failed and conflict steps; null for every other status.
One of
document_changedservice_out_of_syncassistant_failedworkflow_failederror_codestring | nullrequired1–200 charserror_messagestring | nullrequiredmax 10000 charscreated_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timecompleted_atstring | nullrequireddate-time
Errors 400, 401, 403, 500, 503 use the standard error envelope.
curl "https://lyricwinter.com/api/v1/studio/projects/$PROJECT_ID/workflows" \
-H "Authorization: Bearer $LYRICWINTER_API_KEY"const projectId = "<projectId>";
const response = await fetch(`https://lyricwinter.com/api/v1/studio/projects/${projectId}/workflows`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.LYRICWINTER_API_KEY}`,
},
});
const { data, error, request_id } = await response.json();import os
import requests
project_id = "<projectId>"
response = requests.request(
"GET",
f"https://lyricwinter.com/api/v1/studio/projects/{project_id}/workflows",
headers={
"Authorization": f"Bearer {os.environ['LYRICWINTER_API_KEY']}",
},
)
payload = response.json(){
"data": {
"run": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"project_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"requested_by_user_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"payer_user_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_kind": "prepare_sections",
"automation_profile": "quick",
"profile_snapshot": {},
"status": "queued",
"current_stage": "preparing_sections",
"step_count": 1,
"completed_step_count": 1,
"progress": {
"pending": 1,
"active": 1,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"completed": 1,
"total": 1
},
"error_summary": [
{
"step_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_kind": "prepare_section",
"code": "string",
"message": "string"
}
],
"cancel_requested_at": "2026-09-30T17:00:00.000Z",
"cancel_acknowledged_at": "2026-09-30T17:00:00.000Z",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z",
"resumes_workflow_run_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"resumable": true
},
"steps": [
{
"id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_run_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_key": "string",
"step_index": 1,
"step_kind": "prepare_section",
"status": "pending",
"requested_document_version": 1,
"execution_document_version": 1,
"assistant_batch_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"render_run_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"result_summary": {},
"issue_kind": "document_changed",
"error_code": "string",
"error_message": "string",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z"
}
]
},
"request_id": "req_01J9Z3K8QF4"
}Get a workflow
GET/studio/workflows/{workflowRunId}
studio:readReturns a workflow run and its ordered steps. Poll this endpoint until run.status is completed, partially_completed, failed, or cancelled.
Path parameters
workflowRunIdstringrequireduuid
Response 200
Current workflow and ordered section steps. Poll until run.status is terminal (completed, partially_completed, failed, cancelled). Fields below are inside data.
runobjectrequiredDurable Studio project workflow run.
21 child attributes
idstringrequireduuidWorkflow run ID.
project_idstringrequireduuidrequested_by_user_idstringrequireduuidpayer_user_idstring | nullrequireduuidUser billed for Create Audio work; null for prepare_sections workflows.
workflow_kindstringrequiredOne of
prepare_sectionscreate_audioautomation_profilestring | nullrequiredCreate Audio profile label from profile_snapshot.profile; null for prepare_sections.
One of
quickbalanceddirectedprofile_snapshotobjectrequiredEmpty object for prepare_sections workflows; the frozen Create Audio options for create_audio workflows.
statusstringrequiredWorkflow run status, recomputed from step statuses after every step transition. Non-terminal: queued (unfinished steps remain and none is active), running (at least one step is active), canceling (cancellation was requested and unfinished steps remain). Terminal (completed_at is set and the status no longer changes): completed (every step succeeded or was skipped), partially_completed (at least one failed or conflict step and at least one succeeded or skipped step), failed (failed or conflict steps and no succeeded or skipped step), cancelled (all steps finished after cancellation was requested).
One of
queuedrunningcompletedpartially_completedfailedcancelingcancelledcurrent_stagestring | nullrequiredStage of the next unfinished step while the run is queued, running, or canceling. Null once the run is terminal, or when the next unfinished step is render_section.
One of
preparing_sectionsassigning_speakerscasting_voicesplanning_emotiondirecting_deliveryplacing_project_soundsdirecting_sfxpreparing_voicesgenerating_audiostep_countintegerrequired1–100completed_step_countintegerrequired0–100Steps in a terminal status (succeeded, skipped, failed, conflict, cancelled).
progressobjectrequiredStep counts by status. Currently contains integer counts pending, active, succeeded (succeeded or skipped), failed (failed or conflict), cancelled, completed (all terminal), and total; treat unknown keys as additive.
7 child attributes
pendinginteger≥ 0activeinteger≥ 0succeededinteger≥ 0failedinteger≥ 0cancelledinteger≥ 0completedinteger≥ 0totalinteger≥ 0
error_summaryarray of objectrequiredmax 100 itemsOne entry per failed or conflict step in step order. Entries currently contain step_id, section_id, step_kind, code, and message; treat unknown keys as additive.
5 item attributes
step_idstringuuidsection_idstringuuidstep_kindstringKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectioncodestring | nullmessagestring | null
cancel_requested_atstring | nullrequireddate-timeWhen cancellation was first requested.
cancel_acknowledged_atstring | nullrequireddate-timeWhen the run reached cancelled.
created_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timeWhen execution first started; null before then.
completed_atstring | nullrequireddate-timeSet when the run reaches a terminal status (completed, partially_completed, failed, cancelled); null otherwise.
resumes_workflow_run_idstring | nullrequireduuidPredecessor run this run resumes; null for an original run.
resumablebooleanrequiredTrue when status is failed or partially_completed and at least one step is failed or conflict. Only resumable runs can be resumed.
stepsarray of objectrequired1–100 itemsAll steps in ascending step_index order.
19 item attributes
idstringrequireduuidworkflow_run_idstringrequireduuidsection_idstringrequireduuidstep_keystringrequired1–200 charsStable key of the step within its workflow.
step_indexintegerrequired0–99Zero-based position; steps are returned in ascending step_index order.
step_kindstringrequiredKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectionstatusstringrequiredStep status. pending and active are non-terminal; succeeded, skipped, failed, conflict, and cancelled are terminal. The run counts skipped as success and conflict as failure. conflict means the section document changed underneath the step.
One of
pendingactivesucceededskippedfailedconflictcancelledrequested_document_versionintegerrequired≥ 1Section document version the step was planned against.
execution_document_versioninteger | nullrequired≥ 1Section document version the step executed against, when recorded.
assistant_batch_idstring | nullrequireduuidChild assistant batch started by an assistant-driven step.
render_run_idstring | nullrequireduuidRender run started by a render_section step.
result_summaryobjectrequiredStep-specific result data, typed by the contract as an open JSON object. generate_stale_audio steps may carry the StudioWorkflowAudioResultSummary fields; steps cancelled before starting carry cancelled_before_start: true.
issue_kindstring | nullrequiredSet for failed and conflict steps; null for every other status.
One of
document_changedservice_out_of_syncassistant_failedworkflow_failederror_codestring | nullrequired1–200 charserror_messagestring | nullrequiredmax 10000 charscreated_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timecompleted_atstring | nullrequireddate-time
Errors 400, 401, 403, 404, 500, 503 use the standard error envelope.
curl "https://lyricwinter.com/api/v1/studio/workflows/$WORKFLOW_RUN_ID" \
-H "Authorization: Bearer $LYRICWINTER_API_KEY"const workflowRunId = "<workflowRunId>";
const response = await fetch(`https://lyricwinter.com/api/v1/studio/workflows/${workflowRunId}`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.LYRICWINTER_API_KEY}`,
},
});
const { data, error, request_id } = await response.json();import os
import requests
workflow_run_id = "<workflowRunId>"
response = requests.request(
"GET",
f"https://lyricwinter.com/api/v1/studio/workflows/{workflow_run_id}",
headers={
"Authorization": f"Bearer {os.environ['LYRICWINTER_API_KEY']}",
},
)
payload = response.json(){
"data": {
"run": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"project_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"requested_by_user_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"payer_user_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_kind": "prepare_sections",
"automation_profile": "quick",
"profile_snapshot": {},
"status": "queued",
"current_stage": "preparing_sections",
"step_count": 1,
"completed_step_count": 1,
"progress": {
"pending": 1,
"active": 1,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"completed": 1,
"total": 1
},
"error_summary": [
{
"step_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_kind": "prepare_section",
"code": "string",
"message": "string"
}
],
"cancel_requested_at": "2026-09-30T17:00:00.000Z",
"cancel_acknowledged_at": "2026-09-30T17:00:00.000Z",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z",
"resumes_workflow_run_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"resumable": true
},
"steps": [
{
"id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_run_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_key": "string",
"step_index": 1,
"step_kind": "prepare_section",
"status": "pending",
"requested_document_version": 1,
"execution_document_version": 1,
"assistant_batch_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"render_run_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"result_summary": {},
"issue_kind": "document_changed",
"error_code": "string",
"error_message": "string",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z"
}
]
},
"request_id": "req_01J9Z3K8QF4"
}Get workflow audio progress
GET/studio/workflows/{workflowRunId}/progress
studio:readReturns how many audio clips are ready out of the total for a Create Audio workflow. Use it for a progress bar while audio generates.
Path parameters
workflowRunIdstringrequireduuid
Response 200
Current workflow audio counts. Fields below are inside data.
schema_versionintegerrequiredOne of
1workflow_run_idstringrequireduuidreadyintegerrequired≥ 0totalintegerrequired≥ 0
Errors 400, 401, 403, 404, 500 use the standard error envelope.
curl "https://lyricwinter.com/api/v1/studio/workflows/$WORKFLOW_RUN_ID/progress" \
-H "Authorization: Bearer $LYRICWINTER_API_KEY"const workflowRunId = "<workflowRunId>";
const response = await fetch(`https://lyricwinter.com/api/v1/studio/workflows/${workflowRunId}/progress`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.LYRICWINTER_API_KEY}`,
},
});
const { data, error, request_id } = await response.json();import os
import requests
workflow_run_id = "<workflowRunId>"
response = requests.request(
"GET",
f"https://lyricwinter.com/api/v1/studio/workflows/{workflow_run_id}/progress",
headers={
"Authorization": f"Bearer {os.environ['LYRICWINTER_API_KEY']}",
},
)
payload = response.json(){
"data": {
"schema_version": 1,
"workflow_run_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"ready": 1,
"total": 1
},
"request_id": "req_01J9Z3K8QF4"
}Cancel a workflow
POST/studio/workflows/{workflowRunId}/cancel
studio:writeRequests cancellation of a prepare or Create Audio workflow. Pending steps are cancelled immediately; running steps stop cooperatively and their late results are discarded. A finished workflow is returned unchanged. Send no request body.
Path parameters
workflowRunIdstringrequireduuid
Response 200
Current workflow state, normally canceling or cancelled. Fields below are inside data.
runobjectrequiredDurable Studio project workflow run.
21 child attributes
idstringrequireduuidWorkflow run ID.
project_idstringrequireduuidrequested_by_user_idstringrequireduuidpayer_user_idstring | nullrequireduuidUser billed for Create Audio work; null for prepare_sections workflows.
workflow_kindstringrequiredOne of
prepare_sectionscreate_audioautomation_profilestring | nullrequiredCreate Audio profile label from profile_snapshot.profile; null for prepare_sections.
One of
quickbalanceddirectedprofile_snapshotobjectrequiredEmpty object for prepare_sections workflows; the frozen Create Audio options for create_audio workflows.
statusstringrequiredWorkflow run status, recomputed from step statuses after every step transition. Non-terminal: queued (unfinished steps remain and none is active), running (at least one step is active), canceling (cancellation was requested and unfinished steps remain). Terminal (completed_at is set and the status no longer changes): completed (every step succeeded or was skipped), partially_completed (at least one failed or conflict step and at least one succeeded or skipped step), failed (failed or conflict steps and no succeeded or skipped step), cancelled (all steps finished after cancellation was requested).
One of
queuedrunningcompletedpartially_completedfailedcancelingcancelledcurrent_stagestring | nullrequiredStage of the next unfinished step while the run is queued, running, or canceling. Null once the run is terminal, or when the next unfinished step is render_section.
One of
preparing_sectionsassigning_speakerscasting_voicesplanning_emotiondirecting_deliveryplacing_project_soundsdirecting_sfxpreparing_voicesgenerating_audiostep_countintegerrequired1–100completed_step_countintegerrequired0–100Steps in a terminal status (succeeded, skipped, failed, conflict, cancelled).
progressobjectrequiredStep counts by status. Currently contains integer counts pending, active, succeeded (succeeded or skipped), failed (failed or conflict), cancelled, completed (all terminal), and total; treat unknown keys as additive.
7 child attributes
pendinginteger≥ 0activeinteger≥ 0succeededinteger≥ 0failedinteger≥ 0cancelledinteger≥ 0completedinteger≥ 0totalinteger≥ 0
error_summaryarray of objectrequiredmax 100 itemsOne entry per failed or conflict step in step order. Entries currently contain step_id, section_id, step_kind, code, and message; treat unknown keys as additive.
5 item attributes
step_idstringuuidsection_idstringuuidstep_kindstringKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectioncodestring | nullmessagestring | null
cancel_requested_atstring | nullrequireddate-timeWhen cancellation was first requested.
cancel_acknowledged_atstring | nullrequireddate-timeWhen the run reached cancelled.
created_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timeWhen execution first started; null before then.
completed_atstring | nullrequireddate-timeSet when the run reaches a terminal status (completed, partially_completed, failed, cancelled); null otherwise.
resumes_workflow_run_idstring | nullrequireduuidPredecessor run this run resumes; null for an original run.
resumablebooleanrequiredTrue when status is failed or partially_completed and at least one step is failed or conflict. Only resumable runs can be resumed.
stepsarray of objectrequired1–100 itemsAll steps in ascending step_index order.
19 item attributes
idstringrequireduuidworkflow_run_idstringrequireduuidsection_idstringrequireduuidstep_keystringrequired1–200 charsStable key of the step within its workflow.
step_indexintegerrequired0–99Zero-based position; steps are returned in ascending step_index order.
step_kindstringrequiredKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectionstatusstringrequiredStep status. pending and active are non-terminal; succeeded, skipped, failed, conflict, and cancelled are terminal. The run counts skipped as success and conflict as failure. conflict means the section document changed underneath the step.
One of
pendingactivesucceededskippedfailedconflictcancelledrequested_document_versionintegerrequired≥ 1Section document version the step was planned against.
execution_document_versioninteger | nullrequired≥ 1Section document version the step executed against, when recorded.
assistant_batch_idstring | nullrequireduuidChild assistant batch started by an assistant-driven step.
render_run_idstring | nullrequireduuidRender run started by a render_section step.
result_summaryobjectrequiredStep-specific result data, typed by the contract as an open JSON object. generate_stale_audio steps may carry the StudioWorkflowAudioResultSummary fields; steps cancelled before starting carry cancelled_before_start: true.
issue_kindstring | nullrequiredSet for failed and conflict steps; null for every other status.
One of
document_changedservice_out_of_syncassistant_failedworkflow_failederror_codestring | nullrequired1–200 charserror_messagestring | nullrequiredmax 10000 charscreated_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timecompleted_atstring | nullrequireddate-time
Errors 400, 401, 403, 404, 409, 500, 503 use the standard error envelope.
curl -X POST "https://lyricwinter.com/api/v1/studio/workflows/$WORKFLOW_RUN_ID/cancel" \
-H "Authorization: Bearer $LYRICWINTER_API_KEY"const workflowRunId = "<workflowRunId>";
const response = await fetch(`https://lyricwinter.com/api/v1/studio/workflows/${workflowRunId}/cancel`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LYRICWINTER_API_KEY}`,
},
});
const { data, error, request_id } = await response.json();import os
import requests
workflow_run_id = "<workflowRunId>"
response = requests.request(
"POST",
f"https://lyricwinter.com/api/v1/studio/workflows/{workflow_run_id}/cancel",
headers={
"Authorization": f"Bearer {os.environ['LYRICWINTER_API_KEY']}",
},
)
payload = response.json(){
"data": {
"run": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"project_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"requested_by_user_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"payer_user_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_kind": "prepare_sections",
"automation_profile": "quick",
"profile_snapshot": {},
"status": "queued",
"current_stage": "preparing_sections",
"step_count": 1,
"completed_step_count": 1,
"progress": {
"pending": 1,
"active": 1,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"completed": 1,
"total": 1
},
"error_summary": [
{
"step_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_kind": "prepare_section",
"code": "string",
"message": "string"
}
],
"cancel_requested_at": "2026-09-30T17:00:00.000Z",
"cancel_acknowledged_at": "2026-09-30T17:00:00.000Z",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z",
"resumes_workflow_run_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"resumable": true
},
"steps": [
{
"id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_run_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_key": "string",
"step_index": 1,
"step_kind": "prepare_section",
"status": "pending",
"requested_document_version": 1,
"execution_document_version": 1,
"assistant_batch_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"render_run_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"result_summary": {},
"issue_kind": "document_changed",
"error_code": "string",
"error_message": "string",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z"
}
]
},
"request_id": "req_01J9Z3K8QF4"
}Resume a failed workflow
POST/studio/workflows/{workflowRunId}/resume
studio:writeRetry with the same client_mutation_idStarts a new workflow linked to a failed or partially completed run. It picks up from each section's first failed stage instead of redoing finished work. Only runs with resumable: true can be resumed.
Path parameters
workflowRunIdstringrequireduuid
Request body application/json
schema_version1requiredactor_session_idstringrequireduuidClient session that issued the request.
client_mutation_idstringrequireduuidIdempotency key; the successor workflow ID is derived from it. Reusing it for different content returns 409.
Response 202
The linked successor workflow and its recovery steps. Fields below are inside data.
runobjectrequiredDurable Studio project workflow run.
21 child attributes
idstringrequireduuidWorkflow run ID.
project_idstringrequireduuidrequested_by_user_idstringrequireduuidpayer_user_idstring | nullrequireduuidUser billed for Create Audio work; null for prepare_sections workflows.
workflow_kindstringrequiredOne of
prepare_sectionscreate_audioautomation_profilestring | nullrequiredCreate Audio profile label from profile_snapshot.profile; null for prepare_sections.
One of
quickbalanceddirectedprofile_snapshotobjectrequiredEmpty object for prepare_sections workflows; the frozen Create Audio options for create_audio workflows.
statusstringrequiredWorkflow run status, recomputed from step statuses after every step transition. Non-terminal: queued (unfinished steps remain and none is active), running (at least one step is active), canceling (cancellation was requested and unfinished steps remain). Terminal (completed_at is set and the status no longer changes): completed (every step succeeded or was skipped), partially_completed (at least one failed or conflict step and at least one succeeded or skipped step), failed (failed or conflict steps and no succeeded or skipped step), cancelled (all steps finished after cancellation was requested).
One of
queuedrunningcompletedpartially_completedfailedcancelingcancelledcurrent_stagestring | nullrequiredStage of the next unfinished step while the run is queued, running, or canceling. Null once the run is terminal, or when the next unfinished step is render_section.
One of
preparing_sectionsassigning_speakerscasting_voicesplanning_emotiondirecting_deliveryplacing_project_soundsdirecting_sfxpreparing_voicesgenerating_audiostep_countintegerrequired1–100completed_step_countintegerrequired0–100Steps in a terminal status (succeeded, skipped, failed, conflict, cancelled).
progressobjectrequiredStep counts by status. Currently contains integer counts pending, active, succeeded (succeeded or skipped), failed (failed or conflict), cancelled, completed (all terminal), and total; treat unknown keys as additive.
7 child attributes
pendinginteger≥ 0activeinteger≥ 0succeededinteger≥ 0failedinteger≥ 0cancelledinteger≥ 0completedinteger≥ 0totalinteger≥ 0
error_summaryarray of objectrequiredmax 100 itemsOne entry per failed or conflict step in step order. Entries currently contain step_id, section_id, step_kind, code, and message; treat unknown keys as additive.
5 item attributes
step_idstringuuidsection_idstringuuidstep_kindstringKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectioncodestring | nullmessagestring | null
cancel_requested_atstring | nullrequireddate-timeWhen cancellation was first requested.
cancel_acknowledged_atstring | nullrequireddate-timeWhen the run reached cancelled.
created_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timeWhen execution first started; null before then.
completed_atstring | nullrequireddate-timeSet when the run reaches a terminal status (completed, partially_completed, failed, cancelled); null otherwise.
resumes_workflow_run_idstring | nullrequireduuidPredecessor run this run resumes; null for an original run.
resumablebooleanrequiredTrue when status is failed or partially_completed and at least one step is failed or conflict. Only resumable runs can be resumed.
stepsarray of objectrequired1–100 itemsAll steps in ascending step_index order.
19 item attributes
idstringrequireduuidworkflow_run_idstringrequireduuidsection_idstringrequireduuidstep_keystringrequired1–200 charsStable key of the step within its workflow.
step_indexintegerrequired0–99Zero-based position; steps are returned in ascending step_index order.
step_kindstringrequiredKind of work a step performs. prepare_sections workflows contain only prepare_section steps. direct_section_delivery and render_section come from older Create Audio profiles (and successors resumed from them); new workflows do not plan them.
One of
prepare_sectionassign_speakerscast_voicesdirect_emotiondirect_section_deliveryplace_project_soundsdirect_sfxprepare_voicesgenerate_stale_audiorender_sectionstatusstringrequiredStep status. pending and active are non-terminal; succeeded, skipped, failed, conflict, and cancelled are terminal. The run counts skipped as success and conflict as failure. conflict means the section document changed underneath the step.
One of
pendingactivesucceededskippedfailedconflictcancelledrequested_document_versionintegerrequired≥ 1Section document version the step was planned against.
execution_document_versioninteger | nullrequired≥ 1Section document version the step executed against, when recorded.
assistant_batch_idstring | nullrequireduuidChild assistant batch started by an assistant-driven step.
render_run_idstring | nullrequireduuidRender run started by a render_section step.
result_summaryobjectrequiredStep-specific result data, typed by the contract as an open JSON object. generate_stale_audio steps may carry the StudioWorkflowAudioResultSummary fields; steps cancelled before starting carry cancelled_before_start: true.
issue_kindstring | nullrequiredSet for failed and conflict steps; null for every other status.
One of
document_changedservice_out_of_syncassistant_failedworkflow_failederror_codestring | nullrequired1–200 charserror_messagestring | nullrequiredmax 10000 charscreated_atstringrequireddate-timeupdated_atstringrequireddate-timestarted_atstring | nullrequireddate-timecompleted_atstring | nullrequireddate-time
Errors 400, 401, 403, 404, 409, 500, 503 use the standard error envelope.
curl -X POST "https://lyricwinter.com/api/v1/studio/workflows/$WORKFLOW_RUN_ID/resume" \
-H "Authorization: Bearer $LYRICWINTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema_version": 1,
"actor_session_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"client_mutation_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20"
}'const workflowRunId = "<workflowRunId>";
const response = await fetch(`https://lyricwinter.com/api/v1/studio/workflows/${workflowRunId}/resume`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LYRICWINTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"schema_version": 1,
"actor_session_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"client_mutation_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20"
}),
});
const { data, error, request_id } = await response.json();import os
import requests
workflow_run_id = "<workflowRunId>"
response = requests.request(
"POST",
f"https://lyricwinter.com/api/v1/studio/workflows/{workflow_run_id}/resume",
headers={
"Authorization": f"Bearer {os.environ['LYRICWINTER_API_KEY']}",
},
json={
"schema_version": 1,
"actor_session_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"client_mutation_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20"
},
)
payload = response.json(){
"data": {
"run": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"project_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"requested_by_user_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"payer_user_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_kind": "prepare_sections",
"automation_profile": "quick",
"profile_snapshot": {},
"status": "queued",
"current_stage": "preparing_sections",
"step_count": 1,
"completed_step_count": 1,
"progress": {
"pending": 1,
"active": 1,
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"completed": 1,
"total": 1
},
"error_summary": [
{
"step_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_kind": "prepare_section",
"code": "string",
"message": "string"
}
],
"cancel_requested_at": "2026-09-30T17:00:00.000Z",
"cancel_acknowledged_at": "2026-09-30T17:00:00.000Z",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z",
"resumes_workflow_run_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"resumable": true
},
"steps": [
{
"id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"workflow_run_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"section_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
"step_key": "string",
"step_index": 1,
"step_kind": "prepare_section",
"status": "pending",
"requested_document_version": 1,
"execution_document_version": 1,
"assistant_batch_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
"render_run_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
"result_summary": {},
"issue_kind": "document_changed",
"error_code": "string",
"error_message": "string",
"created_at": "2026-09-30T17:00:00.000Z",
"updated_at": "2026-09-30T17:00:00.000Z",
"started_at": "2026-09-30T17:00:00.000Z",
"completed_at": "2026-09-30T17:00:00.000Z"
}
]
},
"request_id": "req_01J9Z3K8QF4"
}