> ## Documentation Index
> Fetch the complete documentation index at: https://developer.opus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Programmatically generate workflows, upload files, run cases, and retrieve results with the Opus API

## Overview

The Opus API allows external applications to programmatically generate workflows, run them as **cases**, and monitor and retrieve their results — entirely through the API.

The API supports a full range of data inputs, including:

* Text and numbers
* Booleans and dates
* Objects and lists
* Single and multiple file uploads (max **10 MB** per file)

## Base URL

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

```
https://operator.opus.com/api/v1
```

## Authentication

All API endpoints require authentication using the `x-service-key` header.

```
x-service-key: <your_service_key>
```

<Note>
  Your API key is a unique, secret credential. Store it securely and never expose it in client-side code.
</Note>

## Case Execution Flow

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

<Steps>
  <Step title="Get Workflow Details">
    Retrieve the workflow's input schema using `GET /workflow/{workflowId}` to understand what inputs are required. No workflow yet? [Generate one from a prompt](/api-reference/v1-workflow-generation/generate-headless).
  </Step>

  <Step title="Initiate Case">
    Create a new case using `POST /case` and receive a `caseId`.
  </Step>

  <Step title="Upload Files (if needed)">
    If your workflow requires file inputs, upload them using `POST /file/upload/presigned` and the presigned URL flow.
  </Step>

  <Step title="Execute Case">
    Run the case with your populated inputs using `POST /case/{caseId}/execute`. Optionally pass a `callbackUrl` to be notified when the run finishes.
  </Step>

  <Step title="Monitor Status">
    Check the case's progress using `GET /case/{caseId}/status` — or skip polling and wait for your callback.
  </Step>

  <Step title="Retrieve Results">
    Once completed, fetch the results using `GET /case/{caseId}/results`.
  </Step>
</Steps>

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Generate Workflow" icon="wand-magic-sparkles" href="/api-reference/v1-workflow-generation/generate-headless">
    Create a workflow from a natural-language prompt
  </Card>

  <Card title="Get Workflow Details" icon="diagram-project" href="/api-reference/v1-workflow-generation/get-workflow-details">
    Retrieve workflow schema and input requirements
  </Card>

  <Card title="Initiate Case" icon="play" href="/api-reference/v1-case/initiate-case">
    Create a new case for a workflow
  </Card>

  <Card title="Upload Files" icon="upload" href="/api-reference/v1-file/get-upload-url">
    Upload files for case inputs
  </Card>

  <Card title="Execute Case" icon="rocket" href="/api-reference/v1-case/execute-case">
    Run a case with populated inputs
  </Card>

  <Card title="Get Case Status" icon="spinner" href="/api-reference/v1-case/get-case-status">
    Check case execution progress
  </Card>

  <Card title="Get Case Results" icon="check" href="/api-reference/v1-case/get-case-results">
    Retrieve completed case outputs
  </Card>

  <Card title="Case Audit Log" icon="clock-rotate-left" href="/api-reference/v1-case/case-audit-log">
    Access per-node execution records
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.