Put back an earlier version
Restores an earlier version of a video as a new version and returns its script. Every cut, caption change and layer edit returns a previousVersion you can restore at any time.
| MCP tool | restore_video |
| API | POST /api/v1/videos/{clipId}/restore |
| Credits | Free |
When to use it
- Call when a cut, caption or layer edit went wrong and you want an earlier version back.
- Use
previousVersion from cut_video, edit_captions or edit_layers, or any earlier version number down to 0.
Parameters
| Name | Type | Required | What it is |
|---|
clipId | string | Yes | The clipId from open_video, or a clip ID from list_clips. |
version | integer | Yes | The version to put back, such as previousVersion. |
Call it from an AI agent
{
"name": "restore_video",
"arguments": {
"clipId": "f8669b08",
"version": 0
}
}
Call it from your code
curl -X POST https://pogclip.com/api/v1/videos/f8669b08/restore \
-H "Authorization: Bearer $POGCLIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"version": 0}'
What you get back
{
"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": 4,
"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.
version: restoring creates a newer version number (such as 4 when restoring 0); use this new version for later edits.
script and layers: reflect the restored video as it plays now (layers appears only if that version has layers).
next: confirms the restored script is ready for new edits.
Errors
| Code | What it means |
|---|
not_found | There is no such video on the account, or it has no such version. |
invalid_request | A field is missing or wrong. The message says which. |
unauthorized | The API key or sign-in is missing, wrong or revoked. |
rate_limited | More than 60 requests in a minute. Wait for retryAfterSeconds. |