Tile image for upscaling
tile_imagePrepare an image for AI upscaling by cutting it into aspect-ratio-shaped tiles, planning grids or refinement regions, and estimating edit costs before edit_image runs.
Instructions
Upscale step 1: cut an image into crops shaped to the edit model's aspect ratios. longEdge sets the target (1K-16K, default 8K); with grid and imageSize omitted it picks the cheapest plan that covers it (one tile up to about 4K, a 2x2-4x4 grid beyond). regions re-render faces or text in a later pass. Free and local; reports the edit cost. Step 2: edit_image each crop as the result says. Step 3: stitch_tiles. Detail is invented, not recovered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | Cut a grid x grid layout covering the whole image (1-4). Omit it on a first pass to let tile_image pick the cheapest grid that covers longEdge (explained in planNote); a later full-grid pass defaults to 3. Ignored when regions are given. | |
| image | Yes | The image to cut: the original photo for the first pass, or the previous stitch_tiles result for a refinement pass. File path, gemini-media:// URI or data: URI. | |
| model | No | Image model the tiles will be edited with (default: the server's default image model; a refinement pass defaults to the model of the pass before). Sets the supported aspect ratios and the cost estimate. | |
| padding | No | Context added around each cell or region, as a fraction of its size (default 0.2, 0.05-0.5). Tiles then grow to the nearest aspect ratio the model supports. | |
| regions | No | Refinement pass: up to 12 areas to re-render (faces, hands, text, materials), as fractions of the image. Omit for a full grid. | |
| longEdge | No | Long edge in pixels of the image stitch_tiles will produce (default 8192, 1024-16384, at most 70 megapixels). First pass only; later passes keep their input's size. | |
| original | No | First pass only: the untouched original, sent with every tile as context (as a copy of at most 2048 px). Defaults to image. Refinement passes edit crops alone and keep the first pass's original, so it is ignored there. | |
| imageSize | No | Size the tiles will be edited at (1K, 2K or 4K, as the model supports). Omit it on a first pass to pick it with the grid; otherwise it defaults to the model's largest size. | |
| outputName | No | Optional base name for the crops and the stitched result. Defaults to the original's name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | Yes | Pass it to stitch_tiles | |
| cost | Yes | Estimated cost of editing every tile once (tile_image itself is free) | |
| grid | No | Grid size used (grid mode): 1 is the whole image as one tile | |
| mode | Yes | grid or regions | |
| next | Yes | ||
| pass | Yes | ||
| image | Yes | Size of the tiled image | |
| model | Yes | ||
| tiles | Yes | ||
| output | Yes | Size stitch_tiles will produce | |
| prompt | Yes | Base edit_image prompt for every tile of this pass: it keeps each crop's framing. The gemini-upscale skill adds clauses for skin, eyes, hair, text and other materials. | |
| planNote | No | Why this grid and imageSize were chosen, when picked automatically | |
| warnings | No | ||
| imageSize | Yes | ||
| reference | No | First pass only: a copy of the original (at most 2048 px) to pass as edit_image referenceImages for every tile. Refinement passes edit each crop alone. | |
| nativeLongEdge | No | About how many pixels of model-rendered detail the output's long edge carries if every tile comes back at imageSize, at most the output's long edge; below it the rest is interpolated |