v1.0.0OpenAPI 3.1.1

Workflows API

Download OpenAPI Document

Chain translation, review and dubbing steps into one automated run.

Chain steps such as dubbing, document translation, quality checks, exports and human approvals into one workflow, then run it as often as you like. New here? Read Workflows for the whole flow and the graph format.

Every request

Send your organization API key in the x-api-key header; it starts with uvk_. Create one in the Universe app under Settings → API keys. The key and organization limits count requests over a rolling minute. See Authentication and Rate limits.

The typical flow: find the step types you need with List step types, save a workflow with Create a workflow (check it first with Validate a workflow), read what a run asks for in its inputSchema, then Start a run and poll it with Get a run. When a run reaches an Approval gate, Approve a step or Reject a step.

Runs work in the background, so every call returns straight away. Saving a workflow is free. A run is charged step by step, as each step starts, at the rate of the product that does the work; Start a run lists the rates. Without enough credits it returns 402 and nothing starts. See Credits.

Every route needs a cosmos permission on the role of the member who created the API key: read to look, create, update and delete to manage workflows, execute to run them. Each step also needs the permission of its own product, listed in its requires.

Server
{{API_BASE_URL}}
Your API environment
Authentication RequiredApiKeyAuth
Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys.
x-api-key:
Client Libraries
Shell

Workflows

A workflow is a saved graph of steps and the edges between them. Create, validate, update and delete your organization's workflows here; built-in workflows can be read and run but not changed.

List workflows

Get a workflow

Create a workflow

Validate a workflow

Update a workflow

Get your copy of a ready-made workflow

Step types

The building blocks of a workflow: product steps such as dubbing, translation and quality checks, and the logic.* gates that wait, branch, run in parallel and ask for approval. Read them first to learn each step's field keys.

List step types

Start a run

Auth Required

Run a published workflow. Pass the values its inputSchema asks for in input, keyed by each entry's key. Optionally name the run, file it in a project (projectId), and name the members responsible for its steps (stepOwners, keyed by node id). The run starts in the background: you get an executionId straight away. Poll it with Get a run. The run uses the workflow as it is now; later edits do not change it.

Permission: cosmos:execute. An API key acts with the role of the member who created it.

Credits: Each step that does product work is charged when that step starts, at the rate of the product doing it (measured on its real input: minutes of video, words of a document, tokens of a prompt). Gates (Start, End, Delay, Approval, Switch, Parallel, Merge) are free. To start, your balance must cover at least 1 credit for every charging step; otherwise the API returns 402 and nothing starts. If the run fails on our side, the steps that did not finish are refunded and the finished ones stay charged. If you cancel the run or reject an Approval, every charge made so far is kept and the steps that never started are never charged.

