Yapper API
Api reference
POST
/assets/uploads

For local image, video, or audio files with no URL (use POST /assets/import for remote media). Returns a short-lived signed PUT URL: upload the bytes to uploadUrl sending every header from the response headers map (Content-Type plus the x-goog-content-length-range size cap — the storage provider rejects the PUT if either is missing or altered), then call the complete endpoint to finalize the asset. Spends no credits.

Authorization

bearerAuth assets:write
AuthorizationBearer <token>

In: header

Scope: assets:write

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assets/uploads" \  -H "Content-Type: application/json" \  -d '{    "mimeType": "image/jpeg"  }'
{  "assetId": "string",  "uploadUrl": "http://example.com",  "method": "PUT",  "headers": {    "property1": "string",    "property2": "string"  },  "maxBytes": 0,  "expiresAt": "2019-08-24T14:15:22Z",  "completeUrl": "string"}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}

Finalize a direct upload POST

Call after PUTting the bytes to uploadUrl. Probes the file (size limits, dimensions/duration), stores a normalized copy, and returns the finished asset. Idempotent: completing again returns the same asset.

Create a media process POST

Starts a generation process and charges team credits. V1 types: image-generation, video-generation, audio-generation, image-upscale, video-upscale, video-lipsync. The model must match the type (see GET /models). For seedance-2.5-edit, the first referenceVideos item is the required base video; editOperation defaults to edit, while extend, sequel, and prequel allow an omitted prompt. video-lipsync takes sourceVideoAssetId and audioAssetId from the team asset library; the server-measured audio duration determines its quote and charge. Sync-Max is train-once: omit trainingId on the first run, then reuse the trainingId returned on the process for faster later runs against the same trained source. Sync-Pro and Sync-v3 are single-shot and require no training. Always send an Idempotency-Key: retries with the same key and body return the original process instead of double-charging; the same key with a different body returns idempotency_conflict. input is validated per process type AND against the model's published capabilities (aspectRatios, resolutions, videoLengths from GET /models) — unsupported values are rejected with invalid_request, never silently coerced. Internal fields (batchId, filteringId, agent context) are ignored. metadata (flat string/number/boolean/null values, max 16 keys) is echoed back on reads. webhookSecret is optional for legacy unsigned webhook delivery; when supplied with webhookUrl, notifications are HMAC-signed and may be attempted twice with a stable delivery id.