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

HTTPS URL ingestion

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

URLs must use HTTPS, contain no username or password, and remain reachable by Alibaba. Gensta does not download or parse caller-hosted media inside its credentialed worker in the closed alpha; the provider fetches the locator directly.

1. Reserve an upload

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 private S3 upload object. PUT exactly the declared bytes using the returned method, URL, and every returned header.

KindAccepted content typesMaximum upload
videovideo/mp4, video/quicktime100 MiB by default
imageimage/jpeg, image/png, image/webp25 MiB
audioaudio/mpeg, audio/wav50 MiB

The file signature must exactly match the declared content type. Current verification accepts 1–15 second video/audio; video sides must be 240–4096 pixels, images must be at most 4096 × 4096 and 16,777,216 pixels, and 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 idempotent. Poll GET /v1/media-uploads/{id} through verification_queued and verifying until ready or failed. A ready asset includes server-verified size, duration where applicable, dimensions, codecs, and SHA-256.

3. Use the media asset

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

The asset must belong to the same API project, have status: ready, and match the kind required by its request slot. Image assets work in first/last frames and image references; video assets work in video inputs and references; audio assets work in audio references. Documents and web pages remain HTTPS-only.