Rate What it covers Price
Video Dubbing Dubbing a video, with or without instant voice cloning. Per minute of source video; a multi-speaker run is charged a third more, since each speaker is separately transcribed, voice-matched and synthesized. 300 credits per minute
Video → Subtitle Subtitling a video. Charged per minute of source video. 100 credits per minute
Subtitle → Transcript Translation Translating an uploaded subtitle file. Charged per minute of subtitle timeline (the file carries its own timings — there is no source video). 60 credits per minute
Transcript Autofix Correcting the pipeline's own transcript output — free by design. 0 credits per minute
Video Export Exporting the finished video — free. An export that applies lip-sync is charged as Lip-Sync on Export instead. 0 credits per minute
Image QC Quality-control check of an image. 150 credits per image
Audio QC Quality-control check of audio. Charged per minute. 150 credits per minute
Video QC Quality-control check of video. Charged per minute. 300 credits per minute
Word translation Translating a Word (.docx) file in the playground. Charged per source word. 0.5 credits per word
PowerPoint translation Translating a PowerPoint (.pptx) file in the playground. Charged per source word. 0.5 credits per word
Excel translation Translating an Excel (.xlsx) file in the playground. Charged per source word. 0.5 credits per word
PDF translation Translating a PDF in the playground, keeping its layout. Charged per source word. 0.5 credits per word
InDesign translation Translating an InDesign (.idml) file in the playground, keeping its layout and styles. Charged per source word. 0.5 credits per word
DITA translation Translating a DITA topic or map in the playground, keeping its structure and markup. Charged per source word. 0.5 credits per word
JSON translation Translating a JSON file in the playground. Charged per source word. 0.5 credits per word
XML translation Translating an XML file in the playground. Charged per source word. 0.5 credits per word
HTML translation Translating an HTML file in the playground. Charged per source word. 0.5 credits per word
XLIFF translation Translating an XLIFF file in the playground. Charged per source word. 0.5 credits per word
Text translation Translating plain text in the playground. Charged per source word. 0.5 credits per word
Text to speech Synthesizing speech in the video playground. Charged per second of generated audio. 120 credits per minute
Instant voice clone Creating one cloned voice from a sample in the video playground. Charged per cloned voice. 500 credits
Lip sync (sync-3) Rendering a lip-synced video on sync-3 in the video playground. Charged per second of rendered output. 2000 credits per minute
Lip sync (lipsync-2-pro) Rendering a lip-synced video on lipsync-2-pro in the video playground. Charged per second of rendered output. 1200 credits per minute
Lip sync (lipsync-2) Rendering a lip-synced video on lipsync-2 in the video playground. Charged per second of rendered output. 750 credits per minute
Lip sync (latentsync) Rendering a lip-synced video on latentsync in the video playground. Charged per second of rendered output. 300 credits per minute
Workflow LLM step (text) A model call in a Cosmos workflow that produces text — including every step that delivers a document, since the document is written around the text. Charged per 1,000 prompt/completion tokens, by model. Claude Opus 5: 24 credits per 1K tokens; Claude Sonnet 5: 16 credits per 1K tokens; Claude Haiku 4.5: 4 credits per 1K tokens; GPT-5.6 Sol: 16 credits per 1K tokens; GPT-5.6 Terra: 8 credits per 1K tokens; GPT-5.6 Luna: 2 credits per 1K tokens; Gemini 3.1 Pro: 16 credits per 1K tokens; Gemini 3.8 Flash: 4 credits per 1K tokens
Workflow LLM step (image) A model call in a Cosmos workflow that generates an image. Charged per image, the same for every model. 300 credits per image
Workflow LLM step (video) A model call in a Cosmos workflow that generates video. Charged per second of output, the same for every model. 200 credits per second

Path Parameters

idstring · uuidrequired

ID of the workflow to run.

Example: 3c9d7e1a-5b2f-4a6c-8d0e-1f2a3b4c5d6e

Bodyrequiredapplication/json

namestring

What to call this RUN. Optional — left out, one is derived from the inputs the run was started with (the source file, then the first identifying text), falling back to the flow name. On the run, not the flow: the flow name is the same for every run of it.

Example: Product launch — Hindi
inputobject

The values the flow asks for, keyed by the key of each entry in the workflow's inputSchema (<nodeId>__<fieldKey>). A file input takes a reference to a file: for Dub with Voice Clone, { "uploadIds": ["<upload id>"] } from the Video Dubbing uploads. Language inputs take a language code such as hi-IN. Left out: {}. A required input left empty fails its step when the step starts.

Example: {"dub__source":{"uploadIds":["5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9"]},"dub__tmId":"8c7b6a5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d"}
projectIdstring · uuid

Project to file this RUN under. Optional — omit for none. See List projects. Set on the run, not the flow: a flow is a reusable definition, a run belongs to one engagement.

Example: 6d5c4b3a-2e1f-4a0b-9c8d-7e6f5a4b3c2d
stepOwnersobject

Who is responsible for each step of THIS run, as { nodeId: memberId[] }. Owners are notified when their step completes, and at an approval gate they are the people expected to act. Per-run, never part of the flow: the same flow run twice is staffed twice. Only galaxy steps and approval gates accept an owner — other logic gates are rejected.

Example: {"review":["2b4d6f8a-1c3e-4a5b-8c7d-9e0f1a2b3c4d"]}
stepSettingsobject

This run's own values for settings the workflow's builder fixed, as { nodeId: { fieldKey: value } }: a step's settings and the inputs set in it (not wired), an approval's label and instructions, and a switch's cases (each case's operator and value only — the cases and their branches stay). Applied to this run only; the workflow is not changed. Delay, Parallel and Merge gates have nothing to set. null clears a value back to the step's default.

Example: {"n_4f2a9c1d":{"targetLanguage":"de-DE"},"n_7b3e0a52":{"instructions":"Check the brand terms."}}

Responses

201The run was created and started; `status` is `RUNNING`. Its steps are charged as each one starts.
application/json
executionIdstring · uuidrequired

Run ID. Poll it with Get a run.

