MiniH3
EnglishImage

Image editing

中文

POSThttps://api.minih3.dev/v1/images/edits

This call is billed to your account. Price: GPT Image 2.5: $0.0274 per image, same as generation

Purpose: send an image plus a text description and get the image edited to match, compatible with the OpenAI Images API edits endpoint. The public image model is gpt-image-2.5. Good for changing style, background or weather, or adjusting a reference before handing it to H3.
Billing: per image returned, $0.0274 each, same as generation; a failed request is not charged.
Usage: either of two forms. (1) multipart/form-data with model, prompt and image (the image file). (2) JSON (Content-Type: application/json) with image links: images: [{"image_url": "https://…"}], one or more; image_url may also be a data:image/png;base64,… URL. Plain strings are accepted in JSON too, images: ["https://…"] or image: "https://…", and are turned into the form above. Only http(s) and data: URLs are accepted; anything else returns 400 invalid_image. The response has the same shape as image generation (data[].b64_json). One image usually takes 30–60 seconds.
Notes: requests queue when the service is busy; if the queue is full you get 429 (upstream_busy, with Retry-After). Retry later; nothing is charged. If the prompt or the image does not pass the content safety check you get 400 content_policy; change the prompt or the image and try again. Nothing is charged.

Parameters

NameInTypeRequiredDescription
modelbodystringyes-
promptbodystringyes-
nbodyintegerno-
imagebodystring | array<string>no

One URL string or a list of them, same as giving them in images

imagesbodyarray<object | string>no

The images to edit. The image field works instead

Code samples

curl -X POST "https://api.minih3.dev/v1/images/edits" \
  -H "Authorization: Bearer $MINIH3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2.5",
  "prompt": "Turn this into a rainy neon night scene",
  "images": [
    {
      "image_url": "https://example.com/street.jpg"
    }
  ]
}'

Try it

Kept in this browser tab only (sessionStorage) and sent straight to api.minih3.dev; it never reaches this site.

Enter your key to send.

Responses

200

An OpenAI-style image result (data[].b64_json)

400

Bad request; a malformed image link is invalid_image; a request blocked by the content safety check is content_policy (not charged)

{
  "error": {
    "code": "content_policy",
    "message": "The image request was blocked by the content safety check. Change the prompt or the image and try again. You were not charged. / 图片请求没有通过内容安全检查,请修改提示词或图片后重试,本次不扣费。 (request id: 20261104…)",
    "type": "new_api_error"
  }
}

401

Error

403

Error

429

Error