Create image

Create an image from a prompt.

post/images

Request

  • Base URL: https://api.shortgenius.com/v1
  • URL: https://api.shortgenius.com/v1/images
  • Auth: HTTP bearer

Request body

promptstring required

The prompt to generate the image from.

aspect_ratio'9:16' | '16:9' | '1:1' required

The aspect ratio of the image.

image_style_idstring uuid nullable

The ID of the image style to use. Use the List image styles endpoint to get a list of available image styles.

scene_idstring uuid nullable

If you want to add the generated image to a video scene you can specify it here.

wait_for_generationboolean

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.

modelstring
quality'low' | 'medium' | 'high'
source_media_idstring uuid nullable

The ID of the media to use as a source for the image.

associated_product_idstring nullable

The ID of the product to associate this image with.

Response

Successful response

idstring uuid required
urlstring nullable required
associatedProductIdstring nullable
type'GeneratedImage' | 'GeneratedImagePreset' required
state'pending' | 'generating' | 'completed' | 'error' | 'request_smart_motion' | 'placeholder' required
created_atstring required

Date and time (ISO 8601) when the media was created.

updated_atstring nullable

Date and time (ISO 8601) when the media was last updated.

promptstring required
is_nsfwboolean required
aspect_ratio'9:16' | '16:9' | '1:1' required

Aspect ratio of the generated image.

image_style_idstring uuid nullable

Changes

No recorded changes to this operation across all 1 revision of this API.