Multimodal Pricing: Images, Audio और Video में असल बिल किसका आता है
एक ही 500 तस्वीरों पर तीन models की लागत 5.5 गुना तक अलग; resize करते ही सबसे सस्ता विकल्प बदल जाता है।
इस पेज पर
यह एक काम है, जिसकी कीमत तीन तरीकों से निकली: पाँच सौ product photographs का वर्णन करना, हर एक के लिए एक छोटा caption। वही photographs, वही instruction, answer की वही length। बस एक चीज़ बदलती है: उन्हें कौन-सा model पढ़ता है।
| photograph | gpt-5.6-luna | gemini-3.1-flash-lite | claude-haiku-4.5 |
|---|---|---|---|
| 800 × 600 | $0.0848 | $0.1638 | $0.4380 |
| 1024 × 768 | $0.1200 | $0.1638 | $0.6370 |
| 1280 × 960 | $0.1718 | $0.1638 | $0.9010 |
| 1600 × 1200 | $0.2558 | $0.1638 | $0.9010 |
| 4000 × 3000 | $0.3220 | $0.1638 | $0.9010 |
उस table में तीन बातें रुककर देखने लायक हैं।
सबसे सस्ता model उसी task पर तीसरी row और चौथी row के बीच बदल जाता है, क्योंकि किसी ने photographs resize कर दिए। caption की जगह paragraph माँगें तो crossing point फिर बदल जाता है: 1280 × 960 पर चालीस-token caption के लिए winner Gemini है और चार-सौ-token paragraph के लिए OpenAI।
Gemini column किसी भी row में बिल्कुल नहीं बदलता: 4000 \u00d7 3000 photograph की लागत उसके लिए ठीक उतनी ही है जितनी 640 \u00d7 480 वाली की। 4000 × 3000 photograph की लागत उसके लिए ठीक उतनी ही है जितनी 640 × 480 photograph की। यह cap नहीं है। यह उसके counting तरीके का परिणाम है, और इसका मतलब है कि इस business में सबसे आम cost optimisation — upload करने से पहले downsample करना — इस तरह pay करता है:
| image tokens, 4000 × 3000 → 800 × 600 | cost of the run | saved | |
|---|---|---|---|
gpt-5.6-luna | 2,942 → 570 | $0.3220 → $0.0848 | 73.7 % |
claude-haiku-4.5 | 1,564 → 638 | $0.9010 → $0.4380 | 51.4 % |
gemini-3.1-flash-lite | 1,032 → 1,032 | $0.1638 → $0.1638 | 0.0 % |
इनमें से कोई भी number वह price नहीं है जो vendor publish करता है। तीनों को तीन अलग-अलग rules से compute करना पड़ा, क्योंकि photograph कहीं भी billable unit नहीं है: पहले उसे tokens में convert किया जाता है, ऐसे arithmetic से जो तीन incompatible जगहों पर लिखा है।
Chapter 16 ने text का bill बनाया था और वहीं रुका था जहाँ text रुकता है। यह chapter invoice का बाकी हिस्सा है: images, speech, transcription, video और raw compute, जो मिलकर आठ अलग-अलग units में bill होते हैं, और उन चीज़ों की तुलना करने की method जो एक ही measure में नहीं बिकतीं।
विवरण दिखाएँ
इस chapter को पहले वाले chapters से क्या चाहिए।
- Chapter 7 ने tokenizer और unit बनाया था। यहाँ सब कुछ ऐसी चीज़ को उस unit में बदलने की कोशिश है जो text नहीं है।
- Chapter 8 ने स्थापित किया कि model क्या consume करता है: symbols नहीं, बल्कि embedding space में vectors। इसी वजह से image की कीमत tokens में लग सकती है।
- Chapter 16 ने
computeCost, उसके price tiers और उसके पाँच token buckets बनाए थे। यह chapter उस function को replace नहीं, extend करता है। - Chapter 11 ने LoRA को fine-tuning technique के रूप में introduce किया और Chapter 20 ने उसे budget decision के रूप में price किया। यहाँ वह ऐसे model पर दिखता है जो language model नहीं है।
Chapter 14 के rule के अनुसार tensors नहीं: यह tariffs, conversions और accounting है, इसलिए यह TypeScript है।
Why a photograph has a token price
सेक्शन का लिंक: Why a photograph has a token pricetransformer vectors की sequence लेता है। वे कहाँ से आए, इस पर उसकी कोई राय नहीं होती। Chapter 8 ने उसे token id से lookup किए गए embeddings दिए थे; architecture में कुछ भी lookup को जरूरी नहीं बनाता।
तो: picture को fixed squares में काटें, हर square को numbers की list में flatten करें, और हर list को एक learned linear layer से गुज़ारकर model की width का vector बना दें। colour pixels का 32 × 32 patch numbers है; projection उसे एक -dimensional vector में बदल देता है, ठीक वही shape जिसमें text token आता है। बस यही पूरी बात है, और paper के title में यही लिखा है: an image is worth 16 × 16 words.1 positional encoding जोड़ें ताकि model जान सके कौन-सा square कहाँ था, results को text embeddings के साथ interleave करें, और जो sequence model पढ़ता है वह आधी picture और आधी sentence होती है।
तीन papers ने इसे product बनाया। CLIP ने चार सौ million scraped pairs पर image encoder और text encoder को सहमत होना सिखाया, और यहीं pixels और words के shared space की idea hypothesis रहना बंद हुई।2 Flamingo ने frozen vision encoder को frozen language model से कुछ trained bridging layers के साथ जोड़ दिया।3 LLaVA ने दिखाया कि bridge एक single linear projection हो सकता है और instruction-following generated data से सिखाई जा सकती है, इसीलिए तब से हर open vision-language model मोटे तौर पर वैसा ही दिखता है।4
आपके invoice के लिए consequence तुरंत और साधारण है: patches sequence में positions हैं, इसलिए वे input tokens हैं, इसलिए आप उनके लिए input rate पर pay करते हैं। कितने हैं, यह arithmetic है, और हर provider इसे अलग तरह से करता है।
Three rules, all published, none the same
सेक्शन का लिंक: Three rules, all published, none the sameनीचे का हर rule provider की अपनी documentation से implement किया गया है और उसी documentation में दिए worked examples के against check किया गया है।
OpenAI image को 32 × 32 patches से cover करता है और count को per-model factor से multiply करता है। अगर patch count उस model और detail level के budget से अधिक हो जाए, तो image को fit होने तक scale down किया जाता है:
Anthropic इसे 28 × 28 patches से cover करता है, हर patch एक visual token, और long edge और token count दोनों पर cap लगाता है — standard-tier models पर 1,568 pixels और 1,568 tokens, high-resolution tier पर 2,576 और 4,784। Oversized images को उन दोनों में fit होने वाले सबसे बड़े size तक scale किया जाता है।5
Google pixels count ही नहीं करता। जिस image के दोनों sides 384 pixels या कम हैं, उसकी flat cost 258 tokens है। उससे बड़ी कोई भी image 258 tokens वाले tiles में कटती है, और tile grid के crop unit से आती है।6
export function openaiImageTokens(
w: number, h: number,
{ maxDim, patchBudget, multiplier }: { maxDim: number; patchBudget: number; multiplier: number },
) {
const fit = Math.min(1, maxDim / Math.max(w, h)); // never enlarges
w = Math.floor(w * fit); h = Math.floor(h * fit);
let patches = Math.ceil(w / 32) * Math.ceil(h / 32);
if (patches > patchBudget) {
const s = Math.sqrt((32 * 32 * patchBudget) / (w * h));
const adj = s * Math.min(
Math.floor((w * s) / 32) / ((w * s) / 32),
Math.floor((h * s) / 32) / ((h * s) / 32));
patches = Math.ceil(Math.floor(w * adj) / 32) * Math.ceil(Math.floor(h * adj) / 32);
}
return Math.ceil(patches * multiplier);
}
export function anthropicVisualTokens(
w: number, h: number,
{ maxLongEdge, maxTokens }: { maxLongEdge: number; maxTokens: number },
) {
const tok = (a: number, b: number) => Math.ceil(a / 28) * Math.ceil(b / 28);
const long = Math.max(w, h), short = Math.min(w, h);
for (let L = Math.min(long, maxLongEdge); L >= 1; L--) {
const t = tok(L, Math.round((short * L) / long));
if (t <= maxTokens) return t;
}
return 0;
}
export function geminiImageTokens(w: number, h: number) {
if (w <= 384 && h <= 384) return 258;
const crop = Math.floor(Math.min(w, h) / 1.5);
return Math.ceil(w / crop) * Math.ceil(h / crop) * 258;
}हर एक को उसके अपने vendor के printed numbers के against run करें:
OpenAI, gpt-5.4 at detail:high (2048 px, 2,500 patches, 1.2x)
1024x1024 -> 1024 patches -> 1229 tokens doc says 1229 MATCH
2048x2048 -> 2500 patches -> 3000 tokens doc says 3000 MATCH
Anthropic, the published table (one tier per row shown)
200x200 std 64 @ 200x200 doc 64, not resized OK
1000x1000 std 1296 @ 1000x1000 doc 1296, not resized OK
1092x1092 std 1521 @ 1092x1092 doc 1521, not resized OK
1920x1080 std 1560 @ 1456x819 doc 1560, 1456x819 OK
2000x1500 std 1564 @ 1269x952 doc 1564, 1269x952 OK
3840x2160 hi 4784 @ 2576x1449 doc 4784, 2576x1449 OK
Google, the worked example
960x540 -> crop 360 -> 3 x 2 = 6 tiles doc says 6 MATCHनौ agreements print होते हैं; full run पंद्रह check करता है, क्योंकि Anthropic की table सभी छह sizes के लिए दोनों tiers देती है। Rules अब आपके हैं, किसी भी photograph पर चलाने के लिए — और यही point है: इस chapter में ये ही तीन functions हैं जो आपको price page से नहीं मिल सकते।
What “bigger” means, three times
सेक्शन का लिंक: What “bigger” means, three timesउसी 4:3 photograph को छह sizes पर तीनों से गुज़ारें:
| size | OpenAI, high | Anthropic, standard | Anthropic, high-res | Gemini |
|---|---|---|---|---|
| 384 × 288 | 130 | 154 | 154 | 258 |
| 640 × 480 | 360 | 414 | 414 | 1,032 |
| 800 × 600 | 570 | 638 | 638 | 1,032 |
| 1600 × 1200 | 2,280 | 1,564 | 2,494 | 1,032 |
| 3200 × 2400 | 2,942 | 1,564 | 4,740 | 1,032 |
| 4000 × 3000 | 2,942 | 1,564 | 4,740 | 1,032 |
आखिरी column को नीचे की ओर पढ़ें। picture 384 pixels से ऊपर होते ही number फिर कभी नहीं बदलता, और यह coincidence या cap नहीं है। कम से कम जितनी wide उतनी tall image के लिए crop unit को tile formula में वापस substitute करें:
Size cancel हो जाता है। Google के image tokens aspect ratio पर depend करते हैं और किसी चीज़ पर नहीं। 4:3 photograph चार tiles है, चाहे वह thumbnail हो या poster। यही single algebraic fact ऊपर की savings table में zero की पूरी explanation है, और कोई price page कहीं इसे नहीं कहता।
बाकी दो columns इसके बजाय cap करते हैं, अलग heights पर और अलग reasons से — Anthropic declared token ceiling पर, OpenAI pixel limit के बाद patch budget पर — इसलिए तीन curves अलग-अलग sizes पर cross करती हैं।
अब इसे तोड़ें। vision model पर कम खर्च करने का obvious तरीका less detail माँगना है, इसलिए detail: "low" भेजें:
1600x1200 low = 2280 high = 2280 ratio 1.00
3200x2400 low = 3687 high = 2942 ratio 1.25कम detail माँगने की cost 25 % ज्यादा निकली। यह bug नहीं है और OpenAI sizing table की एक line में ऐसा कहता है: उस model family पर, low 2048-pixel limit और 6,144-patch budget use करता है जबकि high वही pixel limit और 2,500-patch budget use करता है, “so it can use more tokens than high”.7 शब्द low fidelity setting का नाम है, price का नहीं: documented पाँच model families में से दो पर इससे कोई saving नहीं मिलती, और उनमें से एक पर यह ज्यादा cost करता है।
Generating one is a different machine
सेक्शन का लिंक: Generating one is a different machineअब तक सब कुछ image read करने वाले model के बारे में था। image बनाना ऐसे mechanism पर चलता है जिसमें tokens होते ही नहीं, और इसी वजह से वह word के बजाय picture के हिसाब से बिकता है।
Making an image: a per-picture price is a per-token price
सेक्शन का लिंक: Making an image: a per-picture price is a per-token priceVendors image generation को per picture price के रूप में publish करते हैं। वह ऐसा नहीं है। GPT Image models specialised image tokens emit करते हैं जिनकी count requested size और quality पर depend करती है; published counts को GPT Image 1 के published image output rate $40 per million से multiply करें और उसी page के per-image prices से compare करें:
| quality | 1024 × 1024 | 1024 × 1536 | 1536 × 1024 |
|---|---|---|---|
| low | 272 tok → $0.0109 ($0.011) | 408 tok → $0.0163 ($0.016) | 400 tok → $0.0160 ($0.016) |
| medium | 1,056 tok → $0.0422 ($0.042) | 1,584 tok → $0.0634 ($0.063) | 1,568 tok → $0.0627 ($0.063) |
| high | 4,160 tok → $0.1664 ($0.167) | 6,240 tok → $0.2496 ($0.25) | 6,208 tok → $0.2483 ($0.25) |
नौ published figures के against नौ derived figures, हर pair $0.002 के भीतर agree करता है।11 Google इससे भी ज्यादा explicit है और price page पर conversion आपके लिए कर देता है: image output $60 per million tokens पर, “output images at 1K (1024x1024px) consume 1120 tokens and are equivalent to $0.067 per image”.12
तो per-image price, per-token price ही है जिसमें count fold कर दी गई है। यह ठीक है, और यह कुछ छिपाता है। Current generation की table लें और उल्टा divide करें:
quality 1024x1024 1024x1536
low $0.006 -> 200 tok $0.005 -> 167 tok
medium $0.053 -> 1767 tok $0.041 -> 1367 tok
high $0.211 -> 7033 tok $0.165 -> 5500 tokहर quality पर बड़ी image सस्ती है। 1024 × 1536 canvas, 1024 × 1024 से 50 % ज्यादा pixels है और medium पर 23 % कम tokens cost करता है। OpenAI इसे ऐसी sentence में flag करता है जिसे आप skip कर देंगे — “a larger non-square resolution can sometimes produce fewer output tokens than a smaller or square resolution at the same quality setting” — और पिछले model generation पर यह उल्टा चलता था, portrait square से 50 % ज्यादा cost करता था।11 उस change से पहले लिखे 1024x1024 के हर default अब expensive option हैं।
Sound, billed by the second, the character, and the token
सेक्शन का लिंक: Sound, billed by the second, the character, and the tokenतीन products से वही 519 characters बोलने को कहें — लगभग 38 seconds का audio — और दो vendors से तीन unit systems मिलते हैं:
| model | unit | price |
|---|---|---|
tts-1 | per character | $15.00 per million characters → $0.007785 |
tts-1-hd | per character | $30.00 per million characters → $0.015570 |
gemini-3.1-flash-tts | per audio token, 25 per second | $20.00 per million → $0.019319 |
Same vendor दोनों units बेचता है: OpenAI का tts-1 per million characters price है जबकि gpt-4o-mini-tts per million tokens price है, $0.60 in और $12.00 out।13 इसलिए “cheapest text-to-speech” ऐसा सवाल नहीं है जिसका answer हो, जब तक आप यह न कहें कि आप क्या बोल रहे हैं।
और दोनों units opposite चीज़ों से blind हैं। Per-character price duration नहीं देख सकता: slow, deliberate voice चुनें, या pauses जोड़ें, bill नहीं बदलता जबकि audio लंबा हो जाता है। Per-second price content नहीं देख सकता: तीस seconds की cost उतनी ही है, चाहे वह dense technical paragraph हो या कोई दस तक गिन रहा हो। Voice बदलें और आपके दो vendors में ठीक एक reprices करता है।
Transcription उल्टा चलता है और पूरे invoice की सबसे simple line है — per minute of audio, flat:
whisper $0.005960 ($0.006 / min)
gpt-transcribe $0.004470 ($0.0045 / min)
gpt-4o-mini-transcribe $0.002980 ($0.003 / min)
gpt-live-transcribe $0.016887 ($0.017 / min)तीसरी row के against आखिरी row note करें: words आते ही live करना, finished file पर करने से 5.7 गुना cost करता है। यह gap batch न कर पाने की कीमत है, और यही अगले section को expensive बनाता है।
One minute of voice, itemised
सेक्शन का लिंक: One minute of voice, itemisedअब वह number जो decide करता है कि voice feature है या product।
Call: ten-turn support conversation, 149 words, जो declared 150 words per minute पर 59.6 seconds की speech है — 21.2 caller ने बोले, 38.4 वापस बोले गए। token conversions providers के अपने हैं। OpenAI: “audio tokens in user messages are 1 token per 100 ms of audio, while audio tokens in assistant messages are 1 token per 50 ms”.14 Google: दोनों directions में 25 tokens per second, जिसे उसका price page उसी line पर $12.00 per million और $0.018 per minute publish करके confirm करता है।12
Conversation ठीक वैसे ही accumulate होती है जैसा Chapter 16 ने कहा था, क्योंकि mechanism वही है: “the entire conversation is sent to the model for each Response... thus turns later in the session will be more expensive”.14 बस अब history audio tokens में measured है।
| turn | user | assistant | fresh audio in | cached audio in | audio out | cost |
|---|---|---|---|---|---|---|
| 1 | 4.4 s | 9.2 s | 44 | 0 | 184 | $0.013224 |
| 2 | 5.6 s | 9.6 s | 56 | 228 | 192 | $0.014211 |
| 3 | 5.2 s | 9.2 s | 52 | 476 | 184 | $0.013670 |
| 4 | 4.0 s | 4.8 s | 40 | 712 | 96 | $0.007749 |
| 5 | 2.0 s | 5.6 s | 20 | 848 | 112 | $0.008187 |
अब comparison जो product decide करता है, सभी चार को एक minute पर normalise करके:
| per minute | versus text | |
|---|---|---|
gpt-realtime-2.1, no caching | $0.131259 | 37.9× |
gpt-realtime-2.1, history cached | $0.057425 | 16.6× |
gemini-3.1-flash-live, no caching | $0.023965 | 6.9× |
वही words typed, gpt-5.6-terra | $0.003461 | — |
Thirty-eight times. Thirty-eight per cent नहीं। वही identical exchange, sound में conducted instead of text, लगभग दो orders of magnitude महँगा है, और उस gap में से कुछ भी ऐसा margin नहीं है जिसे किसी ने charge करने के लिए चुना — यह conversion rate है। assistant audio का एक second बीस tokens है। वही second declared rate पर 2.5 words carry करता है, और measured transcript 1.26 tokens per word पर चलता है, इसलिए text के रूप में यह 3.15 tokens है। Sound उसी meaning के लिए 6.3 times bulkier package है, और उसके हर token का bill text output rate से 5.3 गुना और text input rate से 16 गुना लगता है। Bulk ratio को price ratio से multiply करें और accounting शुरू होने से पहले ही order of magnitude आ चुका होता है।
Table से दो operational consequences सीधे निकलते हैं।
Audio caching optimisation नहीं, business model है। Cached audio input $0.40 per million है जबकि fresh $32.00 — 98.75 % discount जो call को आधा कर देता है। Rule Chapter 16 का है, unchanged: cache prefix match करता है, इसलिए conversation के front में mid-call कुछ भी insert करने से वह destroy हो जाता है, और “caller is now verified” रखने की natural जगह ठीक वही है।
और client में आप कुछ भी करें, sound un-bill नहीं होता। User assistant के ऊपर बोलता है, आपका code playback रोक देता है, speaker quiet हो जाता है। जो भी already generate हो चुका था वह already charged था, क्योंकि billing response create होते समय accrue होती है; और Chapter 16 के rule के अनुसार जो भी conversation में रहता है वह बाद के हर turn पर input audio के रूप में फिर भेजा जाता है। Chapter 14 ने text stream abort करने के बारे में यही point बनाया था। Voice में इसकी cost तीस गुना ज्यादा है।
Video, GPU-seconds, and a price that is not a price
सेक्शन का लिंक: Video, GPU-seconds, and a price that is not a priceVideo कुछ vendors per second बेचते हैं और कुछ per clip, resolution और कभी-कभी duration के tiers के साथ। ये दो shapes सिर्फ convenience में अलग नहीं हैं; ये cross करते हैं।
| model | 1 s | 2 s | 5 s | 10 s | 20 s |
|---|---|---|---|---|---|
veo-3.1, per second, 1080p | $0.400 | $0.800 | $2.000 | $4.000 | $8.000 |
veo-3.1-fast, per second, 1080p | $0.120 | $0.240 | $0.600 | $1.200 | $2.400 |
sora-2, per second, 720p | $0.100 | $0.200 | $0.500 | $1.000 | $2.000 |
hailuo-02, per clip, 1080p | $0.480 | $0.480 | $0.480 | $0.480 | $0.480 |
mochi, per GPU-second | $0.018 | $0.037 | $0.092 | $0.183 | $0.366 |
Per-clip vendor 1.2 seconds से नीचे per-second वाले से महँगा है और twenty पर 16.7 times cheaper। Clip length change होते ही उन दो models की कोई ordering survive नहीं करती, इसलिए “कौन-सा video model cheapest है” models के बारे में सवाल नहीं है।
Last row worse है, और chapter का honest heart है। mochi real GPU seconds के against bill होता है — job का measured prediction time — A100 पर $0.001400 per second और H100 पर $0.001525, जो rented machine के rates हैं और कुछ नहीं।15 यह बिल्कुल precise tariff है और price नहीं है, क्योंकि वह quantity जिससे इसे multiply करना है, आपके pay करने की commitment के बाद तक unknown है। ऊपर की row output के हर second के लिए twelve GPU-seconds assume करती है; उस assumption को quadruple करें और यह cheapest band छोड़ देती है, और छह गुना पर जाकर mid-table में land करती है। यह इस page का अकेला tariff है जिसे आप quote में नहीं रख सकते।
The normaliser
सेक्शन का लिंक: The normaliserतो: tokens, image tokens, characters, minutes, video seconds, whole clips, GPU seconds, flat units। आठ quantities, और उन्हें एक axis पर रखने का एक ही तरीका है: workload declare करें और उसे price करें।
यही Chapter 16 के computeCost का extension है — वही tier machinery, अब ऐसे criteria के साथ जो prompt length नहीं हैं:
export interface MediaCriteria {
resolution?: string[]; quality?: string[];
hasAudio?: boolean; maxDurationSeconds?: number;
}
export interface MediaTier { when?: MediaCriteria; price: number }
export type MediaRate = number | MediaTier[];
const matches = (when: MediaCriteria, u: Usage) => {
const inList = (l?: string[], v?: string) => !l || (v !== undefined && l.includes(v));
if (!inList(when.resolution, u.resolution)) return false;
if (!inList(when.quality, u.quality)) return false;
if (when.hasAudio !== undefined && when.hasAudio !== (u.hasAudio ?? false)) return false;
if (when.maxDurationSeconds !== undefined
&& (u.videoSeconds ?? 0) > when.maxDurationSeconds) return false;
return true;
};
const mediaPrice = (rate: MediaRate | undefined, u: Usage): number => {
if (rate === undefined) return 0;
if (typeof rate === "number") return rate;
for (const t of rate.filter((t) => t.when)) if (matches(t.when!, u)) return t.price;
return rate.find((t) => !t.when)?.price ?? 0; // the tier with no criteria is the default
};
export function computeCost(p: Pricing, u: Usage): number {
let c = textCost(p, u); // Chapter 16, unchanged
if (p.imageInputToken || p.imageOutputToken) {
c += (u.imageInputTokens ?? 0) * (p.imageInputToken ?? 0)
+ (u.imageOutputTokens ?? 0) * (p.imageOutputToken ?? 0);
} else if (p.imageUnit !== undefined) c += (u.images ?? 1) * mediaPrice(p.imageUnit, u);
if (p.videoSecond !== undefined) c += (u.videoSeconds ?? 0) * mediaPrice(p.videoSecond, u);
if (p.videoUnit !== undefined) c += (u.videoCount ?? 1) * mediaPrice(p.videoUnit, u);
c += (u.audioInputTokens ?? 0) * (p.audioInputToken ?? 0)
+ (u.cachedAudioInputTokens ?? 0) * (p.cachedAudioInputToken ?? p.audioInputToken ?? 0)
+ (u.audioOutputTokens ?? 0) * (p.audioOutputToken ?? 0)
+ (u.computeSeconds ?? 0) * (p.computeSecond ?? 0)
+ (u.chars ?? 0) * (p.perChar ?? 0)
+ (u.minutes ?? 0) * (p.perMinute ?? 0);
return c;
}दो marked lines वहीं हैं जहाँ यह टूटता है। Per unit quoted tariff u.images ?? 1 को multiply करता है; per token quoted tariff किसी ऐसी चीज़ को multiply करता है जिसका default zero है। दोनों को empty usage दें — वही shape जो measurement fail होने पर मिलती है — और देखें:
per image (nano-banana-pro) empty usage => $0.1500
per clip (hailuo-02) empty usage => $0.1500
per unit (a cloned voice) empty usage => $3.0000
per token (gpt-image-2) empty usage => $0.0000
per second (veo-3.1) empty usage => $0.0000
per GPU-second (mochi) empty usage => $0.0000कुछ नहीं हुआ, छह बार, और एक बार cost तीन dollars आई और पाँच बार कुछ नहीं। यह rounding difference नहीं है; यह decision है कि absent number का मतलब क्या है, हर unit के लिए अलग-अलग लिया गया और कहीं लिखा नहीं गया। सही rule यह है कि ऐसा field जिसे किसी ने measure नहीं किया absent रहता है, क्योंकि “not measured” और “measured and came out zero” अलग चीज़ें हैं। यह function चुपचाप disagree करता है।
Second failure duration है। Clip-priced tariff अपना tier maxDurationSeconds से u.videoSeconds ?? 0 के against select करता है, इसलिए ऐसी usage जिसने duration record ही नहीं की, shortest tier match करती है:
duration recorded -> $0.45
duration missing -> $0.27Video कितनी लंबी थी यह न जानने पर forty per cent off। दोनों bugs की root वही है: convenience के लिए चुना गया default, ऐसे function के अंदर जिसका पूरा काम exact होना है।
Making the number comparable
सेक्शन का लिंक: Making the number comparableCosts computable होने के बाद comparison को दूसरा half चाहिए — हर engine के लिए एक declared representative workload, public में stated ताकि reader उससे disagree कर सके:
export const representative = {
text: { blend: [[{ promptTokens: 1e6 }, 0.25], [{ completionTokens: 1e6 }, 0.75]] },
image: { images: 1, imageInputTokens: 50, imageOutputTokens: 1500 },
video: { videoSeconds: 5, videoCount: 1, resolution: "1080p", hasAudio: true, computeSeconds: 60 },
voice: { chars: 1000, computeSeconds: 10 },
stt: { minutes: 1 },
};इनमें से हर line एक argument है। Text एक quarter input और three quarters output mix करता है क्योंकि real usage output की ओर skew करता है; fifty-fifty blend models को अलग rank करता है। Image workload 1,500 output tokens assume करता है, OpenAI के medium square के 1,056 और medium portrait के 1,584 के बीच। Video 1080p पर five seconds assume करता है, और हमने अभी देखा दो vendors 1.2 seconds पर places swap करते हैं। Compute entry sixty GPU-seconds assume करती है क्योंकि assume करने के लिए और कुछ नहीं है।
यही method है, और available अकेली honest method है: आप अलग-अलग units में prices compare नहीं कर सकते; आप केवल उस workload की cost compare कर सकते हैं जिसे आपने लिखकर declare किया है। कोई भी table जो अपना workload print किए बिना multimodal models rank करती है, अपने assumptions rank कर रही है।
Where this goes next
सेक्शन का लिंक: Where this goes nextअब आप model जो भी produce कर सकता है उसकी कीमत लगा सकते हैं, चाहे वह जिस unit में बिके, और जोर से कह सकते हैं कि आपकी comparison ने कौन-सा workload assume किया। इससे वह invoice बंद होता है जिसे Chapter 16 ने खोला था, और Part III भी बंद होता है: Chapter 14 से यहाँ तक सब कुछ one call के बारे में था — उसे कैसे बनाना है, उसमें क्या डालना है, उसे कैसे sample करना है, वह क्या return करता है, उसकी cost क्या है।
Chapter 22 unit of analysis बदलता है, और यह change expensive है। agent one call नहीं है; वह loop है जो खुद decide करता है कि कितनी calls करनी हैं, और पिछले दो chapters का arithmetic ही उसे architecture diagram से budget में बदलता है। वह उसी model से वही सवाल दो बार पूछकर शुरू होता है, दूसरी बार catalogue में एक tool जोड़कर, और यह measure करके कि उस एक tool ने क्या किया: one call two बन गई, thirty-nine input tokens 420 बन गए।
क्या इससे वह agent बनता है, यह इस पर depend करता है कि आप दो published definitions में से कौन-सी खोलते हैं, और वे agree नहीं करतीं। उनमें से एक खुद से भी agree नहीं करती।
Sources and method
सेक्शन का लिंक: Sources and methodइस chapter में हर price, formula और conversion rate provider के अपने page से 7 September 2026 को पढ़ा गया और उसी date के साथ quote किया गया है, क्योंकि ये सब बदलेंगे। token counts, costs और comparisons उस data पर ऊपर printed code से, एक machine पर, बिना किसी paid API call के compute किए गए — और यही honest reason भी है कि इस chapter में एक भी latency claim नहीं है।
Image-token functions, cost tables, voice-call breakdown और empty-usage results इस chapter में printed TypeScript से produce किए गए, Node 22 पर run करके। Voice comparison के लिए used dialogue 149 words का है और tiktoken के साथ o200k_base encoding के तहत 188 tokens पर tokenized हुआ; उसकी duration 150 words per minute की declared rate से आती है, जो comparison का parameter है, measurement नहीं। हर provider figure उस footnote को carry करता है जो उस page का नाम बताता है जिससे वह आया।
संदर्भ
सेक्शन का लिंक: संदर्भ-
Dosovitskiy, A. et al. An Image Is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv:2010.11929 (2020)। Patches, embedding dimension में linear projection, और position embeddings जो grid को sequence model के लिए legible बनाते हैं। ↩
-
Radford, A. et al. Learning Transferable Visual Models From Natural Language Supervision. arXiv:2103.00020 (2021)। 400 million pairs पर image encoder और text encoder की contrastive training, और shared space जिसे downstream सब assume करता है। ↩
-
Alayrac, J.-B. et al. Flamingo: a Visual Language Model for Few-Shot Learning. arXiv:2204.14198 (2022)। Frozen vision encoder, frozen language model, trained bridging layers — वह architecture जिसने image understanding को chat capability में बदला। ↩
-
Liu, H., Li, C., Wu, Q. and Lee, Y. J. Visual Instruction Tuning. arXiv:2304.08485 (2023)। Bridge के रूप में single linear projection और training set के रूप में generated instruction data; यही वजह कि open vision-language models एक shape पर converge हुए। ↩
-
Anthropic, Vision,
platform.claude.com/docs/en/build-with-claude/vision, accessed 2026-09-07। “Claude views images in patches instead of pixels. Each patch is a 28×28-pixel block of the image, referred to as a visual token. An image, therefore, costs ⌈width / 28⌉ × ⌈height / 28⌉ visual tokens.” साथ ही दो resolution tiers (standard: 1568-pixel long edge, 1568 visual tokens; high-resolution, Claude 4.7 और later पर: 2576 pixels और 4784 tokens), downsizing rule, और ऊपर reproduced sizes और token counts की six-row table। Model rates Anthropic, Pricing,platform.claude.com/docs/en/about-claude/pricing, same date से: Claude Haiku 4.5 at $1 और $5 per million input और output tokens। ↩ -
Google, Image understanding,
ai.google.dev/gemini-api/docs/image-understanding, accessed 2026-09-07। “258 tokens if both dimensions <= 384 pixels. Larger images are tiled into 768x768 pixel tiles, each costing 258 tokens”, crop-unit formula के साथ —floor(min(width, height) / 1.5), dimensions divided by it and multiplied together — और 960 × 540 के worked example में 3 × 2 = 6 tiles। Google इसे “a rough formula” कहता है; ऊपर derived scale-invariance published formula की property है। Same family पर audio input 32 tokens per second of audio है (ai.google.dev/gemini-api/docs/audio, same date)। ↩ -
OpenAI, Images and vision,
developers.openai.com/api/docs/guides/images-vision, accessed 2026-09-07। Patch-based rule (32 × 32 patches,patch_count = ceil(width/32)×ceil(height/32),shrink_factorformula और उसका integer adjustment, 30,000-patch rejection limit) का source; model sizing table, जिसमें यह भी शामिल है किlowongpt-5.42048-pixel limit और 6,144-patch budget use करता है “so it can use more tokens thanhigh”, जबकिhighका budget 2,500 patches है; multiplier table (GPT-5.x families के लिए 1.2,gpt-4.1-miniके लिए 1.62,gpt-4.1-nanoके लिए 2.46); ऊपर reproduced दो worked examples (1024 × 1024 → 1229 tokens, 2048 × 2048 → 3000 tokens); older models के लिए tile-based rules (base plus 512-pixel tiles, 85 + 170 ongpt-4o); और vision box में quoted limitations list। ↩ ↩2 -
Ho, J., Jain, A. and Abbeel, P. Denoising Diffusion Probabilistic Models. arXiv:2006.11239 (2020)। Forward noising schedule, reparameterisation जो objective को added noise predict करने में बदलता है, और sampling loop। ↩
-
Rombach, R., Blattmann, A., Lorenz, D., Esser, P. and Ommer, B. High-Resolution Image Synthesis with Latent Diffusion Models. arXiv:2112.10752 (2022)। Compressed latent space में diffusion process चलाना, जिससे fixed step count per image बेचने लायक affordable हुआ। ↩
-
Prince, S. J. D. Understanding Deep Learning (MIT Press, 2023), chapter 18। Diffusion के बारे में इस chapter ने जो छोड़ा — variational bound, noise schedules, classifier-free guidance और sampler families — उसके लिए declared delegation। Hu, E. et al., LoRA: Low-Rank Adaptation of Large Language Models, arXiv:2106.09685 (2021), adapter itself है, Chapter 11 में language model पर introduced और यहाँ image model पर बिना mathematics बदले used। Radford, A. et al., Robust Speech Recognition via Large-Scale Weak Supervision (Whisper), arXiv:2212.04356 (2022), वह transcription model है जिसकी per-minute price ऊपर appear होती है। ↩
-
OpenAI, Image generation,
developers.openai.com/api/docs/guides/image-generation, Pricing,developers.openai.com/api/docs/pricing, औरgpt-image-1का model page, सभी accessed 2026-09-07।gpt-image-2के model page में pricing section नहीं है; उसकी rates ऊपर के pricing page से आती हैं। GPT Image 1 का page derivation में used per-image table के पास text input at $5.00, image input at $10.00 और image output at $40.00 per million tokens publish करता है। Also: gpt-image-2 से पहले के models के लिए output-token table (square, portrait और landscape के लिए low 272 / 408 / 400, medium 1056 / 1584 / 1568, high 4160 / 6240 / 6208); GPT Image 2, 1.5, 1 और 1 Mini के per-image price tables used in derivations above; sentence “a larger non-square resolution can sometimes produce fewer output tokens than a smaller or square resolution at the same quality setting”; note कि हर streamed partial image extra 100 image output tokens cost करती है; और gpt-image-2 rates of $8.00 image input, $2.00 cached image input, $30.00 image output और $5.00 text input per million tokens। Comparisons के लिए used text model rates:gpt-5.6-terraat $2.00 input, $0.20 cached input और $12.00 output,gpt-5.6-lunaat $0.20 और $1.20, standard tier, short context। Video:sora-2at $0.10 per second at 720p औरsora-2-proat $0.30, $0.50 और $0.70 at 720p, 1024p और 1080p। Transcription:gpt-4o-transcribe,gpt-transcribe,gpt-4o-mini-transcribeऔरgpt-live-transcribeके लिए $0.006, $0.0045, $0.003 और $0.017 per minute। ↩ ↩2 -
Google, Gemini Developer API pricing,
ai.google.dev/gemini-api/docs/pricing, accessed 2026-09-07। Gemini 3.1 Flash-Lite at $0.25 per million input tokens (text, image और video) और $1.50 output। Gemini 3.1 Flash Image: image output at $60 per million tokens, 0.5K, 1K, 2K और 4K images के लिए 747, 1120, 1680 और 2520 tokens की published equivalences और उनके per-image prices $0.045, $0.067, $0.101 और $0.151। Gemini 3.1 Flash TTS: $1.00 text input, $20.00 audio output, “audio tokens correspond to 25 tokens per second of audio”. Gemini 3.1 Flash Live Preview: $0.75 text और “$3.00 or $0.005/min” audio input, “$4.50 (text) $12.00 or $0.018/min (audio)” output। Veo 3.1 per second with audio: 720p और 1080p पर $0.40 और 4K standard पर $0.60; fast $0.10, $0.12 और $0.30। Gemini Omni Flash video output को “at a rate of 5,792 tokens per second of 720p video” bill करता है, जिसे वही footnote लगभग $0.10 per second में convert करता है — कहीं भी सबसे साफ published statement कि per-second media price token price है। ↩ ↩2 -
OpenAI model pages for
tts-1,tts-1-hdandgpt-4o-mini-tts,developers.openai.com/api/docs/models, accessed 2026-09-07।tts-1at $15.00 औरtts-1-hdat $30.00 per million characters;gpt-4o-mini-ttsat $0.60 per million text input tokens और $12.00 per million audio output tokens — वही vendor, वही operation, दो units। ↩ -
OpenAI, Managing costs (Realtime API),
developers.openai.com/api/docs/guides/realtime-costs, accessed 2026-09-07। “Audio tokens in user messages are 1 token per 100 ms of audio, while audio tokens in assistant messages are 1 token per 50ms of audio.” Also: “The entire conversation is sent to the model for each Response... thus turns later in the session will be more expensive”; Response create होने पर costs accrue होती हैं; worked two-turn example जिसकी accumulation ऊपर की table reproduce करती है; औरresponse.doneusage payload with itsinput_token_detailsandoutput_token_detailssplits। Rates pricing page से, same date:gpt-realtime-2.1audio at $32.00 input, $0.40 cached input और $64.00 output per million tokens, text at $4.00, $0.40 और $24.00, image input at $5.00। ↩ ↩2 -
Replicate, Pricing,
replicate.com/pricing, accessed 2026-09-07। Nvidia A100 (80GB) at $0.001400 per second और $5.04 per hour; Nvidia H100 at $0.001525 per second और $5.49 per hour। ↩