Create media upload
create_media_uploadFor a photo or video file on the user's machine (needs an agent that can run curl or make HTTP requests). Returns a one-time upload_url: PUT the file's bytes there with its Content-Type header (the returned curl does exactly that), then call finalize_media_upload. Media requirements:
Photos: JPEG, PNG or WebP; at least 480×480 px; at most 15 MB. Clear, well-lit shots of the real product, one product per photo, no collages or heavy text overlays.
Videos: MP4 or MOV (H.264 recommended); 1–60 seconds; at most 50 MB; vertical 9:16 recommended. Clips play muted. A video only appears in the ad through a custom-footage moment (add_moment, type custom-footage): uploading it alone does nothing.
Physical products: tag every photo with the view it shows (front, left, rear, a 3/4 view…,
detailfor a close-up,size-referencefor a scale shot). A front photo is strongly recommended.detailphotos, and every photo of a digital product or service, need a description (≤240 characters) of what they show.At most 8 files per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project's id. | |
| content_type | Yes |