Get media URL
get_media_urlGet a fresh, signed download URL for one of the user's files (an outputFileId from a generation, or a fileId from the library). The URL works without signing in and expires after ttlMinutes (default 60, max 1440). Use it when an outputUrl has expired or is not directly downloadable. Fails if the file is still being generated or uploaded. For a generation's output it also returns a small preview image (for a video, its poster frame), since some clients can't open the URL themselves.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileId": "<fileId>"
},
"name": "get_media_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | File id (outputFileId, or a library file id). | |
| ttlMinutes | No | How long the URL stays valid, in minutes (default 60). | |
| includePreview | No | Attach a preview image when the file is a generation's output (default true). |