var2_create_image
Create a STILL IMAGE from a text prompt — "make/generate/draw an image of X", variations of an image — or edit one (type=image-to-image + image_url; image_refs[] locks character/style). A storyboard / N frames / N panels / comic strip with a consistent character = still IMAGES, one call per frame, not a video. Use var2_list_models for the complete current model list and supported settings; do not infer model availability from examples. Upscale/"sharper" → var2_modify_image; animate → var2_create_video; 3D → var2_create_3d.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Default text-to-image. grok-imagine-image-2 only: segment-map (FREE — splits image_url into named segments, returns segment_map_id + segments[{index,name,mask_url}]; prompt is ignored) then segment-edit (segment_map_id + mask_indexes + prompt — redraws only those segments). | |
| model | No | Default gpt-image-2. | |
| prompt | Yes | ||
| image_url | No | Required for type=image-to-image. Storage URL, var2 share link (www.var2.ai/image/<id> — auto-resolved), or any public https URL. | |
| image_refs | No | Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5, grok-imagine-image-2, seedream-5-pro); ignored by others. | |
| resolution | No | Output size of the NEW generation — does not upscale an existing image (that is var2_modify_image). seedream-5-pro: 1K or 2K (default 2K). | |
| webhook_url | No | Optional. https:// URL var2 POSTs a signed delivery to when the asset is ready (or fails). Signature header: X-VAR2-Signature: t=<unix>, v1=<hex(hmac_sha256(webhook_secret, t + "." + body))>. Retried with exponential backoff (8 attempts over ~4 days). | |
| aspect_ratio | No | ||
| mask_indexes | No | type=segment-edit: segment index values (from segments[].index) to redraw. | |
| segment_map_id | No | type=segment-edit: the segment_map_id returned by type=segment-map. | |
| idempotency_key | No | Optional. Retries with the same key never double-bill (dedupes on ai_jobs.request_id). Use a stable per-user-action value (e.g. a UUID). |