AdnovaDocs
Creative Hub

Get a file preview

Return a file version's preview image inline as base64 — the thumbnail (a video's poster frame) of the active version by default, or of the version named by versionId. Use it when a client needs to see the creative rather than fetch it from a URL. An image with no thumbnail yet falls back to the original image when it fits. Only images and videos have a preview (400 otherwise). Returns 409 while the thumbnail is still being generated shortly after upload — retry after a moment — and 413 if the preview is larger than 1 MB.

GET
/files/{fileId}/preview

Authentication

authentication
api-key<token>

Create an API key from the Adnova dashboard (Account integrations). Pass the key value in the api-key request header on every call.

In: header

Path Parameters

fileId*string

File id.

Length1 <= length

Query Parameters

versionId?string

File version id. Omit to use the file's active version. A version id that does not belong to the file returns 404.

Length1 <= length

Header Parameters

x-workspace-id*string

Workspace the request operates in. Get it from List workspaces.

Length1 <= length
x-org-id*string

Organization context (required on every endpoint).

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.adnova.ai/creative-hub/v1/files/01J8ZF9K8M7N6P5R4S3T2V1W0X/preview?versionId=01J8ZG0L9N8P7Q6R5S4T3V2W1Y" \  -H "x-workspace-id: 01J8ZQ9X2K3M4N5P6R7S8T9V0W" \  -H "x-org-id: 01J8ZQ7B3C4D5F6G7H8K9M0N1P"
{
  "fileId": "01J8ZF9K8M7N6P5R4S3T2V1W0X",
  "versionId": "V123ABC...",
  "name": "spring-hero.mp4",
  "source": "thumbnail",
  "mimeType": "image/jpeg",
  "size": 48213,
  "data": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "message": "string"
}