Workflows API
Download OpenAPI DocumentChain 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.
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
Everything a workflow can be built from. nodeTypes lists each step type with its key (a node's nodeTypeKey), its inputSchema and outputSchema (the field keys for config, inputBindings and edge handles), the permission it needs (requires) and whether it charges credits (flags.charges). Gates are the logic.* types. portTypes names what each dataType carries, galaxies the products, and aiModels the models the LLM step can use. The same for every organization.
Permission: cosmos:read. An API key acts with the role of the member who created it.
Responses
200The step types and their metadata.
Every step type you can place in a flow, gates and the Start and End markers included.
Show child attributes
Step type key. Use it as a node's nodeTypeKey.
Product that runs the step: translate-video, playground, quality-control, ai or logic.
Display name.
What the step does.
Inputs. Each one is set in config, wired from an earlier step, or asked for when the flow runs.
Show child attributes
Field key within the step: the key to use in config, inputBindings and edge handles.
Display name.
What kind of value it is: text, textarea, number, select, boolean, file, language (a language code), tm (a translation memory id), region (a Quality Control region id), upstreamRef (a value wired from an earlier step, or for a file, uploaded at run time), or a type of the step's own, such as voice.
Port type. A binding edge may join an output to an input only when their dataTypes match (any matches everything). See portTypes for the list.
Whether the step needs a value: set in config, wired, or given when the flow runs.
Takes a list of values instead of one.
Help text.
The allowed values of a select field.
Show child attributes
What the Universe app shows.
The value to send.
Where the Universe app loads the allowed values from, for example cosmos_ai_models (the aiModels list in this response).
Value used when you set none.
For an upstreamRef input: the output key of an earlier step it usually reads. Informational; the wire is what counts.
What the port carries more precisely than dataType, such as docx, pptx, image or text. Two ports connect only when these overlap. Absent: unrestricted. Empty: the port carries nothing in this configuration.
The config key whose value sets this port's dataType (the LLM step's ports change with its input and output kinds).
The config key whose value sets this port's modalities.
For modalitiesFrom: config value → the modalities the port then carries. Values not listed carry themselves.
Outputs that later steps can read through a binding.
Show child attributes
Field key within the step: the key to use in config, inputBindings and edge handles.
Display name.
What kind of value it is: text, textarea, number, select, boolean, file, language (a language code), tm (a translation memory id), region (a Quality Control region id), upstreamRef (a value wired from an earlier step, or for a file, uploaded at run time), or a type of the step's own, such as voice.
Port type. A binding edge may join an output to an input only when their dataTypes match (any matches everything). See portTypes for the list.
Whether the step needs a value: set in config, wired, or given when the flow runs.
Takes a list of values instead of one.
Help text.
The allowed values of a select field.
Show child attributes
What the Universe app shows.
The value to send.
Where the Universe app loads the allowed values from, for example cosmos_ai_models (the aiModels list in this response).
Value used when you set none.
For an upstreamRef input: the output key of an earlier step it usually reads. Informational; the wire is what counts.
What the port carries more precisely than dataType, such as docx, pptx, image or text. Two ports connect only when these overlap. Absent: unrestricted. Empty: the port carries nothing in this configuration.
The config key whose value sets this port's dataType (the LLM step's ports change with its input and output kinds).
The config key whose value sets this port's modalities.
For modalitiesFrom: config value → the modalities the port then carries. Values not listed carry themselves.
How the Universe app links to the work the step created. Null for gates.
Show child attributes
What the link opens: tv_editor (a Video Dubbing job), qc_decision (a Quality Control result), pg_document (a document translation), and so on.
Path in the Universe web app, relative to your organization, once the step has created its job.
The job the link opens, where the step sets it.
The Quality Control result the link opens, where set.
Behaviour flags.
Show child attributes
The step charges credits when it starts, at the rate of the product that does the work.
The step can stop and wait for a person, which puts the run in awaiting_action.
The step must be wired from an earlier step.
control for a logic gate (logic.*). Absent for a step that runs a product.
Which gate this is. Set only when kind is control.
True for logic.start and logic.end: every flow has exactly one of each, and the Universe app adds them for you.
Icon name used by the Universe app.
Palette section.
Structured output: each name listed in the placed node’s config[configKey] is one more output of this type / dataType (the LLM step’s outputFields).
Settings fixed in config when you save the flow and never asked for at run time (the LLM step only).
Show child attributes
Field key within the step: the key to use in config, inputBindings and edge handles.
Display name.
What kind of value it is: text, textarea, number, select, boolean, file, language (a language code), tm (a translation memory id), region (a Quality Control region id), upstreamRef (a value wired from an earlier step, or for a file, uploaded at run time), or a type of the step's own, such as voice.
Port type. A binding edge may join an output to an input only when their dataTypes match (any matches everything). See portTypes for the list.
Whether the step needs a value: set in config, wired, or given when the flow runs.
Takes a list of values instead of one.
Help text.
The allowed values of a select field.
Show child attributes
What the Universe app shows.
The value to send.
Where the Universe app loads the allowed values from, for example cosmos_ai_models (the aiModels list in this response).
Value used when you set none.
For an upstreamRef input: the output key of an earlier step it usually reads. Informational; the wire is what counts.
What the port carries more precisely than dataType, such as docx, pptx, image or text. Two ports connect only when these overlap. Absent: unrestricted. Empty: the port carries nothing in this configuration.
The config key whose value sets this port's dataType (the LLM step's ports change with its input and output kinds).
The config key whose value sets this port's modalities.
For modalitiesFrom: config value → the modalities the port then carries. Values not listed carry themselves.
Permission the step needs, checked when you save a flow that adds the step, when a run starts or is retried, and again just before the step runs.
Show child attributes
Permission resource; also the product your organization's plan must include.
Permission action.
Additional permissions that must all hold for this step.
Show child attributes
Permission resource; also the product your organization's plan must include.
Permission action.
Internal name of the product workflow the step runs. Informational.
Version of that workflow. Informational.
Inputs of that workflow. Informational.
Every port type a field's dataType can name.
Show child attributes
Matches a field's dataType.
Display name.
Colour the Universe app draws it in.
The products that contribute step types.
Show child attributes
Matches a step type's galaxy.
Display name.
Accent colour the Universe app uses.
The models the LLM step (ai.llm) can use.
Show child attributes
Model id. Use it as the LLM step's config.model.
Who provides the model.
What the model produces. It must match the kind of output the step is set to produce.
Display name.
Short description.
File kinds the model reads directly, beyond plain text, such as image, pdf, audio or video.
Its price list rate. Your organization may have its own rates.
Show child attributes
How the model is billed: per 1,000 tokens (input and output), per image (perImage) or per second of video (perSecond).
Credits per 1,000 input tokens (tokens only).
Credits per 1,000 output tokens (tokens only).
Credits per image (image only).
Credits per second of video (video only).
Largest input the model takes, in tokens.
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
403Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
curl '{{API_BASE_URL}}/v1/cosmos/node-types' \
--header 'x-api-key: YOUR_API_KEY'{
"nodeTypes": [
{
"key": "tv.instant_clone",
"kind": "control",
"controlKind": "approval",
"system": true,
"galaxy": "translate-video",
"label": "Dub with Voice Clone",
"description": "Dub a video into another language, re-voicing each speaker in their own cloned voice.",
"icon": "mic",
"category": "translate-video",
"inputSchema": [
{
"key": "targetLanguage",
"label": "Target language",
"type": "language",
"dataType": "language",
"required": true,
"multiple": true,
"description": "The language to translate and dub into.",
"options": [
{}
],
"optionsSource": "cosmos_ai_models",
"default": "auto-detect",
"refOutputKey": "deliverable",
"modalities": [
"docx"
],
"dataTypeFrom": "inputModality",
"modalitiesFrom": "inputModality",
"modalitiesMap": {
"image": []
}
}
],
"outputSchema": [
{
"key": "targetLanguage",
"label": "Target language",
"type": "language",
"dataType": "language",
"required": true,
"multiple": true,
"description": "The language to translate and dub into.",
"options": [
{}
],
"optionsSource": "cosmos_ai_models",
"default": "auto-detect",
"refOutputKey": "deliverable",
"modalities": [
"docx"
],
"dataTypeFrom": "inputModality",
"modalitiesFrom": "inputModality",
"modalitiesMap": {
"image": []
}
}
],
"outputsFrom": {
"configKey": "outputFields",
"type": "text",
"dataType": "text"
},
"configSchema": [
{
"key": "targetLanguage",
"label": "Target language",
"type": "language",
"dataType": "language",
"required": true,
"multiple": true,
"description": "The language to translate and dub into.",
"options": [
{}
],
"optionsSource": "cosmos_ai_models",
"default": "auto-detect",
"refOutputKey": "deliverable",
"modalities": [
"docx"
],
"dataTypeFrom": "inputModality",
"modalitiesFrom": "inputModality",
"modalitiesMap": {
"image": []
}
}
],
"navigation": {
"kind": "tv_editor",
"deepLink": "galaxy/translate-video/editor/9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b",
"processId": "9b1f6c2e-3d4a-4e5f-8a7b-1c2d3e4f5a6b",
"decisionId": "4a8e2b71-0c3d-4f5e-9a6b-7c8d9e0f1a2b"
},
"flags": {
"charges": true,
"humanGate": false,
"requiresUpstream": false
},
"requires": {
"resource": "translate_video.process_log",
"action": "create"
},
"requiresAll": [
{
"resource": "translate_video.process_log",
"action": "create"
}
],
"subWorkflowName": "translate_video_dubbing",
"subWorkflowVersion": 1,
"subWorkflowInputKeys": [
"processId",
"orgId"
]
}
],
"portTypes": [
{
"key": "tv_process_id",
"label": "Video run",
"color": "#2563EB"
}
],
"galaxies": [
{
"galaxy": "translate-video",
"label": "Video Dubbing",
"accent": "#6366F1"
}
],
"aiModels": [
{
"id": "gpt-5.6-luna",
"provider": "openai",
"emits": "text",
"label": "GPT-5.6 Luna",
"hint": "Cheapest here · OpenAI",
"acceptsNatively": [
"image",
"pdf"
],
"contextWindowTokens": 1050000,
"rate": {
"kind": "tokens",
"input": 1,
"output": 5,
"perImage": 6,
"perSecond": 60
}
}
]
}Runs
A run is one execution of a workflow with its own inputs. Start it, poll it until it finishes, then retry or cancel it if you need to. You can also rename a run, file it in a folder and choose who owns each step.
- POST/v1/cosmos/flows/{id}/run
- GET/v1/cosmos/executions
- GET/v1/cosmos/executions/{id}
- POST/v1/cosmos/executions/{id}/retry
- POST/v1/cosmos/executions/{id}/rename
- GET/v1/cosmos/executions/{id}/images.zip
- PATCH/v1/cosmos/executions/{id}/project
- POST/v1/cosmos/executions/{id}/images/save-to-drive
- POST/v1/cosmos/executions/{id}/nodes/{nodeId}/step-owners
Start a run
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.