Create image
Create an image from a prompt.
Parameters required to generate an image.
The prompt to generate the image from.
The aspect ratio of the image.
The ID of the image style to use. Use the List image styles endpoint to get a list of available image styles.
If you want to add the generated image to a video scene you can specify it here.
If false, this endpoint immediately returns the incomplete image record, and you can poll the Get image endpoint until the task completes. If true, this endpoint waits until the image generation completes, then returns the complete image record. Defaults to false.
false
high
Possible values: The ID of the media to use as a source for the image.
The ID of the product to associate this image with.
Successful response
Invalid request
Unauthorized request
POST /api/v1/images HTTP/1.1
Host: shortgenius.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 189
{
"prompt": "text",
"aspect_ratio": "9:16",
"image_style_id": null,
"scene_id": null,
"wait_for_generation": false,
"model": "text",
"quality": "high",
"source_media_id": null,
"associated_product_id": null
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"url": null,
"associatedProductId": null,
"type": "GeneratedImage",
"state": "pending",
"created_at": "text",
"updated_at": null,
"prompt": "text",
"is_nsfw": true,
"aspect_ratio": "9:16",
"image_style_id": null
}
Last updated