Skip to main content

Overview

This endpoint allows you to execute a specific workflow by providing its ID and required input parameters. The response is returned after the model finishes generating — ideal for server-side integrations where you don’t need real-time streaming.

Endpoint

  • HTTP Method: POST
  • URL: /api/v1/run/{workflow_id}
Replace {workflow_id} with the actual workflow ID (e.g. wf_abc123).

Features

Full Response

Receive the complete generated output in a single JSON response.

Bearer Key Auth

Authenticate with your API secret key via the Authorization header.

Web Search Citations

Automatically receive source citations when the model uses web search.

Rate Limit Headers

Monitor your usage with rate limit headers in every response.

Authentication

Requires a Bearer token in the Authorization header.

Request

Path Parameters Request Body Content-Type: application/json Pass your workflow’s input variables as key/value pairs. The keys must match the variable names defined in your workflow template.

Example Request

Response

A successful response returns the full generated text and optional citations:
Response Headers

Error Responses

Missing or invalid API key.
No credits remaining on the account.
Workflow not found or not published.
Rate limit exceeded.
Something went wrong during execution.

Code Examples

Additional Notes

  • Input Variables: The request body keys must exactly match the variable names in your workflow template (e.g. {{story}}).
  • Max Duration: Requests can run for up to 300 seconds before timing out.
  • Credits: Each successful run deducts credits from your organization’s balance based on token usage.
  • Streaming Alternative: If you need real-time output as it’s generated, use the Streaming Workflow endpoint instead.