> ## 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.

# Render Clip

> Render a clip after updates and receive a finalized video URL

### Endpoint

```http theme={null}
POST https://api.joinoverlap.com/render
```

Use this endpoint after saving clip edits with `POST /update-clip`, or whenever you need a finalized export for an existing clip. Rendering runs synchronously, so the request stays open until the render finishes or fails.

### Authentication

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

## Request Body

```json theme={null}
{
  "companyId": "your-company-id",
  "clipId": "clip-id-from-results"
}
```

| Field       | Type   | Required | Description                                                    |
| ----------- | ------ | -------- | -------------------------------------------------------------- |
| `companyId` | string | Yes      | Your Overlap company or organization identifier.               |
| `clipId`    | string | Yes      | The clip `id` returned by `GET /workflow-results/{triggerId}`. |

<RequestExample>
  ```javascript javascript theme={null}
  const response = await fetch("https://api.joinoverlap.com/render", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.OVERLAP_API_KEY}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      companyId: process.env.OVERLAP_COMPANY_ID,
      clipId: "clip-id-from-results"
    })
  });

  const data = await response.json();
  ```

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

  response = requests.post(
      "https://api.joinoverlap.com/render",
      headers={
          "Authorization": f"Bearer {os.environ['OVERLAP_API_KEY']}",
          "Content-Type": "application/json",
      },
      json={
          "companyId": os.environ["OVERLAP_COMPANY_ID"],
          "clipId": "clip-id-from-results",
      },
  )

  print(response.json())
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.joinoverlap.com/render" \
       -H "Authorization: Bearer $OVERLAP_API_KEY" \
       -H "Content-Type: application/json" \
       -d '{
             "companyId": "'"$OVERLAP_COMPANY_ID"'",
             "clipId": "clip-id-from-results"
           }'
  ```
</RequestExample>

## Response

```json theme={null}
{
  "status": "finished",
  "renderUrl": "https://cdn.overlap.ai/rendered/final-clip.mp4"
}
```

| Field       | Type   | Description                                             |
| ----------- | ------ | ------------------------------------------------------- |
| `status`    | string | `finished`, `failed`, or `rendering`.                   |
| `renderUrl` | string | URL of the newly rendered clip when rendering succeeds. |
| `error`     | string | Error message when rendering fails.                     |
| `code`      | string | Specific error code when available.                     |

## Performance

* Rendering runs synchronously.
* Expected runtime is about `20 seconds + video_length_seconds * 0.5`.
* Keep the connection open until the response returns.

<Card title="Clip Model" icon="square-kanban" color="#ff2700" href="/api-reference/clip-model">
  Review the clip fields returned by workflow results
</Card>
