TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/anil-matcha/open-generative-ai/llms.txt
Use this file to discover all available pages before exploring further.
generateImage and generateI2I functions are the core of Open Generative AI’s image pipeline. Both functions follow the Muapi.ai submit-and-poll pattern internally — you call them with your API key and a params object, and receive a resolved URL when generation completes. generateImage is used for text-to-image and basic image-conditioned generation; generateI2I handles models that accept reference images as primary input, including multi-image models.
generateImage(apiKey, params)
Generates an image from a text prompt using any of the 50+ text-to-image models. When image_url is provided, the model applies image conditioning (strength-based). When images_list is provided, all reference images are forwarded in a single request.
Your Muapi.ai API key. Passed as the
x-api-key header.Model ID. Examples:
flux-schnell, nano-banana-pro, midjourney-v7, seedream-5, gpt-4o-image. The model ID maps to the API endpoint via the internal model registry.Text prompt describing the image to generate.
Output aspect ratio. Common values:
1:1, 16:9, 9:16, 4:3, 3:4. Supported values depend on the model.Output resolution. Values like
1K, 2K, 4K — only applicable to models that support explicit resolution control (e.g., Nano Banana 2, Seedream 5.0).Quality preset. Values:
basic, high. Supported by models like Seedream 5.0.URL of a reference image for image-conditioned generation. When set,
strength is also forwarded.Array of reference image URLs for multi-image models. Used instead of
image_url when multiple references are needed.Denoising strength for image-conditioned generation. Range:
0.0–1.0. Defaults to 0.6 when image_url is set.Seed for reproducible generation. Pass
-1 or omit for a random seed.Optional callback invoked immediately after submission with the
request_id. Useful for tracking or cancellation.Promise<{ url: string, outputs: string[], status: string, request_id: string }>
The url field is the primary output image URL, normalized from outputs[0] if needed.
generateI2I(apiKey, params)
Generates an image using an image-to-image model. These models take reference images as primary input and optionally accept a prompt. Supports multi-image models where up to 14 reference images can be submitted in one request.
generateI2I uses the i2i model registry internally. Use this function (not generateImage) when working with dedicated image-editing models like Nano Banana 2 Edit, Flux Kontext, GPT-4o Edit, or Seededit.Your Muapi.ai API key.
Image-to-image model ID. Examples:
nano-banana-2-edit, flux-kontext-dev, gpt-4o-edit, seededit-v3.Optional guidance prompt. Many i2i models work without a prompt.
URL of a single reference image. Used when the model accepts one image.
Array of reference image URLs. Used for multi-image models. The array is sent in the order provided — models process images in submission order.
Secondary image URL for face-swap or composite models that have a dedicated swap field.
Output aspect ratio (model-dependent).
Output resolution (model-dependent).
Quality preset (model-dependent).
Name value for models that define a
name input field in their model info. Falls back to the model’s default name if not provided.Optional callback with the
request_id after submission.Promise<{ url: string, outputs: string[], status: string }>
Multi-Image Models Reference
| Model | Max Images |
|---|---|
| Nano Banana 2 Edit | 14 |
| Nano Banana Edit | 10 |
| Flux Kontext Dev I2I | 10 |
| Kling O1 Edit Image | 10 |
| GPT-4o Edit / GPT Image 1.5 Edit | 10 |
| Bytedance Seedream Edit v4 / v4.5 | 10 |
| Flux 2 Flex/Pro Edit | 8 |
| Nano Banana Pro Edit | 8 |
| Vidu Q2 Reference to Image | 7 |
| GPT-4o Image to Image | 5 |
| Flux 2 Klein 4b/9b Edit | 4 |
| Qwen Image Edit Plus / 2511 | 3 |
| Wan 2.5/2.6 Image Edit | 2–3 |
| Flux Kontext Pro/Max I2I | 2 |
