Building blocks
Uploads
Every field that takes an image or audio URL also takes a file from your disk. Upload it and pass the file_url you get back. Uploads are working files: each one is deleted 24 hours after upload.
Upload a file
Free. Send the file as the body with its own Content-Type, up to 4,000,000 bytes. The answer has the file_url to pass to any image or audio field: selfies, voice samples, a recording, a first frame, a podcast photo or a freeform reference. The bytes must be the type you say they are.
URL=$(curl -s -X POST "https://platform.promoat.ai/api/partner/v1/uploads" \
-H "Authorization: Bearer $PROMOAT_KEY" -H "Content-Type: image/jpeg" \
--data-binary @./omar-1.jpg | jq -r .file_url)
# pass $URL in selfie_image_urls, sample_urls, audio_url, ...{
"upload_id": "3b0c6f1e-…",
"file_url": "https://…/3b0c6f1e-….jpg", // use this in your request
"url": "https://…/3b0c6f1e-….jpg", // the same
"content_type": "image/jpeg",
"bytes": 482113,
"credits_charged": 0,
"expires_at": "2026-11-18T15:00:00.000Z",
"deleted_after_hours": 24
}Bigger files: an upload link
For a file over 4,000,000 bytes, send JSON with its type and exact size. The answer has a one-time upload_url and the file_url the file will have. PUT the file to upload_url within 15 minutes with the headers from the answer.
| Field | Type | Description |
|---|---|---|
| content_type | string required | One of the types below. |
| bytes | integer required | The exact file size in bytes. The PUT must send exactly this many. |
F=./take.wav; TYPE=audio/wav; BYTES=$(wc -c < "$F" | tr -d ' ')
UP=$(curl -s -X POST "https://platform.promoat.ai/api/partner/v1/uploads" \
-H "Authorization: Bearer $PROMOAT_KEY" -H "Content-Type: application/json" \
-d "{\"content_type\": \"$TYPE\", \"bytes\": $BYTES}")
curl -s -X PUT "$(echo "$UP" | jq -r .upload_url)" -H "Content-Type: $(echo "$UP" | jq -r '.headers["Content-Type"]')" --upload-file "$F"
URL=$(echo "$UP" | jq -r .file_url){
"upload_id": "3b0c6f1e-…",
"upload_url": "https://…", // one-time PUT link, valid 15 minutes
"method": "PUT",
"headers": { "Content-Type": "audio/wav" },
"bytes": 9482113,
"file_url": "https://…/3b0c6f1e-….wav",
"url": "https://…/3b0c6f1e-….wav",
"upload_url_expires_at": "2026-11-17T15:15:00.000Z",
"expires_at": "2026-11-18T15:00:00.000Z",
"deleted_after_hours": 24
}A PUT with another Content-Type, another size or after 15 minutes fails with 403: ask for a new link. One link takes one file.
Types and sizes
| content_type | File | Max size (link) |
|---|---|---|
image/jpeg | JPEG | 15 MB |
image/png | PNG | 15 MB |
image/webp | WebP | 15 MB |
image/heic | HEIC (iPhone photos) | 15 MB |
audio/mpeg | MP3 | 25 MB |
audio/wav | WAV | 25 MB |
audio/mp4 | M4A | 25 MB |
audio/ogg | OGG | 25 MB |
audio/webm | WebM audio | 25 MB |
As the body, any type is at most 4,000,000 bytes. Some fields take less. Freeform references and podcast photos take at most 10 MB each. A recording for audio_url (videos and fix-sound) must be MP3, WAV or M4A; OGG and WebM work as freeform reference audio and voice samples.
Working files, not storage
Use the file_urlin a request right away. Characters, voices, frames and videos keep their own copy, so they keep working after the upload is gone. Don't hand an upload file_url to anyone as a link to keep.
| Limit | Value | Answer |
|---|---|---|
| Uploads per account | 300 files or 2 GB in any 24 hours; a link counts when it is issued | 429 UPLOAD_LIMIT_REACHED |
| Type | Image or audio from the table above, and the bytes must match it | 400 UNSUPPORTED_MEDIA_TYPE |
| Empty body | Send the file bytes | 400 EMPTY_FILE |
| Size | 4,000,000 bytes as the body; through a link images 15 MB, audio 25 MB | 413 FILE_TOO_LARGE |
| Link | One PUT within 15 minutes | 403 |
429 UPLOAD_LIMIT_REACHED carries retry_after_seconds and a Retry-After header. Reuse a file's file_url within the day instead of uploading it again.