Delete a photo or video
delete_mediaUse this only when the user clearly asks to delete one of their photos, videos or lip syncs, or to remove the last extension of a video. Deleting can't be undone and gives no credits back, so name what will go and get the user's yes first. Pass exactly one of photo_id, video_id or lip_sync_id. With video_id and last_extension_only: true, only the last part added with extend_video is removed and the video goes back to its previous length; that rebuilds the video, so it can take up to a minute. Something still being made can't be deleted.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "delete_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| photo_id | No | A photo_id. Videos made from the photo are kept. | |
| video_id | No | A video_id. Its extensions go with it; its lip syncs are kept. | |
| lip_sync_id | No | The id of a lip sync (kind lip_sync in list_media or get_generation). | |
| last_extension_only | No | With video_id: remove only the last extension. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Present only on a refusal: the summary says why, and what the user can do. | |
| url | No | ||
| deleted | No | ||
| summary | Yes | ||
| photo_id | No | ||
| video_id | No | ||
| view_url | No | ||
| error_code | No | Present only on a refusal. | |
| lip_sync_id | No | ||
| duration_seconds | No |