grok_segment_map
Need to edit specific objects in a Grok Imagine Image 2.0 generation? Segment it into named regions with mask URLs for targeted edits.
Instructions
FREE (0 credits). Segment a Grok Imagine Image 2.0 generation into NAMED regions for targeted editing. Returns each region's index, semantic name (e.g. "red apple", "wooden table"), and mask PNG URL. Workflow: generate_image model="grok-imagine-image-2-0/text-to-image" → grok_segment_map (this, free) → grok_image_edit with the mask_indexs you want changed. Only works on task_ids from a Grok Image 2.0 generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task ID from a completed generate_image call with model grok-imagine-image-2-0/text-to-image |