Skip to main content
POST
Create digital sample

Authorizations

Authorization
string
header
required

Your organization API key starting with yph_sk_live_…

Body

application/json
title
string

Optional custom title. If omitted, defaults to "API Sample ". (Max 120 characters)

Maximum string length: 120
description
string | null

Optional description of the sample. (Max 300 characters)

Maximum string length: 300
seedVideoUrl
string<uri>

Optional public HTTPS URL to initialize the sample. YPH securely copies the file to R2, validates format and duration (≤170s), and automatically activates the sample. Echoed in responses; use signedSeedVideoUrl to preview the ingested copy.

seedVideoDurationSec
integer | null

Optional duration in seconds. Must be 170 seconds or less.

Required range: x <= 170
positiveRenderPrompt
string

Optional custom positive render prompt for the Wan model. Defaults to standard actor-replacement prompt. (Max 2000 characters)

Maximum string length: 2000
negativeRenderPrompt
string

Optional custom negative render prompt for the Wan model. Defaults to standard actor-replacement negative prompt. (Max 2000 characters)

Maximum string length: 2000
renderSeedFps
enum<integer>
default:16

Optional seed FPS tier (16 Economy, 24 Balanced, 30 Premium Quality).

Available options:
16,
24,
30
renderVoiceConversionEnabled
boolean
default:true

Optional flag to enable CosyVoice actor voice replacement.

renderEntryWidth
enum<integer>
default:480

Optional portrait 9:16 analysis size (480 Economy, 720 Balanced).

Available options:
480,
720
accountToken
string | null

Opaque integrator brand id for this sample (scoped to your org).

Maximum string length: 128
productToken
string | null

Optional integrator catalog product id (distinct from public productUrl listing link used in Collab flows).

Maximum string length: 128

Response

Created successfully

digitalSample
object

Digital sample resource returned by GET, POST, and PATCH.

  • Write-only (POST/PATCH body): seedVideoUrl — your public HTTPS source URL. YPH ingests a copy into private storage. Use the presigned upload flow (/seed/upload-url + /seed/register) when uploading directly.
  • Read-only (responses): signedSeedVideoUrl — short-lived presigned GET URL for preview/download. Never send this back on PATCH.
  • Echo (responses): seedVideoUrl repeats the external source URL you submitted (null when the seed was uploaded via presigned PUT or created in the YPH app).
  • Integrator identity: accountToken identifies the brand (your marketplace advertiser). productToken is your internal catalog product id. See Integrator tokens.
  • Credits: Org credit balance is not on this resource — use GET /account (creditBalance).
Example: