69 One USD cent equals 100,000,000 ticks, so one US dollar equals69 One USD cent equals 100,000,000 ticks, so one US dollar equals
70 10,000,000,000 ticks.70 10,000,000,000 ticks.
71 71
72 * `input_tokens` (integer | null) — Total input tokens: prompt text tokens + input image tokens
73 (the sum of \`input\_tokens\_details\`, where \`cached\_tokens\` is a subset
74 of \`text\_tokens\`, not additive).
75
76 * `input_tokens_details` (object)
77
78 * `cached_tokens` (integer, required) — Text tokens served from cache from previous requests (a subset of
79 \`text\_tokens\`).
80
81 * `image_tokens` (integer, required) — Input image tokens, as reported by the image engine.
82
83 * `text_tokens` (integer, required) — Prompt text tokens consumed by the prompt-rewriting (upsampler) LLM,
84 including any served from cache.
85
86 * `output_tokens` (integer | null) — Total output tokens: rewritten-prompt text tokens + reasoning tokens
87 \+ generated image tokens (the sum of \`output\_tokens\_details\`).
88
89 * `output_tokens_details` (object)
90
91 * `image_tokens` (integer, required) — Generated image tokens, as reported by the image engine.
92
93 * `reasoning_tokens` (integer, required) — Reasoning (thinking) tokens generated by the prompt-rewriting
94 (upsampler) LLM.
95
96 * `text_tokens` (integer, required) — Rewritten-prompt text tokens generated by the prompt-rewriting
97 (upsampler) LLM, excluding reasoning tokens.
98
99 * `total_tokens` (integer | null) — Total tokens (input + output).
100
72### Code Examples101### Code Examples
73 102
74```bash103```bash
219 One USD cent equals 100,000,000 ticks, so one US dollar equals248 One USD cent equals 100,000,000 ticks, so one US dollar equals
220 10,000,000,000 ticks.249 10,000,000,000 ticks.
221 250
251 * `input_tokens` (integer | null) — Total input tokens: prompt text tokens + input image tokens
252 (the sum of \`input\_tokens\_details\`, where \`cached\_tokens\` is a subset
253 of \`text\_tokens\`, not additive).
254
255 * `input_tokens_details` (object)
256
257 * `cached_tokens` (integer, required) — Text tokens served from cache from previous requests (a subset of
258 \`text\_tokens\`).
259
260 * `image_tokens` (integer, required) — Input image tokens, as reported by the image engine.
261
262 * `text_tokens` (integer, required) — Prompt text tokens consumed by the prompt-rewriting (upsampler) LLM,
263 including any served from cache.
264
265 * `output_tokens` (integer | null) — Total output tokens: rewritten-prompt text tokens + reasoning tokens
266 \+ generated image tokens (the sum of \`output\_tokens\_details\`).
267
268 * `output_tokens_details` (object)
269
270 * `image_tokens` (integer, required) — Generated image tokens, as reported by the image engine.
271
272 * `reasoning_tokens` (integer, required) — Reasoning (thinking) tokens generated by the prompt-rewriting
273 (upsampler) LLM.
274
275 * `text_tokens` (integer, required) — Rewritten-prompt text tokens generated by the prompt-rewriting
276 (upsampler) LLM, excluding reasoning tokens.
277
278 * `total_tokens` (integer | null) — Total tokens (input + output).
279
222### Code Examples280### Code Examples
223 281
224```bash282```bash