Skip to main content
This guide walks through the main API integration path: sample → seed → actor → insta swap → result.

1. Create a Digital Sample

Save sample.id from the response.

2. Upload seed video

Option A — Presigned PUT

PUT your file to uploadUrl, then associate it with the sample using the single-step register endpoint. The public API automatically validates, approves, and activates the sample in one go (no legacy commit step required):
The response includes signedSeedVideoUrl for preview. There is no external seedVideoUrl echo for this upload path (you uploaded directly).

Option B — External HTTPS URL

On create or PATCH, pass seedVideoUrl with a public HTTPS link. YPH ingests the file into private storage:
The response echoes your seedVideoUrl and adds signedSeedVideoUrl for preview. Do not send signedSeedVideoUrl back on PATCH.

3. Create an Actor

Provide public HTTPS URLs for face, body, and voice assets. YPH securely ingests them into private storage. The response echoes your source URLs plus short-lived signed*AssetUrl fields for preview:
Use signedFaceAssetUrl, signedBodyAssetUrl, and signedVoiceClipUrl from the response to download or verify ingested assets. Do not send those signed URLs back on PATCH — only send new external HTTPS URLs when updating assets.

4. Queue Insta Swap

The job is auto-queued (autoQueue: true). One credit is charged by default. Response includes instaSwap.id and initial status (typically QUEUED).

5. Poll for completion

When instaSwap.status is COMPLETED, the response may include instaSwap.signedResultVideoUrl — a short-lived presigned GET URL for the output video. Register once per environment:
See Webhooks for signature verification.

Status reference

Insta Swap jobs use render pipeline statuses, including:
  • QUEUED — waiting for GPU capacity
  • ASSIGNED / RENDERING — in progress
  • COMPLETED — success
  • FAILED — terminal error
Poll GET /insta-swaps/{id} or rely on webhook data.status.