Skip to content

2D Image Generation

Text-to-image, Sketch-to-image, and Image edit are available now. Spritesheet is coming soon (marked below) and its request contract may change before release.

See Generation styles for the list of built-in genStyleId values.

Text-to-image

Available

This endpoint is live for public API keys.

POST /jobs/text-to-image
Content-Type: application/json
FieldTypeRequiredDefaultNotes
promptstringyes-Up to 4096 characters.
aspectRatio"1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16"no"1:1"Shape of the generated image. Any value other than "1:1" produces a non-square image.
genStyleIdstringno"Auto"A generation style ID. See Generation styles.
referenceImageJobIdstringno-ID of a successful, owned image upload to use as an identity reference.
tPosebooleannofalseGenerate the subject in a neutral T-pose.
apiVersionintegerno1Only 1 exists today.

Spritesheet

Coming soon

Not yet enabled for public API keys. The request contract may change before release.

POST /jobs/spritesheet
Content-Type: application/json

Accepts the text-to-image fields above plus a required spritesheet object.

FieldTypeRequiredNotes
spritesheet.assetKind"background" | "character" | "effect" | "prop" | "ui"yesKind of asset represented.
spritesheet.mode"animated" | "background" | "static"yesSpritesheet mode.
spritesheet.frameCount1 | 12 | 16yesMust be 12 or 16 in animated mode and 1 otherwise.
spritesheet.animation"attack" | "block" | "cast" | "climb" | "death" | "dodge" | "hurt" | "idle" | "interact" | "jump" | "run" | "still" | "walk"noAnimation performed by the subject.
spritesheet.direction"back" | "back-left" | "back-right" | "front" | "front-left" | "front-right" | "left" | "right"noDirection the subject faces or moves.

Sketch-to-image

Available

This endpoint is live for public API keys.

POST /jobs/sketch-to-image
Content-Type: multipart/form-data
FieldTypeRequiredNotes
fileimage fileyesPNG/JPEG etc. Max 20MB.
sketchDatastringyesSerialized sketch metadata used to guide generation.
genStyleIdstringyesA generation style ID.

Image edit

Available

This endpoint is live for public API keys.

POST /jobs/image-edit
Content-Type: application/json
FieldTypeRequiredDefaultNotes
jobIdstringyes-Source job whose image will be edited.
promptstringno-Instructions for the edit.
genStyleIdstringno-A generation style ID.
referencesobject[]no-Reference images. Each item contains url and kind.
references[].urlstringyes-Reference image URL.
references[].kind"base" | "pose" | "style"yesRole played by the reference.
userPromptstringno-Original user-entered prompt before preset augmentation.
quickFixPresetsstringno-Applied preset names or IDs.
apiVersionintegerno1Only 1 exists today.