Files
codex/codex-rs/ext/image-generation/imagegen_gif_description.md
T
Gan Tu f9e7b19df8 Add optional animated GIF output to image generation (#59073)
## What changed

- Gate GIF output behind `features.image_generation_animation`, disabled by default.
- Accept `gif` options for generation and editing, with optional `frame_count` and `frame_duration_ms` controls. Use `gif: {}` for API defaults.
- Preserve animated output with `.gif` filenames and `image/gif` data URLs while providing a still preview to the model.
- Add guidance for simple animations and spritesheet-based GIF edits.

## Testing

Add integration coverage for GIF generation and editing, explicit frame controls and API defaults, saved animation bytes, and still-preview replay across follow-up turns.

GitOrigin-RevId: 08afa0316ae3675921652157836191a649f563cf
2026-11-03 06:24:24 +00:00

557 B
Raw Blame History

GIF guidelines:

  • Use imagegen only for simple GIFs with 2–16 frames. For more complex animations or more than 16 frames, use other tools instead.
  • Set gif to request GIF output. Use {} for the defaults (9 frames, 200 ms per frame), or set frame_count and frame_duration_ms.
  • To edit a previously generated GIF, first inspect its frames, then create a spritesheet with equal-sized cells in a regular grid. Pass that spritesheet through referenced_image_paths and set gif to generate the new GIF. Do not pass the GIF itself as an edit input.