For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gpt Image 2.5 Sunburst

This documentation is valid for the following list of our models:

  • openai/gpt-image-2.5-sunburst

Model Overview

GPT Image 2.5 Sunburst is available through the AI/ML API.

How to make the first API call

1️⃣ Required setup (don’t skip this) ▪ Create an account: Sign up on the AI/ML API website (if you don’t have one yet). ▪ Generate an API key: In your account dashboard, create an API key and make sure it’s enabled in the UI.

2️ Copy the code example At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.

3️ Update the snippet for your use case ▪ Insert your API key: replace <YOUR_AIMLAPI_KEY> with your real AI/ML API key. ▪ Select a model: set the model field to the model you want to call. ▪ Provide input: fill in the request input field(s) shown in the example.

4️ (Optional) Tune the request See the API schema below for optional generation settings.

5️ Run your code Run the updated code in your development environment.

API Schemas

post
Body
modelstring · enumRequiredPossible values:
promptstring · max: 32000Required

The text prompt describing the content, style, or composition of the image to be generated.

sizestring · enumOptional

The size of the generated image.

Default: 1024x1024Possible values:
qualitystring · enumOptional

The quality of the image that will be generated.

Default: mediumPossible values:
output_formatstring · enumOptional

The format of the generated image.

Default: pngPossible values:
backgroundstring · enumOptional

Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.

Default: autoPossible values:
moderationstring · enumOptional

Control the content-moderation level for images.

Default: autoPossible values:
nnumber · enumOptional

The number of images to generate.

Default: 1Possible values:
output_compressioninteger · max: 100Optional

Compression level (0-100%), applies to JPEG and WebP only.

Default: 100
response_formatstring · enumOptional

The format in which the generated images are returned.

Default: urlPossible values:
Responses
200

Successful response.

application/json
post/v1/images/generations
curl --request POST \
  --url 'https://api.aimlapi.com/v1/images/generations' \
  --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{"model": "openai/gpt-image-2.5-sunburst", "prompt": "Describe what you want the model to generate."}'
200

Successful response.

{
  "data": [
    {
      "url": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png",
      "b64_json": null
    }
  ],
  "meta": {
    "usage": {
      "credits_used": 120000,
      "usd_spent": 0.06
    }
  }
}
post
Body
modelstring · enumRequiredPossible values:
promptstring · max: 32000Required

The text prompt describing the content, style, or composition of the image to be generated.

imageany ofRequired

The image(s) to edit. Must be a supported image file or an array of images. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.

or
sizestring · enumOptional

The size of the generated image.

Default: 1024x1024Possible values:
qualitystring · enumOptional

The quality of the image that will be generated.

Default: mediumPossible values:
output_formatstring · enumOptional

The format of the generated image.

Default: pngPossible values:
backgroundstring · enumOptional

Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.

Default: autoPossible values:
nnumber · min: 1 · max: 10Optional

The number of images to generate.

Default: 1
output_compressioninteger · max: 100Optional

Compression level (0-100%), applies to JPEG and WebP only.

Default: 100
response_formatstring · enumOptional

The format in which the generated images are returned.

Default: urlPossible values:
Responses
200

Successful response.

application/json
post/v1/images/edits
curl --request POST \
  --url 'https://api.aimlapi.com/v1/images/edits' \
  --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{"model": "openai/gpt-image-2.5-sunburst", "prompt": "Describe what you want the model to generate.", "image": "<image>"}'
200

Successful response.

{
  "data": [
    {
      "url": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png",
      "b64_json": null
    }
  ],
  "meta": {
    "usage": {
      "credits_used": 120000,
      "usd_spent": 0.06
    }
  }
}

Code Example

Response

Last updated

Was this helpful?