Skip to main content

Overview

The Workflow Generation API lets you create a workflow from a natural-language prompt entirely through the API — no browser session required. Opus AI agents design and build the workflow for you; you poll the run until it completes.

Base URL

All API requests should be made to the following base URL:

Authentication

All API endpoints require authentication with your Opus API key, sent as a Bearer token.
Your key determines your identity: the acting user, your organization, and the workspaces you can target. Each endpoint additionally requires the listed workflow permission in the target workspace. A request with a missing, invalid, or expired key returns 401. Keys are also rate limited — sustained bursts return 429, independent of the active-run limits described below.
Your API key is a unique, secret credential. Store it securely and never expose it in client-side code.

Generation Flow

The typical flow for generating a workflow through the API follows these steps:
1

Start Generation

Kick off a new generation run using POST /generate. Opus AI agents begin designing and building your workflow.
2

Poll the Run

Check progress by polling GET /{workflowId}/run until the run reaches a terminal status.
3

Open the Workflow

Once complete, open the generated workflow in the Opus builder (or via the workflow APIs) using the returned workflowId.

Usage Notes

One run at a time per workflow. Starting a second run while one is active returns 409. Cancel the current run or wait for it to finish.
  • Polling: Progress updates continuously; polling every 3–10 seconds is plenty.
  • Time limit: Runs that exceed 25 minutes are cancelled automatically.
  • Files: Attach only files your user can access. A file that can’t be read is skipped with a note in the run’s task results rather than failing the run.

Available Endpoints

Generate Workflow

Start a new workflow generation run from a prompt

Get Run Status

Poll a generation run until it completes

Cancel a Run

Stop an in-progress generation run