Skip to content

Picture Generation Guide ​

Select public MoonNexAI image models by capability: gpt-image-* for general generation and edits; doubao-seedream-* for Seedream generation; seedream-5.0, seedream-4.5 and wan2.7-image-pro for asynchronous image tasks; gemini-*-image-preview and nano-banana-* for Gemini-compatible images; grok-imagine-* for Grok Imagine; ideogram-* for posters and typography; and mj-* for Midjourney-compatible asynchronous tasks.

First, the model family. ​

ObjectiveRecommended Model FamilyEntry
text-to-image, Photo Editorgpt-image-*/v1/images/*
Seedream Image Generationdoubao-seedream-*/v1/images/generations
Asynchronous text-to-image and image-to-imageseedream-5.0, seedream-4.5, wan2.7-image-pro/v1/images/generations/async
Gemini Image Generationgemini-*-image-preview, nano-banana-*/v1beta/models/{model}:generateContent
Grok Imagine Image Generationgrok-imagine-*/v1/images/generations
Posters, packaging, layout, graphic descriptionideogram-*/ideogram/*
Imagine, mixed, magnified, variant and action taskmj-*/mj/submit/*

Use the Images API for GPT Image models. Do not send gpt-image-* image-generation requests to /v1/chat/completions. Keep chat and image-generation wrappers separate so their fields, responses and timeout policies are not mixed.

GPT Image Generation ​

bash
curl https://moonnexai.com/v1/images/generations \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A clean product mockup on a white studio table.",
    "size": "1024x1024",
    "n": 1
  }'

GPT Image Editor ​

bash
curl https://moonnexai.com/v1/images/edits \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -F "image=@./product.png" \
  -F "model=gpt-image-2-pro" \
  -F "prompt=Change the background to a clean studio scene." \
  -F "size=1024x1024"

GPT Image Variant ​

bash
curl https://moonnexai.com/v1/images/variations \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -F "image=@./product.png" \
  -F "model=gpt-image-2" \
  -F "n=2"

Seedream / Wan asynchronous picture ​

bash
curl https://moonnexai.com/v1/images/generations/async \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5.0",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "text": "A clean product hero image for a premium ceramic coffee cup."
            }
          ]
        }
      ]
    },
    "parameters": {
      "size": "2048x2048",
      "n": 1
    }
  }'

Ideogram ​

text-to-image:

bash
curl https://moonnexai.com/ideogram/generate \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A premium coffee cup package design, clean background.",
    "aspect_ratio": "1:1"
  }'

Image description:

bash
curl https://moonnexai.com/ideogram/describe \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/input.png"
  }'

Common path:

MethodologyPathPurpose
POST/ideogram/generatetext-to-image
POST/ideogram/remixMixed Chart
POST/ideogram/upscaleZoom in to the HD.
POST/ideogram/describePicture Description

Midjourney task ​

Submit Imagine task:

bash
curl https://moonnexai.com/mj/submit/imagine \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A futuristic city at sunrise --ar 16:9",
    "notifyHook": "https://example.com/moonnexai/webhook"
  }'

Query task:

bash
curl https://moonnexai.com/mj/task/task_xxx/fetch \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

Common path:

MethodologyPathPurpose
POST/mj/submit/imagineSubmit Imagine task
POST/mj/submit/actionSubmit action task
POST/mj/submit/blendSubmit mixed figure task
POST/mj/submit/describeSubmit Description task
POST/mj/submit/videoSubmit a video task
GET/mj/task/{id}/fetchQuery task
POST/mj/task/list-by-conditionQuery tasks in batches

Use recommendations ​

  • Image generation programt recommends that you include the subject, image style, use and size.
  • Make sure the picture is clear before uploading it, and the subject is not covered.
  • asynchronous tasks saves task IDs, while supporting callback and active queries.
  • The batch generation records the operational use of each picture, facilitating follow-up and reuse.

See the API Reference for additional fields and response structures.