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

MAI-Image-2.7

Generate and edit images up to 2K with MAI-Image-2.7 using custom aspect ratios, exact pixel dimensions, and up to 5 reference images.

MAI-Image-2.7 generates high-resolution images from text prompts and performs multi-image reference editing up to 4.19 megapixels (2048×2048). See the model page for current token rates and the interactive playground.

Quick example

curl https://api.reapi.ai/v1/images/generations \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"mai-image-2.7","prompt":"A matte ivory ceramic pour-over kettle on pale slate, soft morning light","size":"1:1","resolution":"1K","n":1}'
import requests

response = requests.post(
    "https://api.reapi.ai/v1/images/generations",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "model": "mai-image-2.7",
        "prompt": "A matte ivory ceramic pour-over kettle on pale slate, soft morning light",
        "size": "1:1",
        "resolution": "1K",
        "n": 1,
    },
    timeout=60,
)
response.raise_for_status()
task_id = response.json()["id"]
const response = await fetch('https://api.reapi.ai/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'mai-image-2.7',
    prompt: 'A matte ivory ceramic pour-over kettle on pale slate, soft morning light',
    size: '1:1',
    resolution: '1K',
    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":"mai-image-2.7","prompt":"A matte ivory ceramic pour-over kettle on pale slate, soft morning light","size":"1:1","resolution":"1K","n":1}`)
    req, err := http.NewRequest("POST", "https://api.reapi.ai/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://api.reapi.ai/v1/images/generations

Send Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. An accepted request returns an asynchronous task id and status: "processing". Poll GET https://api.reapi.ai/v1/tasks/TASK_ID with the same key until the task reaches completed or failed. Each POST creates a separate generation. If a submission times out on the client, check your task list before resubmitting.

Parameters

ParameterTypeDefaultDocumented behavior
modelstring—Required. Set to "mai-image-2.7".
promptstring—Required. 1–20,000 Unicode characters after trimming.
ninteger1Number of images per request. Must be 1.
sizestring"1:1"Text-to-image only. Integer aspect ratio between 1:4 and 4:1 (1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 2:1, 1:2, 21:9, 9:21, 4:1, 1:4) or WIDTHxHEIGHT. auto is not supported.
resolutionstring"1K""1K" or "2K" (case-insensitive). Applies only when size is an aspect ratio. 4K is rejected.
widthinteger—Optional custom width in pixels (at least 768). Must be paired with height; overrides size and resolution for text-to-image.
heightinteger—Optional custom height in pixels (at least 768). Must be paired with width; width × height must be at most 4,194,304. Sides are rounded down to multiples of 32.
image_urlsstring[]—Optional array of 1–5 public HTTP(S) reference image URLs without embedded credentials (JPEG, PNG, WebP, or GIF; base64 data URIs are rejected).
backgroundstring"auto""auto" or "opaque". Transparent backgrounds are not supported.

Reference image editing

Pass 1–5 public HTTP(S) URLs in image_urls for single-image editing or multi-image composition. When image_urls is supplied, the model derives output dimensions from the reference images; size, resolution, width, and height do not control image-to-image output dimensions.

{
  "model": "mai-image-2.7",
  "prompt": "Change the ceramic glaze to matte cobalt blue while keeping the lighting and table surface unchanged",
  "image_urls": [
    "https://example.com/kettle.png"
  ]
}

Billing

MAI-Image-2.7 is billed across three token categories: text input, image input, and image output. Admission reserves an estimate; completion settles on the measured usage returned for each category. Failed requests are not charged. See live pricing.

Table of Contents