file_id, which you then pass as creative.file_id when creating an ad. A file_id is a stable storage path — upload once, reference it on as many ads as you like.
Accepted formats are PNG, JPEG, and WebP. The maximum size is 5 MB. The format is detected from the image bytes — the filename and
Content-Type you send are never trusted to set it.Upload Image
POST /v1/upload
Send the image one of two ways:
multipart/form-datawith afilepart — upload raw bytes directly.application/jsonwith{"image_url": "https://..."}— have Thrad fetch the image from a URL you control.
400.
Authorization
Your advertiser API key as a Bearer token:
Bearer ak_.... One active key per organization, created in the Thrad Platform dashboard under Settings → API keys.Multipart body
The image to upload, as a
multipart/form-data part. Must be a PNG, JPEG, or WebP no larger than 5 MB. Required unless you send image_url instead.JSON body
An absolute
http(s) URL that Thrad fetches the image from. Required unless you upload a file instead.Response
The storage path of the uploaded image (e.g.
uploads/2026/06/<hex>.png). Pass this value as creative.file_id when creating an ad. Treat it as an opaque token.Errors
The endpoint returns a bare error object on failure. A missing or unreadable image, or an image that fails validation, returns a400.
| Status | code | Meaning |
|---|---|---|
400 | invalid_value | Neither a file part nor an image_url was supplied. |
400 | invalid_file | The bytes are missing, unreadable, or not a decodable image. |
400 | file_too_large | The image exceeds the 5 MB limit. |
400 | unsupported_mimetype | The image is not PNG, JPEG, or WebP. |
400 | invalid_image_url | image_url is empty, not an absolute http(s) URL, or its host is unresolvable or not publicly routable (SSRF guard). |
400 | image_fetch_failed | Fetching image_url failed — network error, timeout, or a non-success HTTP status. |
400 | too_many_redirects | image_url returned a redirect (redirects are not followed). |
401 | — | Missing or invalid API key. |
429 | — | Rate limit exceeded (1000 requests/hour per key). |
