Skip to main content
POST
Create a workflow from a plain-language prompt entirely through the API — no browser session required. Opus AI agents design and build the workflow for you, and this endpoint returns immediately with a runId you poll until the generation finishes.
Generation is asynchronous. This endpoint creates the workflow and starts the run, then returns right away. Track progress with Get Run Status until the run reaches a terminal status.
Requires the Workflow: Full permission in the target workspace.

Body Parameters

string
required
What to build, in plain language. Be specific: the goal, the steps you already know, decisions to be made, and the systems involved.
string
required
The UUID of the workspace to create the workflow in. You must be a member of this workspace.
string
Workflow name. Defaults to the first 60 characters of the prompt.
string
Short title for the run. Generated automatically when omitted.
string[]
Uploaded file references to give the AI as context (process docs, examples, specs). Maximum of 10.
string[]
Org unit UUIDs to tag the new workflow to. Maximum of 100. Omitted or empty means no tagging.
Your organization is always taken from the API key — it cannot be set in the body.

Response

string
required
The workflow’s catalog entity ID.
string
required
The workflow ID. Use this as {workflowId} in Get Run Status and Cancel a Run.
string
required
The ID of the workflow version created for this generation.
string
required
The generation run ID. Poll it with Get Run Status.
string
required
The initial run status (e.g., processing).
boolean
Whether the run is registered and underway. false indicates the run was not confirmed in room state.

Errors

Bad Request
Invalid body (bad UUIDs, more than 10 files or 100 org units), or the API key has no active organization.
Unauthorized
Missing, invalid, or expired API key, or the key’s user is no longer a member of the organization.
Forbidden
The key’s user lacks the Workflow: Full permission in the target workspace.
Not Found
No workspace found — the workspace doesn’t exist or you don’t have access to it.
Conflict
This workflow already has a run in progress. Only one run is allowed at a time.
Too Many Requests
Too many active runs. Limits are 20 per workspace and 100 per organization. The response body carries {scope, limit, active}. Your API key’s own rate limit can also return 429.
Service Unavailable
Generation is temporarily unavailable — retry shortly.