https://api.nexscope.ai/api/skill-api/v1/skills/gpt-image-2-5-generation/runRun this API
Send a JSON request to execute this API and receive the documented response payload.
Endpoint
| Method | POST |
| Path | https://api.nexscope.ai/api/skill-api/v1/skills/gpt-image-2-5-generation/run |
| Auth | Bearer API key |
| Content-Type | application/json |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
imageUrls | array | optional | Optional public reference image URLs. Omit this field for text-to-image generation, or provide references for image-to-image generation. When supplied, provide 1 to 10 JPG, PNG, or WEBP images; each image must not exceed 20 MB. Example: [] |
prompt | string | required | Generation prompt describing the target image, scene, composition, style, and constraints. Maximum 5000 characters. Example: Keep the product consistent and generate a clean white-background ecommerce hero image. |
outputNum | integer | optional | Number of images to generate. Valid range: 1 to 10; defaults to 1. Example: 1 |
resolution | string | optional | Output resolution. Available options
Example: 2K |
aspectRatio | string | optional | Output aspect ratio. Available options
Example: 1:1 |
quality | string | optional | GPT Image quality. Defaults to medium. Available options
Example: medium |
Request example
{
"imageUrls": [],
"prompt": "Keep the product consistent and generate a clean white-background ecommerce hero image.",
"outputNum": 1,
"resolution": "2K",
"aspectRatio": "1:1",
"quality": "medium"
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | any | required | Data value used by this API operation. |
code | integer | required | 0 means accepted or successful; nonzero is a platform error. |
msg | string | null | required | Msg value used by this API operation. |
ts | string | required | Epoch milliseconds. |
time | string | required | Server local time: yyyy-MM-dd HH:mm:ss. |
cost | string | required | Elapsed milliseconds, never credits; -1 outside web requests. |
traceId | string | null | required | Trace id value used by this API operation. |
Any of option 1 — requires taskId, status, result
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Data value used by this API operation. |
data.status | string | required | Status value used by this API operation. Allowed: PENDING, RUNNING, SUCCEEDED, FAILED, TIMEOUT |
data.result | any | required | Result value used by this API operation. |
data.taskId | string | required | Task id value used by this API operation. |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.result | object | required | Completed generation output retained from the task result. Fields vary by capability; generated resources use Nexscope-hosted URLs and any count represents charged Nexscope credits. This is the business output, not a task creation receipt. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.result | null | required | Result value used by this API operation. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data | null | required | Data value used by this API operation. |
Response example
Platform response envelope. code 0 indicates success or acceptance; data contains the business result.
{
"data": {
"taskId": "example-task",
"status": "PENDING",
"result": null
},
"code": 0,
"msg": null,
"ts": "0",
"time": "2026-01-01 00:00:00",
"cost": "-1",
"traceId": null
}Responses
| Code | Description |
|---|---|
| 200 | HTTP request completed. Check JSON code; only 0 indicates business success or acceptance. |
| 400 | Request JSON or required API parameters are invalid. |
| 401 | API key is missing, invalid, or cannot be matched to a user. |
| 5xx | API execution or upstream service failed. |
Data source, freshness, and limitations
Source, freshness, coverage, rate limits, and estimation notes are not specified in this API definition unless they appear in the request or response field documentation above. Do not assume official marketplace data or real-time freshness when it is not explicitly documented.