generationstableimagetextreference
Generate image
studio_generate_imageText-to-image and image-to-image generation across the full Widemile model catalogue.
Overview
Creates an image from a text prompt, optionally guided by a single reference image. Routes to the correct Widemile image backend for the requested model. Director MCP locks image generation to Vertex-backed Nano Banana Pro at 2K, using the same model for reference-guided images. Returns a hosted URL on the Widemile asset CDN. If `image_url` is provided it MUST be a real URL the user gave you — never fabricate one; omit it for pure text-to-image. Every successful response includes `creditsRemaining`.
Auth
oauth-jwt
Returns
{ imageUrl, images?, generationId, requestId, creditsCharged, creditsRemaining, lowCreditsWarning? } — or `{ jobId, status }` when queued.
Web client
src/app/[locale]/dashboard/creative-studio/pro-studio/images/page-client.tsx
MCP handler
https://github.com/PrincipeRosso/wmstudio-director-mcp/blob/main/src/mcp/tools/director-tools.ts
Quick start
Invoke the tool over Streamable HTTP at {MCP_BASE_URL}/mcp/. The request below assumes you already minted an MCP JWT via the OAuth flow.
{
"name": "studio_generate_image",
"arguments": {
"prompt": "<prompt>"
}
}Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| promptrequired | string | — | Text prompt. |
| model | string | "vertex-ai/gemini-3-pro-image" | Provider/model id (see /docs/configuration#models). |
| image_url | string | — | Optional reference image for img2img variants. Fabricated URLs are rejected by HEAD preflight. |
| aspect_ratio | "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | — | Target aspect ratio. |
| negative_prompt | string | — | Optional negative prompt. |
| num_images | number | 1 | Batch size (model-dependent ceiling). |
| seed | number | — | Optional deterministic seed. |
Examples
Text-to-image
json
{
"name": "studio_generate_image",
"arguments": {
"prompt": "minimalist product photo of a black ceramic mug, soft daylight",
"model": "vertex-ai/gemini-3-pro-image",
"aspect_ratio": "4:3",
"num_images": 2
}
}Image-to-image (reference)
json
{
"name": "studio_generate_image",
"arguments": {
"prompt": "same mug, golden hour rooftop scene",
"model": "vertex-ai/gemini-3-pro-image",
"reference_images": ["https://cdn.wm.studio/uploads/mug.png"]
}
}