---
title: "Generate a document from a video"
method: POST
path: "/v1/videos/{id}/documents"
tags: ["Videos"]
---

# Generate a document from a video

`POST /v1/videos/{id}/documents`

## Request

- Base URL: `https://api.tella.com`
- URL: `https://api.tella.com/v1/videos/{id}/documents`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/withchima/apis/tella-public-api/docs/v1/videos/:id/documents/post.ts> (a function with typed inputs; its response is checked against the schema)

Starts writing a document from the video's transcript, the same way the Ask tab on the video's share page does, and returns it right away with `status: pending`. Poll GET /v1/videos/{id}/documents/{documentId} until `status` is `completed` (then `content` holds the Markdown) or `failed`, or subscribe to the `document.generated` webhook. Most documents finish within a minute. The document uses only what was said in the video and follows the transcript's language unless the prompt asks for another. Returns 403 when document generation is turned off in the video's settings (`documentGenerationEnabled`) and 429 past 20 documents per minute per workspace; a video without a transcript fails the document. Documents are kept for 7 days.

## Path parameters

- `id` string, required: Unique video identifier

## Request body

- GenerateDocumentRequest
  - `prompt` string, required: What to write from the video, such as a summary, step-by-step guide, meeting notes or FAQ.

## Response `202`

Generation started

- DocumentResponse
  - `document` Document, required
    - `completedAt` string, date-time, nullable, required
    - `content` string, nullable, required: The document as Markdown once `status` is `completed`, otherwise null. Its first `# ` heading, when present, is the title.
    - `createdAt` string, date-time, required
    - `error` string, nullable, required: Why generation failed, when `status` is `failed`
    - `id` string, required
    - `prompt` string, required
    - `status` 'pending' | 'completed' | 'failed', required: `pending` while the document is being written (usually a few seconds to a minute), then `completed` or `failed`.
    - `videoId` string, required

## Other responses

- `400`: The request was malformed or contained invalid parameters.
- `401`: Authentication is required. Provide a valid API key.
- `403`: You don't have permission to access this resource.
- `404`: The requested resource was not found.
- `409`: The request conflicts with the resource's current state, e.g. an Idempotency-Key whose first request is still in progress. Retry once it settles.
- `429`: You have exceeded the rate limit. Please slow down.
- `500`: An unexpected error occurred
- `501`: The requested operation is not implemented.
- `503`: A dependency was unavailable and the request was not executed. Safe to resend unchanged after the Retry-After delay.

## Changes

> 71 revisions in range; 1 not diffed.

- **2026-11-09** `8b204556fec0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/withchima/apis/tella-public-api/changes/v1/videos/:id/documents/post.md)

---

[API](https://skmtc.dev/withchima/apis/tella-public-api.md) - [All operations](https://skmtc.dev/withchima/apis/tella-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withchima/apis/tella-public-api/revisions/a500b6d75f79?raw)
