latestSwagger 2.02026-08-19218237253.7 KB

3af866d68651

Images

Generate game-art images from a text prompt alone, selecting an image_type (e.g. sprite) and optionally art_style, perspective, and aspect_ratio. Synchronous: the call blocks until generation finishes and returns an array of image results, each with a url; request n (1-8) to control how many variations come back. Because it generates purely from text it takes no source image, so there is no upload size limit to trip. Credits are charged only on success, scaled to the number of images produced. Use createImage to make new images from scratch; use generateWithStyle to match a reference image's art style, editImage to modify an existing image, and removeBackground to cut out a subject. Pass an optional request_id to tag the results so you can retrieve them later via getImageResults. Requires an API key (user scope).

post/assets/image

Request body

image_typestring required

What kind of image to generate.

promptstring required

Text description of the image to generate. The more detailed the prompt, the more accurate the image will be.

art_stylestring

Visual art style for the sprite (e.g., "Pixel Art", "Cartoonish", "Realistic").

perspectivestring

Camera angle/view for the sprite (e.g., "Side view", "Front view", "Isometric").

aspect_ratiostring

Aspect ratio of the output image.

nnumber

Number of image variations to generate

augment_promptboolean

Augment the prompt behind the scenes. Disable to have more control.

request_idstring

Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.

Response

Success

urlstring
request_idstring
created_atinteger