Skip to content

The Reservation You Forgot to Size: Why Long Answers Fail Uncharged

An item that fails on Y-PAD costs nothing, which sounds like a generous safety net until you run two thousand of them overnight and wake up to an empty results folder. The failure this article deals with is quiet and specific: an answer runs longer than the quantity reserved for it at submit time, the item comes back unsuccessful, no charge lands, and the work simply does not exist in the morning. The fix is arithmetic rather than luck — sizing max_tokens and max_units so that a long answer fits inside its reservation on the first attempt, without over-reserving so much that the batch starves the rest of your balance.

max_tokens Controls the Answer, max_units Controls the Reservation

These are two independent dials that people routinely conflate. max_tokens is a model parameter: it caps how much text the model is allowed to generate. max_units is a billing quantity: the amount of work reserved for an item when the batch is submitted. On Y-PAD, submit holds the sum of max_units multiplied by list price; at settlement the account is charged for succeeded units at launch price if a launch seat is held, otherwise list, and whatever was held but unused comes back.

Because those two numbers move independently, a long answer can fail without ever touching a model error: the reservation was simply never big enough to cover the worst case the prompt could produce. The DeepSeek v4 api is where this arithmetic bites hardest: it exposes an optional max_tokens between 1 and 8,192 with a default of 2,048, and bills per 1,000 weighted tokens — output tokens plus input tokens counted at 0.25 — at $0.0015 list and $0.0009 launch as of 7 Nov 2026, with a 100-token minimum per file. Those figures are provisional beta fares, so confirm them on the live pricing page before committing a large batch.

The weighting rule is the part operators miss. A prompt of 800 input tokens and an answer of 3,000 output tokens does not consume 3,800 units; it consumes 3,000 + (800 × 0.25) = 3,200. Set the answer cap and the reservation from that combined figure. And note the ceiling: a cap above 8,192 is not a thing for this model, so any workflow expecting 10,000-token answers needs chunking, not a bigger reservation.

Every other model on the platform measures units differently, and each has its own floor. Images are priced per image up to a megapixel, pro rata above that within a stated cap. Audio is billed by the second with a 30-second minimum per file. Text to speech counts folded characters in thousands with a 500-character minimum. OCR counts pages. Video counts seconds. On Qwen3-VL 8B, answers stop at 2,048 tokens, so the worst case is already known before the first upload. None of these floors are optional, and reserving below them buys nothing — it only makes the reservation look tidier than it is.

Worked Arithmetic for a Batch That Arrives Whole

Size from the worst case, never the average. Start with a realistic upper bound on prompt length, decide the longest answer the job is allowed to return, and compute the reservation from those two numbers rather than from a round figure that feels safe. A 500-token prompt and a 3,000-token target answer gives a weighted worst case of 3,000 + 125 = 3,125. Set max_tokens to 3,200 and max_units to roughly 3,300 to absorb tokenisation drift, and the item can no longer fail for being long.

Price that out. The hold per item is 3.3 × $0.0015 = about $0.0050 at list. Settlement on a launch seat for an item that actually consumes 3,125 weighted tokens comes to roughly $0.0028. On a full 2,000-item batch the difference between holding and paying is real money that returns to the balance, which is exactly why the hold should describe the worst case and not the ceiling of the model.

The ceiling is where batches get stuck. For the first seven days after a first payment, the day’s charges and open holds together cannot pass $25. Now compare two strategies across a 2,000-item batch — the maximum items per call. At a per-item hold of $0.0050, the whole batch reserves about $9.90 and fits comfortably. At a blanket max_units of 8,192, each item holds 8.192 × $0.0015 = $0.0123, and 2,000 items reserve roughly $24.58, consuming almost the entire window before a single item settles. A generous reservation is not free; it is temporary balance you cannot spend elsewhere until settlement returns it.

The same discipline transfers across modalities. A 12-second Whisper clip bills 30 seconds regardless of what is reserved, so max_units below half a minute is meaningless and max_units far above it is dead weight. A 600-character TTS job clears the 500-character floor by 100 characters and no more. Image jobs priced pro rata above one megapixel should reserve against the largest input actually permitted — 25 MB files are allowed, so a batch of phone photos and a batch of thumbnails deserve different reservations even though the model is identical.

Free Failures Still Cost Queue Time, Polling and a Second Run

Uncharged is not the same as free. Expect a cold start of 10 to 30 seconds, occasionally minutes, with later items in a batch riding on the same start. There are no webhooks, so results arrive through polling. Outputs stay available for seven days and upload links last an hour, which means a batch discovered to have failed nine hours later usually needs its files uploaded again before the unsuccessful slice can be re-run. Add the operator time to diagnose which items died from length rather than from content, and the true cost of a badly sized reservation shows up in hours, not cents.

A practical sequence for any new job shape: run a handful of representative files in the playground, then submit a five-item batch with deliberately generous reservations, then read back the units actually consumed. Set max_units near the observed worst case plus a modest margin, and set max_tokens to the longest answer the output format genuinely needs. Keep the two aligned, because a max_tokens of 6,000 paired with a max_units of 2,000 is a contradiction that only resolves one way.

Distinguish truncation from failure, since they bill differently. A completion that stops at max_tokens is not an error — a shorter answer comes back and the tokens produced are paid for. That is a policy decision: choose max_tokens to define how long an answer may be, and accept the occasional cut-off as a content problem to be caught downstream. An item that cannot fit inside its reservation is the different, avoidable case, and it is the one that produces silence instead of a result.

Because failed and cancelled items carry no charge, re-running the unsuccessful slice is never double billing. The only genuine loss is the gap between submit and discovery — which, on a polled batch with a cold start in front of it, is measured in the same hours you were hoping to save. Set the reservation from the worst case, keep the hold lean enough to sit inside the $25 opening window, and a long answer stops being a gamble.