Skip to Content
TryItOn
DocsAPI ReferenceSDKsResources

Live Try-On Billing

How real-time virtual try-on is billed: per-second ticks, the held credit, rounding, refunds for streams that fail to connect, and what is free.

Live try-on spends the same credit balance as photo try-ons (see Pricing & Credits). It's billed in ticks: 1 credit buys secondsPerCredit seconds of video, 3 by default. Read the current values from GET /live/config.

How a session is charged

Start: 1 credit heldconnectingcredit 1credit 2credit 3credit 4heartbeats: charge the held credit, hold the nextFirst frame: clock startsEndcharges the held credit0 s3 s6 s9 s10 s10 s of video = 4 credits
3 seconds per credit: a session that streams for 10 seconds costs 4 credits.
  1. Start. You need at least minCredits usable credits (10 seconds' worth, 4 by default). The start holds 1 credit. A start that returns an error holds nothing.
  2. Streaming. tryiton-live starts the billing clock at the first try-on frame and sends a heartbeat every tick. Each heartbeat charges the held credit and holds the next one. When the next credit can't be held, the stream stops with out_of_credits.
  3. End. Ending charges the held credit, so a partial tick rounds up: 10 seconds at 3 seconds per credit costs 4 credits. This is the same for every end: from the browser, from your server, a superseded session, or one that went stale.

secondsLeft in the start and heartbeat responses is how long the session can still stream: the held credit plus your usable credits, capped by max_seconds.

The server's clock sets a floor

When a session ends, it pays at least for the time it was open: from the start to the end (or to when it went stale), minus up to 20 seconds for connecting, and never more than its media token can stream. Heartbeats normally cover this already. The floor only matters when a browser sends fewer heartbeats than the time it streamed. Balances never go below zero.

When a session fails

  • The start fails: nothing. No credit is held.
  • The stream never connects: nothing, up to 5 times a day. tryiton-live ends such a session with reason: "error" and connected: false. If that end arrives within 20 seconds of the start (or of a switch to the backup stream) and no heartbeat has billed yet, the held credit goes back and the session shows refunded: true. This works for 5 sessions per account per UTC day. After that, a failed connect is charged like any other end, usually 1 credit. A connect that waits out its whole timeout can end just after the 20 seconds and is charged too.
  • The stream drops after it connected: the time it streamed, rounded up to the tick.
  • The browser disappears without ending. The session stays open until it goes stale (3 missed ticks plus 30 seconds), and the server's clock sets the charge. To keep this short, stop the session from your server when the shopper leaves.

What's free

  • Preparing garments and outfits (up to 2000 new ones a day).
  • Switching garments mid-stream.
  • Reading the live config and your sessions.
  • A start that returns an error, and a failed attempt before a failover to the backup stream.

Check what you paid

Every session has creditsCharged, refunded and creditsRefunded. List your sessions with end_reason=error to see failed streams, or refunded=true to see refunded ones. The dashboard shows the same list under Developer API → Requests → Live, and Developer API → Analytics has live sessions, time and credits per API key.

If a charge looks wrong, email contact@tryiton.now with the session id. A refund from support shows on the session as refunded: true and creditsRefunded.

On this page