# Render API - Thumbnails

In addition to generating videos, the Capsule Render API can be used to generate thumbnail images. The process is almost identical to [generating videos](/generating-videos/render-api.md), you just need to add the following parameters to the job request:

```json
{
    "thumbnail": true,
    "thumbnailFrame": <integer_frame_number>
}
```

When the job is complete, the `url` parameter in the job status response points to a png image of the requested frame.

### Example

Here’s an example JSON object for the POST request:

```json
{
    "template": "game-announcement",
    "thumbnail": true,
    "thumbnailFrame": 116,
    "payload": {
        "canvasWidth": 1080,
        "canvasHeight": 1080,
        "assets": [
            {
                "name": "broadcastLogo",
                "url": "https://static.capsule.video/demo/nba.png",
                "cache": true
            },
            {
                "name": "sponsorLogo",
                "url": "https://static.capsule.video/demo/axp.png",
                "cache": true
            },
            {
                "name": "camera",
                "url": "https://static.capsule.video/demo/suns_jazz_6s.mp4",
                "cache": true
            }
        ],
        "cameraScale": "fill",
        "accentColor": "#E03A3E",
        "team1": "Utah Jazz",
        "team2": "Phoenix Suns",
        "gameDate": "April 21",
        "gameTime": "8:00",
        "gameTimeInfo": "PM ET"
    }
}
```

Here’s an example API call to create a thumbnail job using the payload above:

```bash
curl -X POST "https://api.capsule.video/job" \
  -H "Authorization: Bearer <YOUR_CAPSULE_API_KEY>" \
  -H "content-type: application/json" \
  --data-raw '{"script":"game-announcement","thumbnail":true,"thumbnailFrame":116,"payload":{"canvasWidth":1080,"canvasHeight":1080,"assets":[{"name":"broadcastLogo","url":"https://static.capsule.video/demo/nba.png","cache":true},{"name":"sponsorLogo","url":"https://static.capsule.video/demo/axp.png","cache":true},{"name":"camera","url":"https://static.capsule.video/demo/suns_jazz_6s.mp4","cache":true}],"cameraScale":"fill","accentColor":"#E03A3E","team1":"Utah Jazz","team2":"Phoenix Suns","gameDate":"April 21","gameTime":"8:00","gameTimeInfo":"PM ET"}}'
```

Response:

```json
{
    "jobId": "65053295e53f397b2c00ea92",
    "message": "ok",
    "success": true
}
```

Next check the status of that job with a GET using the job ID returned above, a few moments later once job is completed:

```bash
curl -X GET "https://api.capsule.video/job/65053295e53f397b2c00ea92" \
  -H "Authorization: Bearer <YOUR_CAPSULE_API_KEY>"
```

Response:

```json
{
   "jobId" : "65053295e53f397b2c00ea92",
   "status" : "completed",
   "compDuration" : 7.5,
   "endtime" : 1694839448179,
   "progress" : 1,
   "runtime" : 0,
   "streaming" : false,
   "url" : "https://render.capsule.video/media/65053295e53f397b2c00ea92/thumbnail"
}
```

Now, download the png image via the `url` param above, and you'll get this:

<figure><img src="/files/2HW4kbhJQvSVVUItUMiq" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.capsule.video/generating-videos/render-api-thumbnails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
