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

# Get Run Output

> Retrieve the output of a completed workflow run

# Get Run Output

Returns the output data from a completed workflow run. Only call this after the run status is `completed`.

## Path Parameters

<ParamField path="workflowId" type="string" required>
  The unique identifier of the workflow
</ParamField>

<ParamField path="runId" type="string" required>
  The unique identifier of the run
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  A map of row IDs to their output objects. Each row's output contains the field mappings you configured in your Output node(s).
</ResponseField>

## Example Outputs

### Single Row

```json theme={null}
{
  "success": true,
  "data": {
    "bcf88898-fc5f-410b-b749-0c65b2902d3e": {
      "summary": "This is the generated summary text..."
    }
  }
}
```

### Multiple Fields

```json theme={null}
{
  "success": true,
  "data": {
    "bcf88898-fc5f-410b-b749-0c65b2902d3e": {
      "title": "Generated Title",
      "description": "Generated description text...",
      "tags": ["tag1", "tag2", "tag3"]
    }
  }
}
```

### Multiple Rows

```json theme={null}
{
  "success": true,
  "data": {
    "row-id-1": {
      "result": "Output for first input"
    },
    "row-id-2": {
      "result": "Output for second input"
    },
    "row-id-3": {
      "result": "Output for third input"
    }
  }
}
```

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response \
    -H "x-origami-key: your-api-key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response',
    {
      headers: { 'x-origami-key': 'your-api-key' },
    }
  );

  const { data } = await response.json();

  // Access outputs by row ID
  for (const [rowId, output] of Object.entries(data)) {
    console.log(`Row ${rowId}:`, output);
  }
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response",
      headers={"x-origami-key": "your-api-key"},
  )

  data = response.json()["data"]

  # Access outputs by row ID
  for row_id, output in data.items():
      print(f"Row {row_id}: {output}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "data": {
      "bcf88898-fc5f-410b-b749-0c65b2902d3e": {
        "summary": "AI-generated summary of the input document...",
        "sentiment": "positive",
        "confidence": 0.95
      }
    }
  }
  ```

  ```json 400 Not Completed theme={null}
  {
    "success": false,
    "error": "Workflow run is not completed. Current status: running"
  }
  ```

  ```json 400 Failed Run theme={null}
  {
    "success": false,
    "error": "Workflow run is not completed. Current status: failed. Error: Node 'api_call' failed: Connection timeout"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "success": false,
    "error": "Workflow run not found"
  }
  ```
</ResponseExample>
