Skip to Content
The Makinari API repo now includes an MCP Server — connect your AI models directly. View on GitHub →
MCP ServerToolsGenerate ImagePOST

Generate Image

Generate images using AI with automatic provider fallback. Supports multiple AI providers (Gemini, Azure, Vercel) with automatic fallback if one fails. Images are automatically saved to storage and can be used in conversations or content.

Input Schema

ParameterTypeDescription
promptstringDetailed text description of the image to generate. Be specific about style, colors, composition, and any important details.
providerstringAI provider to use for generation. Only Gemini is currently supported.
sizestringSize of the generated image. Defaults to 1024x1024 for best quality. Enum: 256x256, 512x512, 1024x1024
nnumberNumber of images to generate. Defaults to 1.
qualitystringQuality of the generated image. HD quality is higher resolution but may take longer. Defaults to standard. Enum: standard, hd
ratiostringAspect ratio of the generated image. Defaults to 1:1 (square). Enum: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3
reference_imagesarrayArray of image URLs to use as reference/context for generation. Images will be converted to base64 and sent as context to the AI model.

REST Endpoint

POST /api/agents/tools/generateImage
POST /api/agents/tools/generateImage Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "prompt": "A minimalist logo for a tech startup, flat design, blue and white palette", "size": "1024x1024", "quality": "standard", "ratio": "1:1" }

Response:

{ "success": true, "images": [ { "url": "https://...", "width": 1024, "height": 1024 } ] }
Last updated on