generate_image_xai
Generate or EDIT an image using xAI Imagine. Handles ALL image styles: photorealistic, illustrations, flat graphics, icons, banners, concept art. Supports 2K resolution. Provide reference_image_url or artifact_id to EDIT an existing image. Routing: ALL image generation and editing → use this (2 c...
This record as markdown: /tools/com-getfreedomos-freedom-mcp/generate-image-xai.md
What generate_image_xai does on Freedom Mcp
AI agents invoke generate_image_xai to trigger actions in Freedom Mcp. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder | string | — | 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 op |
prompt | string | Yes | Detailed description of the photorealistic image. Include lighting, camera angle, environment, style, and subject details. |
companyId | string | Yes | FreedomOS company id to act within (you must be a member). Required for company-scoped tools. |
resolution | string | — | Output resolution. 1k (default, web quality) or 2k (professional print quality). |
artifact_id | string | — | ID of an existing artifact from the MEDIA IN THIS CONVERSATION block. The system will automatically resolve a fresh signed URL from storage. Use this when refer |
folder_name | string | — | Subfolder name for Drive save (e.g. "Product Shots", "Headshots"). Only used when save_to_drive is true. |
aspect_ratio | string | — | Aspect ratio. Defaults to 1:1. Use "auto" to let the model choose. |
save_to_drive | boolean | — | If true, also save the image to Google Drive for permanent storage. Defaults to false. |
reference_image_url | string | — | URL of an existing image to EDIT (instead of generating from scratch). Use a signed URL from the MEDIA IN THIS CONVERSATION block. When provided, the prompt des |
Parameters from the server's own tool schema.
Why generate_image_xai is rated High
Triggers external AI image generation/editing service, consuming credits and producing external effects.
From the tool's definition Generate or EDIT an image using xAI Imagine
Risk signalsAccepts file system path (folder)
Attacks that exploit this kind of access
The rule that runs generate_image_xai safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Freedom Mcp, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For generate_image_xai, this is the rule to start with:
generate_image_xai stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Freedom Mcp, apply this rule, and every generate_image_xai call is checked against it from then on.
Questions about generate_image_xai
Generate or EDIT an image using xAI Imagine. Handles ALL image styles: photorealistic, illustrations, flat graphics, icons, banners, concept art. Supports 2K resolution. Provide reference_image_url or artifact_id to EDIT an existing image. Routing: ALL image generation and editing → use this (2 credits). Handles photorealistic, illustrations, flat graphics, icons, banners. [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.]. It is categorised as a Execute tool in the Freedom Mcp MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
generate_image_xai accepts 9 parameters: folder, prompt, companyId, resolution, artifact_id, folder_name, aspect_ratio, save_to_drive, reference_image_url. Required: prompt, companyId. The full parameter table on this page comes from the server's own tool schema.
Register the Freedom MCP server in PolicyLayer and add a rule for generate_image_xai: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Freedom Mcp. Nothing to install.
generate_image_xai is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the generate_image_xai rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for generate_image_xai. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
generate_image_xai is provided by the Freedom MCP server (https://twuluxmoognlwtmaoqgo.supabase.co/functions/v1/freedom-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Freedom, and thousands of servers like it.
Across the catalogue