---
agentTools:
  projectIndex: https://elai.readme.io/llms.txt
---

# Render a video

Render an existing video that was created before using another request, or with Elai Builder. It can also trigger the re-rendering of failed videos of previous batch requests.

> ❗️ This endpoint accepts work, it does not complete it
>
> A `200` means the render was **queued**. Validation runs after the response is sent, so no render
> failure can reach you as an HTTP status. Failures arrive as a **`video_error`** webhook, or as
> `status: "error"` on `GET /videos/{videoId}` if you poll.
>
> Messages you may receive that way:
>
> | Message | Cause |
> | :--- | :--- |
> | `Slide N is too long. Please limit speech to Xs.` | Speech exceeds the global per-slide limit |
> | `Slide N is too long for this avatar. Please limit speech to Xs.` | Speech exceeds this avatar's own limit, which is lower |
> | `Slide N uses a premium avatar that is no longer available...` | The slide's premium avatar is not available to your plan |
> | `You do not have enough minutes to render this video...` | No minutes left, and the workspace is not allowed to overrun |
> | `Your video has N slides but your plan allows only 3 slides to render.` | Free plans render at most 3 slides |
> | `Video with music should be minimum 2 seconds long` | Background music on a video shorter than 2s |
>
> If you cannot afford to miss a `video_error` — deliveries are single-attempt, with no retry —
> reconcile with `GET /videos` instead of relying on the callback alone.

Render existing video, that was created before using another request or with Elai Builder. Also, it can trigger the re-render of failed videos of previous batch requests.

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Elai Public API",
    "version": "1.0",
    "description": "Every endpoint below is served under `https://apis.elai.io/api/v1`.\n\n## Authentication\n\nSend your workspace API token as a bearer token on every request:\n\n```\nAuthorization: Bearer <your-api-token>\n```\n\nGenerate and rotate the token in the Elai web app under **Settings → API**, or through\n`POST /generateToken`. The token is scoped to one **workspace** and authenticates as that\nworkspace's admin user — it is not tied to an individual person, and it carries admin rights\ninside that workspace.\n\nA request with a missing, unknown or revoked token gets a bare `401` with no response body.\n\n> **Organizations on the Unlimited plan cannot use the API.** Their requests are rejected with the\n> same bare `401` as an invalid token, with nothing to distinguish the two. If a valid, freshly\n> generated token returns `401` on every endpoint, check the plan first.\n\n## Errors\n\nFailures carry a JSON body of the shape `{ \"message\": \"...\" }`. Validation failures on the newer\nendpoints may add an `errors` array naming the offending fields. `401` is the exception: it has no\nbody at all.\n\nBoth render endpoints are **fire-and-forget** — they queue work and return immediately, so a\n`200` means \"accepted\", not \"rendered\". Render failures surface only through the `video_error`\nwebhook, never as an HTTP error on the call that started the render.\n\n## Scope\n\nThis reference is generated from the running code rather than maintained by hand, so it cannot\nquietly fall behind the API it describes. It documents 94 operations across the\n`/api/v1` surface.\n\nEndpoints are grouped by subject in the sidebar. If something you need is missing, or an endpoint\ndoes not behave as described here, tell us.\n\n---\n\n_Generated from `HEAD` at `2a2222fdbe` on 2026-11-25._"
  },
  "servers": [
    {
      "url": "https://apis.elai.io/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "SECRET_KEY"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/videos/render/{videoId}": {
      "post": {
        "summary": "Render a video",
        "description": "Render an existing video that was created before using another request, or with Elai Builder. It can also trigger the re-rendering of failed videos of previous batch requests.\n\n> ❗️ This endpoint accepts work, it does not complete it\n>\n> A `200` means the render was **queued**. Validation runs after the response is sent, so no render\n> failure can reach you as an HTTP status. Failures arrive as a **`video_error`** webhook, or as\n> `status: \"error\"` on `GET /videos/{videoId}` if you poll.\n>\n> Messages you may receive that way:\n>\n> | Message | Cause |\n> | :--- | :--- |\n> | `Slide N is too long. Please limit speech to Xs.` | Speech exceeds the global per-slide limit |\n> | `Slide N is too long for this avatar. Please limit speech to Xs.` | Speech exceeds this avatar's own limit, which is lower |\n> | `Slide N uses a premium avatar that is no longer available...` | The slide's premium avatar is not available to your plan |\n> | `You do not have enough minutes to render this video...` | No minutes left, and the workspace is not allowed to overrun |\n> | `Your video has N slides but your plan allows only 3 slides to render.` | Free plans render at most 3 slides |\n> | `Video with music should be minimum 2 seconds long` | Background music on a video shorter than 2s |\n>\n> If you cannot afford to miss a `video_error` — deliveries are single-attempt, with no retry —\n> reconcile with `GET /videos` instead of relying on the callback alone.",
        "operationId": "render-video",
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The render was queued. This is not a completion signal — see the note above.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "accepted": true
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The video is a template. Templates are rendered through `/videos/renderTemplate/{videoId}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Templates cannot be rendered directly. Please use /renderTemplate/:videoId endpoint to render videos based on templates."
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "message": "Templates cannot be rendered directly. Please use /renderTemplate/:videoId endpoint to render videos based on templates."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The video belongs to another workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Video is assigned to another account"
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "message": "Video is assigned to another account"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The video does not exist, or the id is not a valid ObjectId.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Video not found"
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "message": "Video not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Rendering"
        ]
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "tags": [
    {
      "name": "Rendering",
      "description": "Turn a video into an MP4. Both render endpoints are fire-and-forget: a `200` means the job was queued, and failures arrive through the `video_error` webhook."
    }
  ],
  "_id": {
    "buffer": {
      "0": 106,
      "1": 154,
      "2": 229,
      "3": 101,
      "4": 201,
      "5": 178,
      "6": 243,
      "7": 252,
      "8": 223,
      "9": 58,
      "10": 69,
      "11": 151
    }
  }
}
````