# Video Translate Caption

Retrieves the caption file for a translated video.

<Callout icon="📘" theme="info">
  **Note:**

  * The `caption_url` field returns a time-limited link that expire after 7 days. The caption file itself does not expire, only the link does. To ensure continuous access, you have two options:
    1. **Download the File:** Save the caption file locally within the 7-day window.
    2. **Regenerate the URL:** Call the endpoint again whenever you need to access the caption file. Each time you call the endpoint, the `Expires` and related query parameters in the URL are regenerated, reflecting the new expiration time.
  * Scroll down to the **Response** section below and expand the status code(s) to view the detailed response schema.
  * Refer to the **RESPONSE** section on the right and choose an example to see how the API response appears for each status code.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "heygen-api",
    "version": "4.0.8"
  },
  "servers": [
    {
      "url": "https://api.heygen.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "x-default": "<your-api-key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/video_translate/caption": {
      "get": {
        "summary": "Video Translate Caption",
        "description": "",
        "operationId": "video-translate-caption",
        "parameters": [
          {
            "name": "video_translate_id",
            "in": "query",
            "description": "Unique identifier of the translated video where captions will be added. Can be retrieved from the <a href=\"https://docs.heygen.com/reference/video-translate\" target=\"_blank\">Translate Video </a> endpoint.  ",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "caption_type",
            "in": "query",
            "description": "Format of the caption file. ",
            "schema": {
              "type": "string",
              "enum": [
                "vtt"
              ]
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Captions generated successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": null,
                      "data": {
                        "caption_url": "https://files2.heygen.ai/video_translate/6vr40c621282471bb03cd9n61acf7faa-ur_ur-PK/6vr40c621282471bb03cd9n61acf7faa-ur_ur-PK.vtt?Expires=1760528877&Signature=qkWYJB7HDZkOfaQNWBdvIYc34MAJ1~SPnDdPgXg0VefkJQnttfMXup2Qzvewq8SmbdTYr9POyrYKUAXs1gCqql1-v2q-G-dd6~Xp5QMo6L6sYCwrsbkSrofZYe2fsggsg9j-RYmlZ22qNiavJgYEWy1Do3R9TH-bctSXJPlgyYYZDhYeDLLK5HklOi0f2d7WUiN2wWpQhRyLOsXSpB-961rY-jQad0Digq~-WqsMgjkUpAsQxadXVo-0xtpYssyIVsZue59hf-XMO4IN1dHq~Dt1MgxKpmXFBjiFk6eSPyXCyp3EbuZZ9rEc5CwIA25IvWGvdAR-Tfp3iPMast2dJw__&Key-Pair-Id=K52HBHX5LX3X2H"
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Displays error message when the request fails; null if the request is successful."
                    },
                    "data": {
                      "type": "object",
                      "description": "Contains the details of the caption file. ",
                      "properties": {
                        "caption_url": {
                          "type": "string",
                          "description": "URL of the caption file. This URL will expire in 7 days. Call the endpoint again to generate a new one after expiration. "
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```