Skip to main content
POST
cURL

Authorizations

TT-API-KEY
string
header
required

You can obtain your API key from the TTAPI Dashboard.

Body

application/json
prompt
string
required

Free-form prompt describing the image. Without images, it generates a new image from the prompt. With reference images, state what to change and refer to them in order as image 1 and image 2. Bounding boxes can be appended to the prompt, using a 0 to 1000 grid as [top, left, bottom, right].

images

Optional reference images. Omit them for text-to-image. When present, the prompt edits, restyles, or combines them. Each item is an http(s) URL or base64, 1 to 10 total. The first image is the picture being edited and sets the default output size.

aspect_ratio
enum<string>
default:auto

Output aspect ratio. With auto, a reference image uses the first image's exact ratio; without references, a ratio is chosen from the prompt, otherwise 16:9. Ignored when width and height are both set.

Available options:
auto,
21:9,
2:1,
16:9,
3:2,
7:5,
4:3,
5:4,
1:1,
4:5,
3:4,
5:7,
2:3,
9:16,
1:2,
9:21
resolution
enum<string>

Resolution tier: 768sq, 1k, 1.5k, 2k, or 4k. Omitted text-to-image requests use 1k. With a reference image and this field omitted, the first image's own size is used, or the nearest tier when aspect_ratio is also set. Ignored when width and height are both set.

Available options:
768sq,
1k,
1.5k,
2k,
4k
width
integer

Output width in pixels, from 64 to 6256. Must be sent together with height, and overrides aspect_ratio and resolution. Width times height must not exceed 16822272 pixels.

Required range: 64 <= x <= 6256
height
integer

Output height in pixels, from 64 to 6256. Must be sent together with width. Width times height must not exceed 16822272 pixels.

Required range: 64 <= x <= 6256
seed
integer

Seed used to reproduce a result. Random when omitted. Range: 0 to 4294967295.

Required range: 0 <= x <= 4294967295
safety_tolerance
integer
default:2

Harm moderation tolerance from 0 to 7, with 0 the strictest. Default is 2. The route and organization determine the approved maximum and the ceiling for each category.

Required range: 0 <= x <= 7
output_format
enum<string>
default:jpeg

Output image format.

Available options:
jpeg,
png
steps
integer
default:16

Denoising steps. Default is 16. Range: 1 to 16.

Required range: 1 <= x <= 16
webhook_url
string

Async callback URL. The initial response returns jobId. Use this callback or the Flux fetch API to get the final image.

Response

Request successful

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

data
object
required
Example:
Last modified on October 16, 2026