Prompt2Model Task Submit API Reference
Virtual Try-On Task Submit
GET/POST/ai/pigeon
Note: This API is asynchronous. You need to submit a task and obtain a task ID, then use the result query API to retrieve the generated results. This API is the initial task submit step. Currently, the test API supports up to three requests within a 60-second period. For higher throughput or faster response times, please contact our sales team.
Request Parameter
Parameter
Type
Required
Description
prompt
string
No
The textual description of the image to be generated. Currently, only English is supported.
refImg
string
No
Reference image URL. Only one of this parameter or the prompt can be provided.
aspectRatio
String
No
Specifies the aspect ratio of the generated image, the longest side fixed at 1024 pixels. Supported aspect ratios include: "16:9", "9:16", "1:1", "2:3", "3:2", "21:9", "9:21", "4:3", and "3:4".
imageNum
number
Yes
Number of images generated.(1-4)
Sample Request
For other programming languages, please refer to Quick Start.
{"prompt":"generate a woman wearing white hoodie and green glass",
"aspectRatio": "4:3",
"imageNum":1}
Response Parameters
Parameter
Type
Description
requestId
String
Request ID: Used to uniquely identify a single request call.
_trace_id_
String
The unique task tracking ID responsed.
code
The returned response code.
resCode
Number
Response code;200 indicates a successful call. For other response codes,please refer to the error code information.
resMessage
String
The responsed request information.
data
Object
The responsed json result data.
usage
The responsed usage.
result
Object
The responsed result data.
taskId
String
A unique task ID, used for subsequent result queries.
Sample Response
"data": {
"usage": 0,
"result": {
"taskId": "e00da6b4-3b05-4bc9-9816-60df68cbdcc4"
}
},
"resCode": 200,
"resMessage": "success",
"code": "0",
"request_id": "212a6bb617502176358052095",
"_trace_id_": "213e59a517502176352646271e11a3"
}
Errors
Error
Code
Error Message
Description
500
system error
Internal system error.
501
rate limit exceed
The current interface has reached the current limit. Please contact us via Discord or email us ([email protected]) to increase the current limit value.
700
invalid input
The format of the input parameters does not meet the requirements.
701
Clothing image dowloading failed, please try another input.
Clothing image dowloading failed, please try another input.
702
model failed
Internal call exception,please contact us via Discord or email us ([email protected]) for troubleshooting.
1000
content has sensitive data, please try other input.
Content has sensitive data, please try other input.
1001
content control failed, please retry.
Content control failed, please retry. If the error persists,please contact us via Discord or email us ([email protected]).
1002
content risk filter failed, please contact us.
Content risk filter failed. Please contact us via Discord or email us ([email protected]).
Last updated
Was this helpful?