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.
| Objective | Recommended Model Family | Entry |
|---|---|---|
| text-to-image, Photo Editor | gpt-image-* | /v1/images/* |
| Seedream Image Generation | doubao-seedream-* | /v1/images/generations |
| Asynchronous text-to-image and image-to-image | seedream-5.0, seedream-4.5, wan2.7-image-pro | /v1/images/generations/async |
| Gemini Image Generation | gemini-*-image-preview, nano-banana-* | /v1beta/models/{model}:generateContent |
| Grok Imagine Image Generation | grok-imagine-* | /v1/images/generations |
| Posters, packaging, layout, graphic description | ideogram-* | /ideogram/* |
| Imagine, mixed, magnified, variant and action task | mj-* | /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
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
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
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
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:
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:
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:
| Methodology | Path | Purpose |
|---|---|---|
POST | /ideogram/generate | text-to-image |
POST | /ideogram/remix | Mixed Chart |
POST | /ideogram/upscale | Zoom in to the HD. |
POST | /ideogram/describe | Picture Description |
Midjourney task
Submit Imagine task:
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:
curl https://moonnexai.com/mj/task/task_xxx/fetch \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Common path:
| Methodology | Path | Purpose |
|---|---|---|
POST | /mj/submit/imagine | Submit Imagine task |
POST | /mj/submit/action | Submit action task |
POST | /mj/submit/blend | Submit mixed figure task |
POST | /mj/submit/describe | Submit Description task |
POST | /mj/submit/video | Submit a video task |
GET | /mj/task/{id}/fetch | Query task |
POST | /mj/task/list-by-condition | Query 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.