SpyBara
Go Premium

Documentation 2026-08-07 17:57 UTC to 2026-08-08 23:00 UTC

4 files changed +89 −3. View all changes and history on the product overview
2026
Fri 21 18:57 Thu 20 15:58 Wed 19 18:02 Tue 18 04:01 Thu 13 22:00 Wed 12 23:59 Tue 11 20:57 Sat 8 23:00 Fri 7 17:57 Thu 6 20:01 Mon 3 23:00 Sat 1 01:59
Details

165 165 

166### Aspect Ratio166### Aspect Ratio

167 167 

168Control image dimensions with the `aspect_ratio` parameter. This works for image generation and image editing with multiple images.168Control image dimensions with the `aspect_ratio` parameter.

169For image editing with a single image, the output aspect ratio respects the input image's aspect ratio.

170 169 

171| Ratio | Use case |170| Ratio | Use case |

172|-------|----------|171|-------|----------|

rate-limits.md +1 −1

Details

41| grok-4.20-multi-agent-0309 | T0: 9, T1: 12, T2: 18, T3: 31, T4: 56 | T0: 2.5M, T1: 3.7M, T2: 6.2M, T3: 11M, T4: 21M |41| grok-4.20-multi-agent-0309 | T0: 9, T1: 12, T2: 18, T3: 31, T4: 56 | T0: 2.5M, T1: 3.7M, T2: 6.2M, T3: 11M, T4: 21M |

42| grok-imagine-image-quality | 5 | — |42| grok-imagine-image-quality | 5 | — |

43| grok-imagine-image | 5 | — |43| grok-imagine-image | 5 | — |

44| grok-imagine-video | 10 | — |

45| grok-imagine-video-1.5 | 10 | — |44| grok-imagine-video-1.5 | 10 | — |

45| grok-imagine-video | 10 | — |

46 46 

47### What counts toward TPM47### What counts toward TPM

48 48 

Details

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

Details

344 One USD cent equals 100,000,000 ticks, so one US dollar equals344 One USD cent equals 100,000,000 ticks, so one US dollar equals

345 10,000,000,000 ticks.345 10,000,000,000 ticks.

346 346 

347 * `input_tokens` (integer | null) — Total input tokens: prompt text tokens + input image tokens

348 (the sum of \`input\_tokens\_details\`, where \`cached\_tokens\` is a subset

349 of \`text\_tokens\`, not additive).

350 

351 * `input_tokens_details` (object)

352 

353 * `cached_tokens` (integer, required) — Text tokens served from cache from previous requests (a subset of

354 \`text\_tokens\`).

355 

356 * `image_tokens` (integer, required) — Input image tokens, as reported by the image engine.

357 

358 * `text_tokens` (integer, required) — Prompt text tokens consumed by the prompt-rewriting (upsampler) LLM,

359 including any served from cache.

360 

361 * `output_tokens` (integer | null) — Total output tokens: rewritten-prompt text tokens + reasoning tokens

362 \+ generated image tokens (the sum of \`output\_tokens\_details\`).

363 

364 * `output_tokens_details` (object)

365 

366 * `image_tokens` (integer, required) — Generated image tokens, as reported by the image engine.

367 

368 * `reasoning_tokens` (integer, required) — Reasoning (thinking) tokens generated by the prompt-rewriting

369 (upsampler) LLM.

370 

371 * `text_tokens` (integer, required) — Rewritten-prompt text tokens generated by the prompt-rewriting

372 (upsampler) LLM, excluding reasoning tokens.

373 

374 * `total_tokens` (integer | null) — Total tokens (input + output).

375 

347* `video` (object)376* `video` (object)

348 377 

349 * `duration` (integer, required) — Duration of the generated video in seconds.378 * `duration` (integer, required) — Duration of the generated video in seconds.