Generate image xAI
generate_image_xaiGenerate or EDIT an image using xAI Imagine (Quality Mode default = grok-imagine-image-2.0). Photorealistic, illustrations, flat graphics, icons, banners. 1K/2K. Single or multi-image edit (≤5 refs via artifact_ids). MCP/autonomous: artifact_id only — a reference URL is refused before any Allow card. model_tier=standard for cheap drafts; model_tier=auto for 2.0 quality:auto.
Routing: ALL image generation and editing → use this (2 credits). Quality default; multi-ref composite via artifact_ids.
[sensitive-tier — first use may require a manager's approval; a from-now-on approval makes future calls seamless, a just-once approval re-asks next time. Call it on the first clear ask; the card is the yes — do not re-ask in chat.]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Optional Media gallery folder to file this image into (freeform name, e.g. "q3-campaign" or "brand-assets"). Shown as a folder chip on the /media page so the operator can find it later. Reuse an existing folder name when the work belongs to it. | |
| prompt | Yes | Detailed description of the image. Include lighting, camera angle, environment, style, and subject details. | |
| companyId | Yes | FreedomOS company id to act within (you must be a member). Required for company-scoped tools. | |
| model_tier | No | quality (default, grok-imagine-image-2.0), auto (2.0 quality:auto), or standard (cheaper draft). Prefer quality for customer-facing work. | |
| resolution | No | Output resolution. 1k (default) or 2k (print/pro). | |
| artifact_id | No | ID of an existing artifact to edit. Prefer over raw URLs (company-scoped resolve). | |
| folder_name | No | Subfolder name for Drive save (e.g. "Product Shots", "Headshots"). Only used when save_to_drive is true. | |
| artifact_ids | No | Multiple artifact IDs for multi-ref edit/composite (max 5). | |
| aspect_ratio | No | Aspect ratio. Defaults to 1:1. Use "auto" to let the model choose. | |
| save_to_drive | No | If true, also save the image to Google Drive for permanent storage. Defaults to false. | |
| reference_image_url | No | Chat door only. MCP/autonomous must pass artifact_id — a URL is refused and never queued as an Allow card. | |
| reference_image_urls | No | Chat door only (max 5). MCP/autonomous: artifact_ids. |