Skip to content
中文

gpt-image-1.5 API documentation

Integrate gpt-image-1.5 with your VezAPI key. The operations below share the same authentication and account balance.

Base URL: https://api.vezapi.com
Send Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.

GPT Image-1.5 - Image to Image

POST/api/v1/jobs/createTask

Model IDs: gpt-image/1.5-image-to-image

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `gpt-image/1.5-image-to-image` for this endpoint

Values: "gpt-image/1.5-image-to-image"

Default: "gpt-image/1.5-image-to-image"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task

input.input_urls
required
array

Upload an image file to use as input for the API (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)

maxItems: 16

input.prompt
required
string

A text description of the image you want to generate

input.aspect_ratio
required
string

Required. Width-height ratio of the image, determining its visual form.

Values: "1:1", "2:3", "3:2"

input.quality
required
string

Required. Quality: medium=balanced, high=slow/detailed.

Values: "medium", "high"

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-image/1.5-image-to-image",
  "input": {
    "input_urls": [
      "https://example.com/input.png"
    ],
    "prompt": "Edit the image to dress the woman using the provided clothing images. Preserve her exact likeness, expression, hairstyle, and proportions. Replace only the clothing, fitting the garments naturally to her existing pose and body geometry with realistic fabric behavior. Match lighting, shadows, and color temperature to the original photo so the outfit integrates photorealistically, without looking pasted on.",
    "aspect_ratio": "3:2",
    "quality": "medium"
  }
}'
Responses and errors

HTTP 200

Request successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

GPT Image-1.5 - Text to Image

POST/api/v1/jobs/createTask

Model IDs: gpt-image/1.5-text-to-image

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `gpt-image/1.5-text-to-image` for this endpoint

Values: "gpt-image/1.5-text-to-image"

Default: "gpt-image/1.5-text-to-image"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task

input.prompt
required
string

A text description of the image you want to generate

input.aspect_ratio
required
string

Required. Width-height ratio of the image, determining its visual form.

Values: "1:1", "2:3", "3:2"

input.quality
required
string

Required. Quality: medium=balanced, high=slow/detailed.

Values: "medium", "high"

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-image/1.5-text-to-image",
  "input": {
    "prompt": "Create a photorealistic candid photograph of an elderly sailor standing on a small fishing boat.  He has weathered skin with visible wrinkles, pores, and sun texture, and a few faded traditional sailor tattoos on his arms. He is calmly adjusting a net while his dog sits nearby on the deck. Shot like a 35mm film photograph, medium close-up at eye level, using a 50mm lens. The image should feel honest and unposed, with real skin texture, worn materials, and everyday detail. No glamorization, no heavy retouching. ",
    "aspect_ratio": "1:1",
    "quality": "medium"
  }
}'
Responses and errors

HTTP 200

Request successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Task status and callbacks

For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.

A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.

Files, logs and billing

Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.

Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.