Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
Except for the top-level model, parameters below belong in input[0].params. Use the example to verify integration and validate results when changing options
model string required
Model ID to use for the request
Options: gpt_image_2_6_sunburst_edit
prompt string required
Text description of the desired edit, maximum length 32000 characters
images string | array required
Input image reference(s) to edit. A string or array is accepted
Use an HTTP/HTTPS image URL accessible to the platform, a Base64 data URI, or a raw Base64 image string. Local file paths are not supported
size string
Size of the generated image, specified as auto or a custom WIDTHxHEIGHT string (for example, 1536x864)
Custom dimensions must meet the model’s actual size limits
Default: auto
Common sizes:
| Size | Description |
|---|---|
1024x1024 | Square |
1536x1024 | Landscape |
1024x1536 | Portrait |
background string
Optional background handling mode
For transparent, set output_format to png or webp
Options: transparent, opaque, auto
Default: auto
output_format string
Optional static image output format
Options: png, jpeg, webp
Default: png
output_compression integer
Optional output compression level for jpeg and webp
Range: 0 - 100
moderation string
Optional content-moderation mode
Options: auto, low
Default: auto
safety_identifier string
Optional end-user safety identifier, maximum length 128 characters
Use a hash of a username or email address. A nonempty value takes precedence over the legacy user parameter
n integer
Requested number of images
The range below follows the model API. Use the actual images in output[].content[] for the final count
Range: 1 - 10
Default: 1
quality string
Image quality level
Options: low, medium, high, xhigh, max, auto
Default: auto
complexity string
Planning complexity before rendering, independent of rendering quality
Lower levels suit focused edits such as background changes. Higher levels can help with complex layouts but may increase latency and introduce unwanted changes
Options: low, medium, high
Default: high
Polling
Since result generation takes time, you need to poll the task status after creating the task.
The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.
See the examples on the right for polling requests and responses.
A creation response with status: completed does not mean the image is ready. Poll with the returned id until the query returns completed with a nonempty output, or stop on failed
For synchronous results, send the same request body to POST https://cloud.vtrix.ai/model/v1/generation/sync. The creation response example is for the asynchronous endpoint. Do not automatically recreate a task after a request timeout
Response Format
error object
Error information, only present when status is failed
code
stringError code
message
stringDetailed error message
output array
Generation results, only present when status is completed
content
arrayList of generated resource content
type
stringResource type
Value:
image|videourl
stringProcessed resource URL
jobId
stringRemote task ID
usage object
Usage statistics, only present when status is completed
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information