This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the image generation results.
application/jsonContent-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Request:
Response:
task_id to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get images url in imgs of response.
Request:
Response:
Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Request:
Response:
task_id to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get images url in imgs of response.
Request:
Response:
Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Request:
Response:
task_id to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get images url in imgs of response.
Request:
Response:
Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Request:
Response:
task_id to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get images url in imgs of response.
Request:
Response:
Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Request for textual inversion names:
Response:
Request:
Response:
task_id to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get images url in imgs of response.
Request:
Response:
enable_nsfw_detection true, NSFW detection will be enabled, incurring an additional cost of $0.0015 for each generated image.
nsfw_detection_level, nsfw check level, ranging from 0 to 2, with higher levels indicating stricter NSFW detection criteria. The default value is 0. The following table lists the NSFW detection criteria for each level.
Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Request:
Response:
task_id to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get images url in imgs of response. There are two results in reponse.
enable_nsfw_detection, when return with true means NSFW detection is enabled.
nsfw_detection_result, presenting an array of NSFW detection outcomes for each image. The order of elements in the nsfw_detection_result array corresponds one-to-one with the sequence of images in the images field in the response. The valid field denotes the success of the NSFW detection process, while the confidence field, ranging from 0 to 100, signifies the confidence level of the NSFW detection result. Higher confidence values, nearing 100, suggest a greater likelihood of the corresponding image containing NSFW content.
Request:
Response: