Promoat.Partner API

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

POST/api/partner/v1/uploads

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.

Upload a selfie, then use it
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, ...
Answer (201)
{
  "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
}

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.

FieldTypeDescription
content_typestring requiredOne of the types below.
bytesinteger requiredThe exact file size in bytes. The PUT must send exactly this many.
Upload a long recording
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)
Answer (201)
{
  "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_typeFileMax size (link)
image/jpegJPEG15 MB
image/pngPNG15 MB
image/webpWebP15 MB
image/heicHEIC (iPhone photos)15 MB
audio/mpegMP325 MB
audio/wavWAV25 MB
audio/mp4M4A25 MB
audio/oggOGG25 MB
audio/webmWebM audio25 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

Each upload is deleted 24 hours after upload

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.

LimitValueAnswer
Uploads per account300 files or 2 GB in any 24 hours; a link counts when it is issued429 UPLOAD_LIMIT_REACHED
TypeImage or audio from the table above, and the bytes must match it400 UNSUPPORTED_MEDIA_TYPE
Empty bodySend the file bytes400 EMPTY_FILE
Size4,000,000 bytes as the body; through a link images 15 MB, audio 25 MB413 FILE_TOO_LARGE
LinkOne PUT within 15 minutes403

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.

Try it

Try itPOST/api/partner/v1/uploadscharges free
Add your API key in the sidebar to enable this.