WidemileDocs
ToolsWorkflowsChangelogGitHub
  • Introduction
  • Getting started
  • CLI (wm)
  • Configuration
  • Tool index
  • Generate imagestudio_generate_image
  • Generate videostudio_generate_video
generationstableimagetextreference

Generate image

studio_generate_image

Text-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

NameTypeDefaultDescription
promptrequiredstring—Text prompt.
modelstring"vertex-ai/gemini-3-pro-image"Provider/model id (see /docs/configuration#models).
image_urlstring—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_promptstring—Optional negative prompt.
num_imagesnumber1Batch size (model-dependent ceiling).
seednumber—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"]
  }
}

Performance

Most calls return synchronously in 5–25s. For batches >2 the response is async and clients should poll the returned job_id.

Related tools

studio_expand_image
Outpaint an image in any direction.
studio_camera_angles
Generate a shot from a reference image with an explicit cinematic camera descriptor.
← All toolsView handler
On this page
  • Overview
  • Quick start
  • Parameters
  • Examples
  • Performance
  • Related tools
Widemile MCP — v2.0.0
Docs home