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

FLUX 3 Image

Generate or edit one image with up to ten references, five resolution tiers, optional search grounding, and bounding-box instructions through reAPI.

FLUX 3 Image creates or edits one image from a prompt and optional references. Use model: "flux-3-image" with POST /api/v1/images/generations, then poll GET /api/v1/tasks/:id until the task completes or fails. For moving images, use the separate FLUX 3 Video reference. See the model page for current pricing.

Quickstart

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer $REAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-3-image",
    "prompt": "A studio photograph of a small amber glass vase on an ivory ceramic pedestal, soft daylight, no text.",
    "resolution": "768sq",
    "aspect_ratio": "1:1",
    "grounding": false
  }'
import json
import os
import urllib.request

payload = {
    "model": "flux-3-image",
    "prompt": "A studio photograph of an amber glass vase, soft daylight.",
    "resolution": "768sq",
    "aspect_ratio": "1:1",
    "grounding": False,
}
request = urllib.request.Request(
    "https://reapi.ai/api/v1/images/generations",
    data=json.dumps(payload).encode(),
    headers={"Authorization": "Bearer " + os.environ["REAPI_API_KEY"],
             "Content-Type": "application/json"},
)
with urllib.request.urlopen(request, timeout=120) as response:
    task = json.load(response)
print(task["id"])
const response = await fetch('https://reapi.ai/api/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.REAPI_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'flux-3-image',
    prompt: 'A studio photograph of an amber glass vase, soft daylight.',
    resolution: '768sq',
    aspect_ratio: '1:1',
    grounding: false,
  }),
});
const task = await response.json();
if (!response.ok) throw new Error(JSON.stringify(task.error));
console.log(task.id);
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
    "time"
)

func main() {
    body, err := json.Marshal(map[string]any{
        "model": "flux-3-image",
        "prompt": "A studio photograph of an amber glass vase, soft daylight.",
        "resolution": "768sq", "aspect_ratio": "1:1", "grounding": false,
    })
    if err != nil { panic(err) }
    req, err := http.NewRequest("POST", "https://reapi.ai/api/v1/images/generations", bytes.NewReader(body))
    if err != nil { panic(err) }
    req.Header.Set("Authorization", "Bearer " + os.Getenv("REAPI_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    resp, err := (&http.Client{Timeout: 120 * time.Second}).Do(req)
    if err != nil { panic(err) }
    defer resp.Body.Close()
    result, err := io.ReadAll(resp.Body)
    if err != nil { panic(err) }
    if resp.StatusCode >= 400 { panic(string(result)) }
    fmt.Println(string(result))
}

Endpoint

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

Send Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. The response is JSON.

Parameters

FieldTypeRequiredDefaultAccepted values
modelstringYes—flux-3-image
promptstringYes—Non-empty scene or editing instruction; optional box table inside the string
image_urlsstring[]NoNoneUp to 10 public HTTP(S) image URLs; order is significant
aspect_ratiostringNoautoSee the ratio list below; 16x9 notation also accepted
sizestringNo—Compatibility alias for aspect_ratio, not pixel dimensions
resolutionstringNo1k768sq, 1k, 1.5k, 2k, 4k; case-insensitive; 768 aliases 768sq
safety_toleranceintegerNo20–4; higher values are more permissive
groundingbooleanNotrueEnable web and image search context; false disables it
nintegerNo1Only 1

The website playground allows safety_tolerance values 0–1, with a default of 1. Values 2–4 require an API key; API requests keep the documented default of 2.

Supported aspect ratios: auto, 21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2, 9:21. With references, auto uses the first reference's ratio; without them, it uses the prompt to infer a ratio and falls back to square.

Prefer either aspect_ratio or size. When both are supplied, their normalized values must match. For example, aspect_ratio: "16:9" with size: "16x9" is valid; size: "1024x1024" is not. Resolution names describe tiers, so do not assume a fixed width and height for every aspect ratio.

No base64 or data URLs are accepted. This endpoint does not expose seed, width, height, steps, guidance, output_format, negative_prompt, prompt_upsampling, mask_url, or nsfw_check. Unknown fields are rejected.

Reference editing

Supply one or more URLs and describe what should change and what should stay. References are indexed from zero: ref_image_0 is the first URL, ref_image_1 is the second. Keep their order stable, including repeated images.

{
  "model": "flux-3-image",
  "prompt": "Use ref_image_0 as the room. Replace the chair beside the window with the chair from ref_image_1. Keep the window, floor, and camera angle unchanged.",
  "image_urls": ["https://example.com/room.jpg", "https://example.com/chair.jpg"],
  "resolution": "1k",
  "grounding": false
}

Replace the illustrative URLs with publicly accessible images you can use. Inspect the output; preservation of every untouched pixel is not guaranteed.

Bounding-box prompts

There is no separate bbox request field. Add named elements and the JSON table inside the prompt string. Coordinates are normalized [top, left, bottom, right] on a 0–1000 grid, not pixel coordinates. Boxes guide placement; they are not strict masks.

For text-to-image layout, each entry has id, bbox, and desc:

An ivory product poster with a small amber bottle <bottle> in the lower-right
area and generous empty space on the left.
[{"id":"bottle","bbox":[350,600,900,900],"desc":"small amber glass bottle"}]

For editing, entries have id, from, src_bbox, tgt_bbox, and desc. from identifies a reference, or is null for a new element. src_bbox is null when from is null:

Keep the scene from ref_image_0. Add a small amber bottle <bottle> on the right.
[{"id":"bottle","from":null,"src_bbox":null,"tgt_bbox":[350,600,900,900],"desc":"small amber glass bottle"}]

These are format illustrations, not guarantees of exact placement. For reference roles, source-to-target edits, and practical inspection steps, read the FLUX 3 Image editing guide.

Polling and output

Submission returns a task ID. Poll that same task; do not submit a second request just because the first is still processing.

curl https://reapi.ai/api/v1/tasks/task_your_id \
  -H "Authorization: Bearer $REAPI_API_KEY"

A completed task contains one URL in output.image_urls and its charge in usage.credits. A failed task contains error.code and error.message. Only use output after status is completed. 4K work can take several minutes; allow a ten-minute polling window, then check the existing task again rather than blindly resubmitting. Polling is not billed.

Pricing

Billing is per completed image, by resolution. The five tiers are 768SQ, 1K, 1.5K, 2K, and 4K. Reference-image count, aspect ratio, and grounding do not add separate charges for this model. The billing shape is:

credits = ceil(current per-image USD rate for the resolution × 1,000)

Account pricing or membership discounts may affect the current rate. See the live pricing table and playground estimate for your current quote. Failed generations are refunded. A new submission creates a new task and can incur a new charge, even if the prompt is identical.

Errors and troubleshooting

Errors use the shared envelope { error: { code, message, request_id } }. Check error codes for the complete catalog.

CodeMeaning
10001–10004Missing, malformed, invalid, or revoked API key
20002Required parameter missing
20003Invalid parameter value, range, or type
20004Unsupported model on this endpoint
30001Insufficient credits
80001Submission failed
80002Task polling deadline reached
80003Terminal generation failure
80004Completed task has no output URL

Tips

  • Validation errors: check model ID, field names, ratio aliases, resolution, reference count, and real boolean values rather than quoted strings.
  • Unreadable references: use public HTTP(S) URLs that do not need cookies or authentication, and confirm that they return an image.
  • Moderation or generation failure: inspect the task error; do not repeatedly submit the same failing request.
  • Slow 4K work: keep polling the same task ID. A client polling timeout alone does not establish that the generation failed.

Table of Contents