WM StudioDocs
ToolsWorkflowsChangelogGitHub
  • Introduction
  • Getting started
  • 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 WM Studio model catalogue.

Overview

Creates one or more images from a text prompt, optionally guided by reference images. Routes to the correct provider for the requested model (OpenAI GPT Image 2, Flux 2 Pro, Nano Banana Pro, Recraft, Gemini, …). Returns hosted URLs on the WM Studio asset CDN.

Auth
oauth-jwt
Returns
{ job_id, status, images?: [{ url, width, height, seed }] }
Web client
src/app/[locale]/dashboard/creative-studio/images/images-page-client.tsx
MCP handler
mcp-director/src/tools/studio.py

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"openai/gpt-image-2"Provider/model id (see /docs/configuration#models).
reference_imagesstring[]—Public URLs of reference images.
aspect_ratio"1:1" | "16:9" | "9:16" | "4:3" | "3:4""1:1"Target aspect ratio.
num_imagesnumber1Batch size (1–4).
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": "fal-ai/flux-2-pro",
    "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": "fal-ai/nano-banana-pro",
    "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_upscale_image
Increase resolution and detail on an existing image.
studio_expand_image
Outpaint an image in any direction.
studio_camera_angles
Upload an image and generate 9 classic camera angles in one batch.
← All toolsView handler
On this page
  • Overview
  • Quick start
  • Parameters
  • Examples
  • Performance
  • Related tools
WM Studio MCP — v2.0.0
Docs home