---
title: "Get Script API — Read What Is Said in a Video | Pogclip Docs"
description: "Read a Pogclip video's current script lines, timestamps, layers, version number and readiness status before editing or exporting."
url: https://pogclip.com/docs/get-script
---

# Read the script

Returns what is said in a video right now as numbered lines with timestamps, along with its `version` and `layers`. Before the script is ready, it reports whether the video is still preparing, needs a transcript or is transcribing.

|          |                                      |
| -------- | ------------------------------------ |
| MCP tool | `get_script`                         |
| API      | `GET /api/v1/videos/{clipId}/script` |
| Credits  | Free                                 |

## When to use it

- Poll after [`open_video`](https://pogclip.com/docs/open-video) or [`transcribe_video`](https://pogclip.com/docs/transcribe-video) until `status` is `ready` or `needs_transcript`.
- Call before [`cut_video`](https://pogclip.com/docs/cut-video), [`edit_captions`](https://pogclip.com/docs/edit-captions) or [`edit_layers`](https://pogclip.com/docs/edit-layers) to get the current `version` and line numbers.
- Call again whenever an edit returns `video_changed` to read the latest `version`.

## Parameters

| Name     | Type   | Required | What it is                                                  |
| -------- | ------ | -------- | ----------------------------------------------------------- |
| `clipId` | string | Yes      | The clipId from open\_video, or a clip ID from list\_clips. |

## Call it from an AI agent

```json
{
  "name": "get_script",
  "arguments": {
    "clipId": "f8669b08"
  }
}
```

## Call it from your code

```bash
curl "https://pogclip.com/api/v1/videos/f8669b08/script" \
  -H "Authorization: Bearer $POGCLIP_API_KEY"
```

## What you get back

Before there is a transcript:

```json
{
  "clipId": "f8669b08",
  "name": "Why I started filming again",
  "pageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?clip=f8669b08",
  "downloadPageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?download=f8669b08",
  "status": "needs_transcript",
  "durationSeconds": 510,
  "transcriptCredits": 9,
  "next": "Transcribing this video uses 9 credits: today's 10 free transcripts are used up."
}
```

With a transcript:

```json
{
  "clipId": "f8669b08",
  "name": "Why I started filming again",
  "pageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?clip=f8669b08",
  "downloadPageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?download=f8669b08",
  "status": "ready",
  "version": 0,
  "durationSeconds": 510,
  "script": [
    {
      "line": 1,
      "start": 0.1,
      "end": 2,
      "text": "Okay, here's the deal."
    },
    {
      "line": 2,
      "start": 2.3,
      "end": 8.1,
      "text": "I want to show you what I got wrong."
    }
  ],
  "next": "Cuts name these line numbers and this version. Cutting uses no credits."
}
```

The example above shows only the first two lines of `script`.

- `status`:

  - `preparing`: poll again in about 30 seconds.
  - `needs_transcript`: when `transcriptCredits` is `0` (free: 10 videos a day), call [`transcribe_video`](https://pogclip.com/docs/transcribe-video) straight away; otherwise ask the user to confirm the price first.
  - `transcribing`: poll again in about 20 seconds.
  - `ready`: `script` and `version` are ready for edits.
  - `failed`: fetching failed and nothing was charged.

- `version`: send this exact number in [`cut_video`](https://pogclip.com/docs/cut-video), [`edit_captions`](https://pogclip.com/docs/edit-captions) or [`edit_layers`](https://pogclip.com/docs/edit-layers).

- `script`: numbered lines with `start` and `end` seconds as the video plays now; empty when no speech was heard.

- `layers`: present when media, music or graphics are on the video, listing each layer's `id` for removal.

- `next`: tells you the next action and wait time.

## Errors

| Code           | What it means                                                     |
| -------------- | ----------------------------------------------------------------- |
| `not_found`    | There is no video with this ID on the account, or it has expired. |
| `unauthorized` | The API key or sign-in is missing, wrong or revoked.              |
| `rate_limited` | More than 60 requests in a minute. Wait for `retryAfterSeconds`.  |

## Related

- [Open a video to edit](https://pogclip.com/docs/open-video)
- [Transcribe a video](https://pogclip.com/docs/transcribe-video)
- [Cut a video by its script](https://pogclip.com/docs/cut-video)
