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

# Get Results

> Poll the status of a triggered workflow and retrieve generated clips

### Endpoint

```http theme={null}
GET https://api.joinoverlap.com/workflow-results/{triggerId}
```

Poll this endpoint after `POST /trigger-template` returns a `triggerId`. We recommend polling every 5-10 seconds until the workflow reaches `Completed` or `Error`.

<Info>
  Use `renderedUrl` as the editable preview video. Call `POST /render` when you need a finalized export after clip edits.
</Info>

### Authentication

```http theme={null}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Path Parameters

| Parameter   | Description                                                          |
| ----------- | -------------------------------------------------------------------- |
| `triggerId` | Unique workflow run identifier returned by `POST /trigger-template`. |

## Response Format

```json theme={null}
{
  "status": "Pending | Processing | Learning | Completed | Error",
  "clips": [],
  "error": "Error message when status is Error"
}
```

Statuses can vary by workflow step, but successful runs finish with `Completed` and failed runs finish with `Error`.

## Completed Response

```json theme={null}
{
  "clips": [
    {
      "aspectRatio": "16:9",
      "bio": "An experienced startup founder and investor explains how founder psychology can make or break a company.",
      "duration": 51.724999,
      "endTimestamp": 51.724999,
      "id": "0e3b1690-3bad-42cc-810d-87fd433054b8",
      "keywords": ["startup", "founder psychology", "self-awareness"],
      "people": ["Startup Founder"],
      "renderedUrl": "https://cdn.overlap.ai/fe249157-6be2-4fce-9aec-961f800604f1.mp4",
      "startTimestamp": 0.0,
      "thumbnailURL": "https://cdn.overlap.ai/thumbnails/ce99b3c5-4d5d-4cc4-ae69-b835d23fe77a_thumb.jpg",
      "timestampBoundary": {
        "start": 0.0,
        "end": 30.0
      },
      "title": "Startup Founder: You're Your Startup's Biggest Threat",
      "viralityScore": 89.5
    }
  ],
  "status": "Completed"
}
```

## Processing Response

```json theme={null}
{
  "clips": [],
  "status": "Processing"
}
```

## Error Response

```json theme={null}
{
  "clips": [],
  "status": "Error",
  "error": "Workflow failed while processing the source video."
}
```

## Recommended Polling Pattern

```javascript javascript theme={null}
async function getWorkflowResults(triggerId) {
  const response = await fetch(
    `https://api.joinoverlap.com/workflow-results/${triggerId}`,
    {
      headers: {
        "Authorization": `Bearer ${process.env.OVERLAP_API_KEY}`,
        "Content-Type": "application/json"
      }
    }
  );

  return response.json();
}
```

* Continue polling while `status` is `Pending`, `Processing`, `Learning`, or another in-progress workflow step.
* Stop polling when `status` is `Completed` and use the returned `clips`.
* Stop polling when `status` is `Error` and show or log the returned `error`.

## Clip Object

| Property                  | Type       | Description                                                                       |
| ------------------------- | ---------- | --------------------------------------------------------------------------------- |
| `id`                      | `string`   | Unique identifier for the clip. Use this as `clipId` for update and render calls. |
| `title`                   | `string`   | Title of the clip.                                                                |
| `bio`                     | `string`   | Short contextual description or bio for the clip.                                 |
| `keywords`                | `string[]` | Array of relevant keywords or tags associated with the clip.                      |
| `people`                  | `string[]` | Array of people (e.g., speakers) featured in the clip.                            |
| `duration`                | `number`   | Total duration of the clip in seconds.                                            |
| `startTimestamp`          | `number`   | Timestamp (in seconds) where the clip starts in the source video.                 |
| `endTimestamp`            | `number`   | Timestamp (in seconds) where the clip ends in the source video.                   |
| `timestampBoundary`       | `object`   | Object defining the clipping boundary (see below).                                |
| `timestampBoundary.start` | `number`   | Start boundary (in seconds) for clip extraction.                                  |
| `timestampBoundary.end`   | `number`   | End boundary (in seconds) for clip extraction.                                    |
| `aspectRatio`             | `string`   | Aspect ratio of the clip, e.g., `"16:9"` or `"9:16"`.                             |
| `renderedUrl`             | `string`   | Public preview video URL. Use `/render` for a finalized export after changes.     |
| `rawUrl`                  | `string`   | Raw clip URL when available.                                                      |
| `thumbnailURL`            | `string`   | URL to the thumbnail image for the clip.                                          |
| `viralityScore`           | `number`   | Numerical score indicating the clip's predicted virality potential.               |

<CardGroup cols={2}>
  <Card title="Update Clip" icon="pen-to-square" color="#ff2700" href="/api-reference/update-clip">
    Save edited clip fields before rendering
  </Card>

  <Card title="Render Clip" icon="play" color="#ff2700" href="/api-reference/render">
    Create a finalized clip export
  </Card>
</CardGroup>
