For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image Generation

Use these models to generate whatever images you can (or can't!) imagine.

Models available

Models that generate images from a prompt, plus image-editing models (filter Image To Image).

Two billing shapes here: the Nano-Banana (Gemini image) models are priced per 1M tokens, input and output, while the rest are priced per image. The catalog shows which applies to a given model.

Model ids, current prices, context lengths and per-tier limits are in the console catalog, which is generated from the same records that bill your requests:

console.meganova.ai/serverless — filter by Text To Image

The same list is available programmatically from GET /v1/models, including pricing and capability flags.

Parameters

  • Prompt: The prompt to guide the model's generation.

  • Negative Prompt: A prompt to guide the model away from generating certain content.

  • Width, Height: The resolution of the output image.

  • Steps: Number of inference steps that the model will take. A higher number of steps typically leads to better quality but costs more.

  • Guidance Scale: A high value encourages the model adhere closely to the prompt, but may result in a lower image quality.

  • Seed: A number to seed the generation. Using the same value ensures reproducibility.

NOTE: For best results, ensure that the mask dimensions are the same as the image.

NOTE: For video generation models, see the dedicated Video Generation page.

Using the Models

Through Our Website UI

Our website UI is the easiest and fastest way to use our endpoints.

  1. Go to the MegaNova website.

  2. Log in, and ensure you have enough credits.

  3. Click on the "Inference Models" tab and select your model.

  4. Choose your parameters, enter your prompt (and image + mask if applicable) and just press Enter!

NOTE: We support JPG, JPEG, PNG, and WebP image formats.

Through API Endpoint

This option is to use our API endpoint directly in your projects. Below are some code snippets to get you started!

NOTE: Don't forget to use your API key. See Authentication for details on authentication and Create API Key for managing keys.

Using cURL

Text-to-Image Model

Image-to-Image Model

where "image" and "mask" are base64 encoded images.

Using Python

Text-to-Image Model

Image-to-Image Model

Using JavaScript

Text-to-Image Model

Image-to-Image Model

Selecting a Model

To specify the desired model, use this mapping for the model field:

Image Generation Models

  • Nano-Banana-Pro: gemini/gemini-3-pro-image

  • Nano-Banana-Pro-Edit: gemini/gemini-3-pro-image-edit

  • Nano-Banana-2: gemini/gemini-3.1-flash-image

  • Nano-Banana: gemini/gemini-2.5-flash-image

  • Nano-Banana-Edit: gemini/gemini-2.5-flash-image-edit

  • Bytedance-Seedream-5.0-Lite: Bytedance/seedream-5-0-lite-260128

  • Bytedance-Seedream-4.5: Bytedance/seedream-4-5-251128

  • Bytedance-Seedream-4.0: Bytedance/seedream-4-0-250828

  • Bytedance-Seedream-3.0: Bytedance/seedream-3-0-t2i-250415

  • Alibaba-Z-Image-Turbo: Alibaba/z-image-turbo

  • DreamShaper-8: Lykon/dreamshaper-8

Response Example

A successful response body will return the image in this format:

NOTE: You'll need to use an image b64 decoder to view the result. Just pass in the b64_json value to the decoder of your choice.

Feel free to explore refer to the API Reference for more details.

Last updated