Skip to content

Gemini Nano synchronous Call ​

Gemini Nano image models accept synchronous requests in Gemini-compatible format. Common models on the MoonNexAI pricing page include gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, nano-banana-2 and nano-banana-pro. Use a model ID returned by the console, pricing page or GET /v1/models. For long tasks, see Gemini Nano asynchronous requests.

Recommended entrance ​

http
POST /v1beta/models/{model}:generateContent
POST /v1beta/models/{modelName}:generateContent

Example request ​

bash
curl https://moonnexai.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "Generate a clean product mockup on a white studio table."
          }
        ]
      }
    ]
  }'

Common Models ​

ModelsRecommended use
gemini-3.1-flash-image-previewGemini image generation, suitable for speed priority image creation.
gemini-3-pro-image-previewGemini image generation, suitable for mass-priority image creation.
nano-banana-2Gemini Nano Image Generation, suitable for the Nano Banana series.
nano-banana-proGemini Nano image generation, suitable for a higher quality Nano Banana image creation.

Results-based processing ​

Gemini-compatible response usually uses candidates[].content.parts[] to return text or picture content. The business side should save the original request, model name and final picture URL or image content to facilitate retesting and tracking.

Relevant Pages ​