Skip to main content
Beta constraints — validation rules and quality recommendations on this page reflect the current Public API and render pipeline. We tighten and relax limits as the product matures. Check updatedAt on this page and the changelog in OpenAPI when you upgrade integrations.
This guide is for enterprise / platform integrators after API access is enabled. It complements the workflow guide with onboarding steps and asset preparation rules that match the YPH app upload UI and server validators today.

1. Request access & install credentials

1

Request API activation

API access is off by default. Email [email protected] with your org name and integration use case.
2

Generate an API key

Sign in at yourproducthere.ai, open Developer, and regenerate your key (yph_sk_live_…). Store it in a secrets manager — the full secret is shown once.
3

Confirm base URL & docs

Production base: https://api.yourproducthere.ai/v1. Keep this site (docs.yourproducthere.ai) and llms.txt in your repo for AI-assisted integration.
4

Smoke test

Expect apiAccessEnabled: true and a credit balance on /account.
Partner diligence: Company credentials · Enterprise use case

2. Integration order (canonical)

Follow this order on every environment — skipping steps causes 400/404/409 errors:
  1. POST /digital-samples (draft or with external seedVideoUrl) — set accountToken (brand) and optional productToken for enterprise embeds
  2. Seed video — presigned upload-url → PUT → register, or HTTPS ingest via seedVideoUrl
  3. POST /actors (face + body + voice URLs) — set accountToken (creator or brand)
  4. POST /digital-samples/{id}/insta-swaps (charges 1 credit on queue) — optional accountToken on swap (defaults from actor)
  5. Poll GET /insta-swaps/{id} or register POST /webhooks for insta_swap.*
See Integrator tokens for brand vs creator scoping and isBrandSelfService. Details: End-to-end workflow · Integrator tokens · Authentication · Webhooks

3. Digital Sample seed video

Seed quality drives Insta Swap output. The API and app enforce the same hard limits; the app also shows soft warnings for best results.

Hard limits (API rejects or deletes object)

Workers cannot run ffprobe. Duration and aspect are parsed from ISO BMFF (moov/tkhd) when possible. If metadata is unreadable (e.g. moov at end of file), the API may accept the file with a dimensions_unparsed warning — re-export with “fast start” / web-optimized MP4 for reliable validation.

Safe-shot checklist (beta — from product UI)

For best likeness and fewer failed renders, seed content should:
  • Show only one person on camera
  • Avoid biting food, outfit changes, or applying products on camera
  • Match the SKU/listing you will attach in Collab flows
  • Avoid scripts that instruct affiliates to claim personal use (“I tried”, “my honest review”, etc.)
  • Include only media you own or have rights to (people, product, music)

Upload paths

After ingest, use signedSeedVideoUrl in API responses to preview the private copy — never send signed URLs back on PATCH.

4. Actor assets (face, body, voice)

Provide HTTPS URLs on POST /actors or PATCH /actors/{id}. YPH ingests into private R2 and returns echo source URLs plus short-lived signed*AssetUrl fields.

Face & body images

OpenAPI and responses may include non-blocking warnings (e.g. dimensions below 480×832). Export exactly 480×832 from your asset pipeline for maximum quality.

Voice clip

5. Render parameters (Digital Sample)

Set on create or PATCH. Invalid combinations return 400.
In the YPH app, 30 FPS with closest face match may be blocked on seeds longer than 25 seconds (hardware guardrail). Prefer 24 FPS or shorter seeds for premium tiers until this limit is lifted in a future release.

6. Insta Swap & webhooks

  • Each queued swap costs 1 credit (see GET /account).
  • Poll GET /insta-swaps/{id} until status is terminal, or use webhooks (insta_swap.queued, insta_swap.completed, insta_swap.failed).
  • Result video: signedResultVideoUrl (short-lived presigned GET).

7. Errors vs warnings

8. AI-assisted development

Point Cursor, Claude, or Copilot at:
  • llms.txt — skills context with bounds and workflow order
  • OpenAPI reference — schemas and examples
  • This page — human-readable beta constraints

9. Versioning

We update this guide when validation or quality bars change. Integrators should:
  1. Watch commits under mintlify/ in the monorepo
  2. Re-run your staging conformance / Contract run after upgrades
  3. Treat warnings as forward-compatible hints; treat new 4xx codes as breaking for automation
Questions or activation: [email protected]