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 a detail, changes the style, or combines the references. Each item is an http(s) URL or base64, 1 to 10 total. Each image must be at least 256ร—256.

aspect_ratio
enum<string>
default:auto

Output aspect ratio. With auto, a ratio named in the prompt wins; otherwise the output keeps the first reference image's framing. Without references, the prompt decides, otherwise 1:1. Set the ratio explicitly for text-to-image.

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>
default:1k

Image resolution tier by similar pixel area. Exact width and height vary with the aspect ratio.

Available options:
768sq,
1k,
1.5k,
2k,
4k
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
grounding
boolean
default:true

When true (default), the prompt may be grounded with web search and image search. When false, both are off, generation is faster, and the model uses only the prompt.

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