GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone
rreAPI Docs

MiniMax H3 Image

Generate and edit images with MiniMax H3 Image using reference images, custom sizing and token-based billing.

MiniMax H3 Image creates images from prompts and edits them with ordered references. See the model page for current token rates and the playground.

Quick example

curl https://reapi.ai/api/v1/images/generations \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"minimax-h3-image","prompt":"A white ceramic teapot on pale linen","area":"1K","aspect_ratio":"1:1","n":1}'
import requests
response = requests.post(
    "https://reapi.ai/api/v1/images/generations",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"model": "minimax-h3-image", "prompt": "A white ceramic teapot on pale linen", "area": "1K", "aspect_ratio": "1:1", "n": 1},
    timeout=60,
)
response.raise_for_status()
task_id = response.json()["id"]
const response = await fetch('https://reapi.ai/api/v1/images/generations', {
  method: 'POST',
  headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ model: 'minimax-h3-image', prompt: 'A white ceramic teapot on pale linen', area: '1K', aspect_ratio: '1:1', n: 1 }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { id: taskId } = await response.json();
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "strings"
    "time"
)

func main() {
    body := strings.NewReader(`{"model":"minimax-h3-image","prompt":"A white ceramic teapot on pale linen","area":"1K","aspect_ratio":"1:1","n":1}`)
    req, err := http.NewRequest("POST", "https://reapi.ai/api/v1/images/generations", body)
    if err != nil { panic(err) }
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")
    client := &http.Client{Timeout: 60 * time.Second}
    res, err := client.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()
    if res.StatusCode != http.StatusOK { panic(res.Status) }
    var task struct { ID string `json:"id"` }
    if err := json.NewDecoder(res.Body).Decode(&task); err != nil { panic(err) }
    fmt.Println(task.ID)
}

Endpoint

POST https://reapi.ai/api/v1/images/generations

Send Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. The response contains a task id and status: "processing". Poll GET https://reapi.ai/api/v1/tasks/TASK_ID with the same key until completion or failure. Each new POST creates a separate generation. If a submission is ambiguous, check the existing task rather than automatically resubmitting.

Parameters

ParameterDocumented behavior
modelminimax-h3-image; required
promptRequired; 1–32000 Unicode characters after trimming
imagesOptional array of 1–16 { "image_url": "https://…" } objects
disable_prompt_enhancedBoolean, default false. True requires explicit framing and is for generation only; edits always enhance the prompt
nInteger 1–10, default 1
sizeauto or WIDTHxHEIGHT, 655360–20000000 total pixels, aspect ratio 1:3–3:1
aspect_ratioauto or X:Y; integer sides 1–300, ratio 1:3–3:1
area1K, 2K or 4K (default). These are area targets, not a fixed edge length
output_formatjpeg (default), jpg or png
output_compressionInteger 0–100, default 95
aigc_watermarkBoolean, default false
response_formaturl; output is delivered through an asynchronous task
streamfalse; this endpoint uses polling

When supplying a pixel size, omit area and aspect_ratio. To disable prompt enhancement, supply a pixel size or a non-auto aspect ratio. Omitted fields use the model service's defaults. Model-specific fields, including extensions, are forwarded for the service to interpret; acceptance alone does not establish that an extension changes the generated image.

Reference editing

Use the same endpoint with an ordered list of public HTTP(S) image URLs:

{
  "model": "minimax-h3-image",
  "prompt": "Keep the subject in <Picture 1> and replace the background with muted teal.",
  "images": [{ "image_url": "https://YOUR_PUBLIC_HOST/reference.jpg" }],
  "size": "1024x1024",
  "output_format": "png"
}

Base64 and data URLs are rejected. Documented reference formats are JPEG, PNG, WebP, HEIC and HEIF; the limit is 64 MiB per image, 128–8192 pixels per side and no more than a 4:1 aspect ratio. References guide the model; there is no mask input or guarantee of pixel-perfect preservation.

Pricing dimensions

Billing separately measures text-input, image-input and image-output tokens. Prompt enhancement and reference images can increase input consumption; output choices affect generated-image tokens. The model has no fixed per-image charge. See current rates.

An estimate is reserved at submission. Completion settles reported usage using the rates fixed when the request was admitted. Any unused reservation is returned; usage above the estimate is charged from the available balance. Failed tasks release their reservation.

Bill formula

Let each rate below be the current USD price per million tokens for that meter:

amount_usd = ceil(
  text_input_tokens * text_input_rate
  + image_input_tokens * image_input_rate
  + image_output_tokens * image_output_rate
) / 1_000_000
credits = amount_usd * 1_000

The combined charge is rounded upward once to a micro-dollar. Credits can therefore be fractional; the submission estimate is not the final charge.

Output schema

A completed task includes output.image_urls. Optional output.image_details entries match the image order and can include the model's revised_prompt and returned size:

{
  "id": "TASK_ID",
  "status": "completed",
  "output": {
    "image_urls": ["https://YOUR_OUTPUT_HOST/image.png"],
    "image_details": [{
      "url": "https://YOUR_OUTPUT_HOST/image.png",
      "revised_prompt": "Expanded visual instruction",
      "size": "1024x1024"
    }]
  }
}

Optional fields are omitted when the service does not report them. Missing or inconsistent token usage keeps the existing task polling until reliable usage arrives or the task times out; it does not submit another generation.

Errors

Errors use { "error": { "code": 10001, "message": "…", "request_id": "…" } }. See the error catalog for the full code list.

CodeConditionBehavior
10001–10004Missing, invalid or revoked API keyHTTP 401; no generation submitted
30001Insufficient balanceHTTP 402; rejected before generation
20001–20004Invalid request or media URLHTTP 400; check the message
Task errorContent policy or generation failureTask fails and its reservation is released

Tips

  • State what should remain unchanged as clearly as what should change.
  • Use either explicit pixel dimensions or area plus aspect ratio.
  • JPEG compression 0 is accepted but produces severe quality loss; the default is 95.
  • PNG does not provide transparent-background generation or masked editing.
  • Compare results on your own prompts before choosing between the two variants.

Table of Contents