generate_image
Create AI-generated images from text prompts using VAP (Flux2 Pro) technology. Specify aspect ratios and quality settings for customized visual content generation.
Instructions
Generate an AI image from text prompt using VAP (Flux2 Pro). Returns a task ID for async tracking. Cost: $0.18
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Detailed description of the image to generate. Note: If aspect ratio is mentioned in the prompt (e.g., '16:9', 'widescreen', 'portrait'), also pass it in the aspect_ratio parameter for guaranteed correct dimensions. | |
| aspect_ratio | No | Output image aspect ratio. If the user mentions a specific ratio like '16:9' or 'widescreen' in their prompt, extract and pass it here explicitly for best results. | 1:1 |
| quality | No | Generation quality (high costs 1.5x) | standard |
Implementation Reference
- mcp/vap_mcp_proxy.py:191-218 (handler)Tool handler for MCP request routing; it routes 'generate_image' to the backend API via 'make_request'.
def handle_tools_call(params: Dict) -> Dict: """ Handle tools/call request. Directive #240: Special handlers for video tools. """ tool_name = params.get("name", "") arguments = params.get("arguments", {}) # ═══════════════════════════════════════════════════════════════════ # VIDEO TOOL HANDLERS (Directive #240) # ═══════════════════════════════════════════════════════════════════ if tool_name == "generate_video": return _handle_generate_video(arguments) if tool_name == "estimate_video_cost": return _handle_estimate_video_cost(arguments) if tool_name == "get_task": return _handle_get_task(arguments) # Default: forward to MCP API response = make_request("/tools/call", { "name": tool_name, "arguments": arguments }) return response