MiniMax Image Generation

MiniMax image-01 / image-01-live via OpenAI-compatible POST /v1/images/generations.


1. Endpoint

  • HTTP Method: POST
  • Request Path: https://llm.artsapi.ai/v1/images/generations
  • Authorization: Authorization: Bearer sk-your_token

A. Text-to-Image

curl -X POST https://llm.artsapi.ai/v1/images/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "image-01",
    "prompt": "A man in a white t-shirt, full-body, Venice Beach sign background, 90s documentary fashion, film grain",
    "ratio": "16:9",
    "n": 2,
    "prompt_optimizer": true,
    "response_format": "url"
  }'

B. Image-to-Image / Single Subject Reference

curl -X POST https://llm.artsapi.ai/v1/images/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "image-01",
    "prompt": "Keep the character identity, looking out from a library window, cinematic light",
    "image_urls": ["https://example.com/assets/character_face.jpg"],
    "ratio": "16:9",
    "n": 1
  }'

C. Multi-Image Subject Reference

curl -X POST https://llm.artsapi.ai/v1/images/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "image-01",
    "prompt": "Match character from image 1 and street mood from image 2, cinematic tracking shot",
    "image_urls": [
      "https://example.com/character_face.jpg",
      "https://example.com/street_scene.jpg"
    ],
    "ratio": "16:9",
    "n": 2
  }'

Or use multiple subject_reference entries:

curl -X POST https://llm.artsapi.ai/v1/images/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "image-01",
    "prompt": "Two characters from references talking indoors, warm light",
    "subject_reference": [
      { "type": "character", "image_file": "https://example.com/person_a.jpg" },
      { "type": "character", "image_file": "https://example.com/person_b.jpg" }
    ],
    "aspect_ratio": "16:9",
    "n": 1
  }'

D. image-01-live Style Control

curl -X POST https://llm.artsapi.ai/v1/images/generations \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "image-01-live",
    "prompt": "Girl profile in spring park, soft daylight",
    "style": { "style_type": "watercolor", "style_weight": 0.8 },
    "ratio": "3:4",
    "n": 1
  }'

2. Request Parameters

ParameterTypeRequiredDefaultDescription
modelstringYes-image-01 or image-01-live.
promptstringYes-Image description (~1500 chars).
ratio / aspect_ratiostringNo1:1Aspect ratio; 21:9 only for image-01.
image / image_urlsstring / arrayNo-Subject reference image(s).
subject_referencearrayNo-{type:"character", image_file} per entry.
styleobjectNo-image-01-live only.
nintegerNo1Count [1, 9].
prompt_optimizerbooleanNofalseAuto-optimize prompt.
response_formatstringNourlurl or b64_json.

3. Response Example (200 OK)

{
  "created": 1719441600,
  "data": [
    { "url": "https://example.com/output/img_minimax_1.png" },
    { "url": "https://example.com/output/img_minimax_2.png" }
  ]
}

5. Common Error Codes & Troubleshooting

HTTP codes, error body format, and troubleshooting are maintained in one dedicated page (not duplicated under each example).

👉 Gateway Error Codes & Troubleshooting

Quick reference:

CodeMeaning
402Insufficient balance (not 429)
400Bad request / content or copyright filter
429RPS/RPM limits or in-flight task cap (low balance)
403Token / IP / model permission (balance → 402; content filter → 400)
200 + status: failedAsync video/long-task business failure on poll

HTTP status matches call log status_code for traceability by log_id.

Maintenance: update the error-codes article only; this appendix links to it.

Raw Markdown (.md) · llms.txt