Skip to content

GPT Image 2.5 Flare - Text to Image ​

Endpoint ​

POST /images/generations

Full URL: https://modelfold.ai/v1/images/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the text-to-image task.

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name used for generation. This field is required. This endpoint must use the gpt-image-2-5-flare-text-to-image model. Default:"gpt-image-2-5-flare-text-to-image"。 Allowed values:gpt-image-2-5-flare-text-to-image。 Example:gpt-image-2-5-flare-text-to-image。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. Text prompt. Required, maximum 20,000 characters. minLength: 1. maxLength: 2000. Example:A cinematic night city poster with neon reflections on a rainy street.。
aspect_ratiostringNoThe aspect ratio of the generated image is set to auto by default. The 27:16, 16:27, 9:8 and 8:9 aspect ratios support 1K only. 2K and 4K are available for other aspect ratios. Allowed values:auto / 1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 16:9 / 9:16 / 21:9 / 27:16 / 16:27 / 9:8 / 8:9。 Example:auto。
resolutionstringNoImage resolution. The background parameter is only available at 1K. Allowed values:1K / 2K / 4K。 Example:1K。
backgroundstringNoImage background
Note: This parameter is only supported when the resolution is 1K. Allowed values:transparent / opaque / auto。 Example:transparent。

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2-5-flare-text-to-image",
  "prompt": "A cinematic night city poster with neon reflections on a rainy street."
}'
json
{
  "model": "gpt-image-2-5-flare-text-to-image",
  "prompt": "A cinematic night city poster with neon reflections on a rainy street."
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.png"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.