Giky API / Docs
MODEL API REFERENCE

GPT Image 2.5 Sunburst API Documentation

Generate images with GPT Image 2.5 Sunburst. Submit a request, save the task ID, then query for the finished image.

On this pageOverviewAuthenticationRequest examplesRequest parametersText to Image inputImage to Image inputCreate responseQuery the resultResponse parametersWebhooks (optional)Webhook parametersErrors & retries

Overview

Model ID: gpt-image-2-5-sunburst. Text to Image · Image to Image. Check the current price and availability before your first request.

POST/v1/tasksCreate a task
GET/v1/tasks/{id}Get the result

Authentication

Use Authorization: Bearer YOUR_API_KEY. For task creation, also send Content-Type: application/json and a unique Idempotency-Key. The example below includes all three headers.

Request examples

Choose an operation and language. Replace YOUR_API_KEY and use a unique Idempotency-Key for each new generation; preserve it when retrying the same request.

curl --fail-with-body 'https://gikyapi.com/v1/tasks' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: YOUR_STABLE_REQUEST_ID' \
  --data '{
  "model": "gpt-image-2-5-sunburst",
  "operation": "text-to-image",
  "input": {
    "prompt": "A blue ceramic cup on a white table, soft morning light",
    "quality": "max",
    "resolution": "4K"
  }
}'

Request parameters

The request body contains model, operation and input. Model-specific fields belong inside input; their accepted values are listed below.

ParameterTypeRequiredDescription
modelstringYesgpt-image-2-5-sunburst
operationstringYestext-to-image / image-to-image
inputobjectYesParameters for your selected operation.
callbackobjectNoUse an endpoint_id saved in your account’s Webhooks settings. Omit this field when polling.

Text to Image input

Fields inside input. Optional fields may be omitted; send only the fields listed here.

ParameterTypeRequiredDescription / accepted values
promptstringYesDescribe the scene, style or edit you want to make. Maximum 20000 characters.
qualitystringYesquality. Accepted: low, medium, high, xhigh, max.
resolutionstringYesOutput resolution. Choose a resolution listed in the model pricing. Accepted: 1K, 2K, 4K.
aspect_ratiostringNoAspect ratio of the generated output. Accepted: 1:1, 1:2, 2:1, 1:3, 3:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 9:21, 21:9.
output_formatstringNoFile format of the generated image. Accepted: png, jpeg, webp.

Image to Image input

Fields inside input. Optional fields may be omitted; send only the fields listed here.

ParameterTypeRequiredDescription / accepted values
promptstringYesDescribe the scene, style or edit you want to make. Maximum 20000 characters.
qualitystringYesquality. Accepted: low, medium, high, xhigh, max.
image_urlsarrayYesPublic HTTPS URLs of reference images. Each URL must be accessible without signing in. Maximum 16 items.
resolutionstringYesOutput resolution. Choose a resolution listed in the model pricing. Accepted: 1K, 2K, 4K.
aspect_ratiostringNoAspect ratio of the generated output. Accepted: 1:1, 1:2, 2:1, 1:3, 3:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 9:21, 21:9.
output_formatstringNoFile format of the generated image. Accepted: png, jpeg, webp.

Create response

HTTP 202 means the task was accepted. Save id and use it to query the result. The response below is illustrative; generation has not finished at this stage.

{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "queued",
  "outputs": [],
  "error_code": null,
  "created_at": "2026-11-02T00:00:00Z",
  "updated_at": "2026-11-02T00:00:00Z"
}

Query the result

Replace TASK_ID with the returned id. Use the same API key and poll every five seconds or more. When status is succeeded, read the file URLs from outputs.

GET/v1/tasks/{id}Retrieve a task
curl --fail-with-body 'https://gikyapi.com/v1/tasks/TASK_ID' -H 'Authorization: Bearer YOUR_API_KEY'

Response parameters

Creation and status queries return the same task structure.

FieldTypeDescription
idstringTask ID used in subsequent status queries.
statusstringqueued / submitting / running / succeeded / failed / needs_review
outputsstring[]Generated file URLs when the task succeeds. Save files to your own storage.
error_codestring | nullFailure code when available; null if there is no error.
created_atstringTime the task was created.
updated_atstringTime of the last task update.
{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "succeeded",
  "outputs": [
    "https://example.com/result.png"
  ],
  "error_code": null,
  "created_at": "2026-11-02T00:00:00Z",
  "updated_at": "2026-11-02T00:00:00Z"
}

Webhooks (optional)

Add an endpoint in Dashboard → Webhooks and save the signing secret on your server. Include its ID in the task request. You can also poll task status without configuring a callback.

ParameterTypeRequired with callbackDescription
callback.endpoint_idstringYesID of a callback endpoint owned by your account.
{
  "callback": {
    "endpoint_id": "YOUR_ENDPOINT_ID"
  }
}

Webhook parameters

Completion events use task.succeeded or task.failed. Verify the signature before processing and deduplicate by event id. A missing callback does not mean the task failed; query its status.

FieldTypeDescription
idstringUnique event ID; use it to deduplicate deliveries.
typestringtask.succeeded or task.failed
task_idstringThe generation task ID.
statusstringTask status at the time of the event.
outputsstring[]Generated file URLs for a successful task.

Errors & retries

If a submission times out, retry with the same Idempotency-Key and identical body. If you already have a task ID, query that task instead of creating another one.

StatusWhat to do
400Check required fields, accepted values and the priced configuration.
401Check your API key, expiry and restrictions.
409Check the error code: refresh changed configurations or resolve a reused request key.
429Wait at least 60 seconds before retrying.
failedRead error_code and check the consumption record.
needs_reviewKeep the task ID and stop automatic resubmission.