Preview a creative
Shows one image of a synced creative, by the platform's id, as a model can look at it: an image, a video's poster frame, or the platform's small thumbnail when nothing larger was synced, upright, at most 1568 pixels on its longest side, as base64 JPEG.
media picks which of its images and videos, from 0. It is fetched from the platform's CDN at the link the last sync stored. Needs project:ads:read.
Guide: Ads reports
A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.
In: header
Path parameters
The project's id, proj_.... A secret key works only in the project it belongs to.
The platform's id of the creative.
Query parameters
Which of the creative's images and videos, counted from 0 in the order the creatives report lists its media. Defaults to 0.
0 <= valueExamples
curl -X GET "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/ads/creatives/120210000000000004/preview?media=0" \ -H "Authorization: Bearer vh_sk_..."{ "media": 0, "mediaCount": 1, "source": "video_frame", "image": { "contentType": "image/jpeg", "imageBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD...", "width": 1080, "height": 1350, "sourceWidth": 1080, "sourceHeight": 1350 }}{ "error": { "type": "invalid_request", "code": "media_out_of_range", "message": "This creative has 3 images and videos, counted from 0.", "param": "media" }}{ "error": { "type": "unauthenticated", "code": "invalid_api_key", "message": "This secret key is not valid." }}{ "error": { "type": "permission_denied", "code": "permission_denied", "message": "Insufficient permissions." }}{ "error": { "type": "not_found", "code": "creative_not_found", "message": "This project has no synced creative 120210000000000004.", "param": "creativeId" }}{ "error": { "type": "internal", "code": "internal_error", "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing." }}{ "error": { "type": "unavailable", "code": "creative_image_expired", "message": "The ad platform no longer serves this image at the link Voidhash synced on 2026-10-28T09:14:02.000Z. Its links expire, and each full sync of the ad account stores fresh ones." }}Response body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
Errors
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request | media_out_of_range | — |
| 400 | invalid_request | image_unreadable | — |
| 400 | invalid_request | image_too_large | For an image over 30 MB. |
| 404 | not_found | creative_not_found | — |
| 404 | not_found | creative_image_not_found | When no link to the image was synced or it is hosted outside the platform. |
| 503 | unavailable | creative_image_expired | When the platform no longer serves the link, which a later sync renews. |
| 503 | unavailable | creative_image_unavailable | — |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Ads
- List campaigns
GET - Retrieve a campaign
GET - List ad groups
GET - Retrieve an ad group
GET - List ads
GET - Retrieve an ad
GET - Retrieve ads settings
GET - Update ads settings
PATCH - Report ad performance
POST - Report creatives
POST - Report ad cohorts
POST - Report ad changes
POST
Something wrong or missing on this page? Tell us by email or on Discord.