GPT Image 1.5 AI - Query Status

Check the status and retrieve results of a GPT Image 1.5 AI generation task (V2 API).

GET
https://gptimage15.ai/api/v2/status?task_id={task_id}

Retrieve the status and results of a previously submitted GPT Image 1.5 AI task.

Headers

Content-Type
application/json

Query Parameters

task_idRequired
string

The task ID returned from the generate API endpoint. Used to identify and retrieve the specific task.

Example: nprob71e549f645122eb8db5f75af2c11nono

Response Examples

Task Processing

When the task is still being processed, the response will have status: 0 and response: null.

Response

Task is still processing.

Response Schema

JSON
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "nprob71e549f645122eb8db5f75af2c11nono",
6
"request": "{\"prompt\":\"A futuristic city at sunset, highly detailed, 8k resolution\",\"aspect_ratio\":\"16:9\",\"size\":\"2K\",\"format\":\"png\"}",
7
"response": null,
8
"status": 0,
9
"consumed_credits": 24,
10
"created_at": "2025-01-15 10:30:45",
11
"error_message": null
12
}
13
}

Task Completed

When the task is completed successfully, the response will have status: 1 and the response field will contain the generated image URL(s).

Response

Task completed successfully with generated images.

Response Schema

JSON
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "nprob71e549f645122eb8db5f75af2c11nono",
6
"request": "{\"prompt\":\"A futuristic city at sunset, highly detailed, 8k resolution\",\"aspect_ratio\":\"16:9\",\"size\":\"2K\",\"format\":\"png\"}",
7
"response": "[\"https://cdn.example.com/generated/image_abc123.png\"]",
8
"status": 1,
9
"consumed_credits": 24,
10
"created_at": "2025-01-15 10:30:45",
11
"error_message": null
12
}
13
}

Task Failed

When the task fails, the response will have status: -1 and the error_message field will contain the error details.

Response

Task failed with error message.

Response Schema

JSON
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "nprob71e549f645122eb8db5f75af2c11nono",
6
"request": "{\"prompt\":\"Invalid prompt content\",\"aspect_ratio\":\"16:9\",\"size\":\"2K\",\"format\":\"png\"}",
7
"response": null,
8
"status": -1,
9
"consumed_credits": 24,
10
"created_at": "2025-01-15 10:30:45",
11
"error_message": "Content policy violation: The prompt contains prohibited content."
12
}
13
}

Response Fields

task_id
string

The unique identifier for this task.

request
string (JSON)

Important: This is a JSON string, not an object. You need to parse it using JSON.parse() to access the original request parameters.

Example: const params = JSON.parse(data.request)

response
string (JSON) | null

Important: This is a JSON string containing an array of image URLs, not a direct array. You need to parse it using JSON.parse() to access the URLs. Returns null when processing or failed.

Example: const urls = JSON.parse(data.response)

status
number

Task status indicator:

  • 0 - Processing
  • 1 - Completed successfully
  • -1 - Failed
consumed_credits
number

Number of credits consumed for this task (always 24 for GPT Image 1.5 AI).

created_at
string

Timestamp when the task was created (format: YYYY-MM-DD HH:MM:SS).

error_message
string | null

Error message when task fails. null when processing or completed successfully.

Usage Example

Here's a complete example showing how to properly parse the response data:

// Fetch task status
const response = await fetch(
  'https://gptimage15.ai/api/v2/status?task_id=npro...nono'
);
const result = await response.json();

if (result.code === 200 && result.data) {
  const taskData = result.data;

  // Parse the request field (JSON string)
  const requestParams = JSON.parse(taskData.request);
  console.log('Prompt:', requestParams.prompt);
  console.log('Aspect Ratio:', requestParams.aspect_ratio);

  // Check task status
  if (taskData.status === 1) {
    // Task completed - parse response field (JSON string)
    const imageUrls = JSON.parse(taskData.response);
    console.log('Generated Images:', imageUrls);

    // Download or display images
    imageUrls.forEach((url, index) => {
      console.log('Image ' + (index + 1) + ': ' + url);
    });
  } else if (taskData.status === 0) {
    console.log('Task is still processing...');
  } else if (taskData.status === -1) {
    console.error('Task failed:', taskData.error_message);
  }
}

Polling Recommendation

Tasks are processed asynchronously. We recommend the following polling strategy:

  • Wait 2-3 seconds before the first status check
  • Poll every 1-2 seconds while status is 0
  • Stop polling when status is 1 (completed) or -1 (failed)
  • Typical generation time: 5-30 seconds depending on parameters

Error Responses

400 Bad Request

Missing task_id parameter.

{
  "code": 400,
  "message": "task_id is required",
  "data": null
}
404 Not Found

Task not found with the provided task_id.

{
  "code": 404,
  "message": "Task not found",
  "data": null
}
500 Internal Server Error

Server error, please try again later.

{
  "code": 500,
  "message": "Internal Server Error, please try again later or contact support.",
  "data": null
}