Documentation
GPT Image 1.5 AI - Generate
Generate high-quality images using GPT Image 1.5 AI model (V2 API).
Authentication Required
This API requires authentication with a Bearer token. Get your API key from Dashboard > API Keys .
https://gptimage15.ai/api/v2/generateGenerate an image using GPT Image 1.5 AI model with advanced parameters.
Headers
Request Body
Request Parameters
promptRequiredText description of the image you want to generate. Be descriptive for better results.
aspect_ratioOptional Aspect ratio of the output image. Default: 1:1
Supported values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
sizeOptional Resolution quality of the output image. Default: 1K
Supported values: 1K, 2K, 4K
formatOptional Output image format. Default: png
imagesOptionalArray of image URLs to use as reference or for image-to-image generation. When provided, the model will use these images as input for transformation.
Example: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"]
Successful response with the task ID. The task is processed asynchronously.
Response Schema
Credit Consumption
Each generation request consumes 24 credits from your account balance.
Next Steps
After receiving the task_id from the response, you need to poll the status endpoint to check the generation progress and retrieve the result.
Error Responses
Missing required parameters or invalid values.
{
"code": 400,
"message": "Bad Request: 'prompt' is required.",
"data": null
}Missing or invalid API key.
{
"code": 401,
"message": "Unauthorized: Missing or invalid API key.",
"data": null
}Not enough credits in your account.
{
"code": 402,
"message": "Insufficient credits. Please recharge your account.",
"data": null
}Server error, please try again later.
{
"code": 500,
"message": "Internal Server Error, please try again later or contact support.",
"data": null
}