Example: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
statusstringrequired

The run's status after the call. RUNNING, PAUSED (an Approval gate is waiting for Approve or Reject), COMPLETED, FAILED or TERMINATED (cancelled). The last three are final.

Enum values:RUNNINGPAUSEDCOMPLETEDFAILEDTERMINATED
Example: RUNNING
400Nothing was started. A field failed validation, or: `This flow has no runnable steps yet — add nodes and save first.` (the workflow is a `draft`), or a `stepOwners` problem: `Step "<nodeId>" is not part of this flow.`, `"<step>" is not a step that can be given an owner.` (only product steps and Approval gates take owners), or `Some members do not belong to this organization`. After a `stepOwners` problem the run is listed as `running` but never starts and charges nothing: cancel it.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
402Your balance does not cover 1 credit for every step that charges, or your organization owes credits. Nothing was started.
application/json
statusCodenumberrequired

HTTP status code.

Example: 402
errorstringrequired

Always InsufficientCredits.

Example: InsufficientCredits
messagestringrequired

What happened, in plain words.

Example: You don't have enough credits to start this. It needs 120; you have 45.
requirednumberrequired

Credits this request needs.

Example: 120
availablenumberrequired

Credits your organization can spend now.

Example: 45
owednumberrequired

Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.

Example: 0
403Not allowed. Besides a missing `cosmos:execute`: `You don't have permission to run "<step>". Ask an admin for access.` (the API key's role lacks the permission a step needs, listed in its `requires`), or `Your organization does not have access to "<step>".` (the product is not in your plan). Nothing was started or charged.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
404No workflow with this `id` in your organization, or it was deleted (`Flow <id> not found`). Or `projectId` is not a project in your organization (`Project not found`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
503Conductor would not start the run (`The run could not be started. Retry it, or start a new run.`). It is recorded as `FAILED` with that reason, and nothing was charged: Retry a run starts it again.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
POST/v1/cosmos/flows/{id}/run
curl '{{API_BASE_URL}}/v1/cosmos/flows/3c9d7e1a-5b2f-4a6c-8d0e-1f2a3b4c5d6e/run' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Product launch — Hindi",
  "input": {
    "dub__source": {
      "uploadIds": [
        "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9"
      ]
    },
    "dub__tmId": "8c7b6a5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d"
  },
  "projectId": "6d5c4b3a-2e1f-4a0b-9c8d-7e6f5a4b3c2d",
  "stepOwners": {
    "review": [
      "2b4d6f8a-1c3e-4a5b-8c7d-9e0f1a2b3c4d"
    ]
  },
  "stepSettings": {
    "n_4f2a9c1d": {
      "targetLanguage": "de-DE"
    },
    "n_7b3e0a52": {
      "instructions": "Check the brand terms."
    }
  }
}'
{
  "executionId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "status": "RUNNING"
}

List runs

Get a run

Retry a run

Rename a run

Download a run’s images

Move a run to a project

Save a run’s images to Drive

Set step owners

Approvals

An Approval gate pauses a run until someone decides. While it waits, the run's status is awaiting_action: approve the step to continue, or reject it to stop the run.

Approve a step

Reject a step

Models

AiModelDto
AiModelRateDto
ExecutionListCountsDto
ExecutionListItemDto
ExecutionListMetaDto
ExecutionNodeControlDto
ExecutionNodeDto
ExecutionProgressDto
ExecutionResponseDto
ExecutionStartedByDto
ExecutionStatusResponseDto
FlowEdgeConditionDto
FlowEdgeDto
FlowGraphDto
FlowInputBindingDto
FlowNodeDto
FlowNodePositionDto
FlowResponseDto
InsufficientCreditsErrorDto
ListExecutionsResponseDto
MovedProjectDto
MoveExecutionProjectBodyDto
MoveExecutionProjectResponseDto
NodeFieldDto
NodeFieldOptionDto
NodeFlagsDto
NodeNavigationDto
NodeRequirementDto
NodeTypeDto
NodeTypesResponseDto
PortTypeDto
RejectGateBodyDto
RenameExecutionDto
RenameExecutionResponseDto
RunInputFieldDto
SaveFlowDto
SaveRunImagesDto
SetStepOwnersDto
SharedInputDto
StartExecutionDto
StepGalaxyDto
StepOwnerDto
StepOwnersResponseDto
ValidateFlowDto
ValidateFlowResponseDto