Videos

Generate a document from a video

Changed on

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.

post/v1/videos/{id}/documents

Request

Path parameters

idstring required

Unique video identifier

Example:vid_abc123def456

Request body

promptstring required

What to write from the video, such as a summary, step-by-step guide, meeting notes or FAQ.

Example request

{
  "prompt": "Write a step-by-step guide from this video"
}

Response

Generation started

Example response

{
  "document": {
    "content": "# How to export a video\n\n1. Open the video...",
    "id": "doc_abc123",
    "status": "completed",
    "videoId": "vid_abc123"
  }
}

Changes