gensta DOCS
api-platform.gensta.ai/v1 Developer portal

Pass an HTTPS URL

json
{
  "type": "https_url",
  "url": "https://cdn.example.com/input.mp4"
}

URLs must use HTTPS, contain no username or password, and remain reachable until processing completes.

1. Get an upload URL

POST/v1/media-uploadsBearer key · generations:write
bash
size_bytes="$(wc -c <./reference.mp4 | tr -d ' ')"

curl --silent --show-error --fail-with-body \
  -X POST "https://api-platform.gensta.ai/v1/media-uploads" \
  -H "Authorization: Bearer $GENSTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"media_kind":"video","content_type":"video/mp4","size_bytes":'"$size_bytes"'}'

The response has HTTP 201, status: upload_pending, and a short-lived upload object. Upload the file with the returned URL, HTTP method, and headers.

KindAccepted content typesMaximum upload
videovideo/mp4, video/quicktime200 MiB
imageimage/jpeg, image/png, image/webpUnder 30 MiB
audioaudio/mpeg, audio/wav15 MiB

The file signature must exactly match the declared content type. Shared verification allows timed media up to 30 seconds, sides up to 6000 pixels, and images up to 36,000,000 pixels. The selected model and mode may impose stricter constraints; read operation_constraints from GET /v1/models before uploading. Animated or multipage images are rejected.

2. Complete and verify

POST/v1/media-uploads/{id}/completeBearer key · generations:write
bash
curl --silent --show-error --fail-with-body \
  -X POST "https://api-platform.gensta.ai/v1/media-uploads/$MEDIA_ASSET_ID/complete" \
  -H "Authorization: Bearer $GENSTA_API_KEY"

Completion returns HTTP 202 and is safe to retry. Poll GET /v1/media-uploads/{id} until the status is ready or failed. A ready file includes its verified size, duration where applicable, dimensions, and codecs.

3. Use the media asset

json
{
  "type": "media_asset",
  "media_asset_id": "7c74c900-8b68-4b0f-a337-32ed3a9a2020"
}

The file must belong to the same project, have status: ready, and match the selected request field. Images work as first or last frames and image references; videos work as video inputs and references; audio files work as audio references. Documents and web pages remain HTTPS-only.