Skip to main content
POST
/
openai
/
4o-image
/
generations
cURL
curl --request POST \
  --url https://api.ttapi.io/openai/4o-image/generations \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "referImages": "https://cdn.ttapi.io/demo/2025-03-30/5d17dd5207daeeac86bcecd2d6405a0.jpg",
  "hookUrl": "<string>"
}
'
{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}
Note: This interface is based on reverse engineering, and its stability may fluctuate. ⚠️

Authorizations

TT-API-KEY
string
header
required

You can obtain your API key from the TTAPI Dashboard.

Body

application/json
prompt
string
required

Text prompt for image generation. Since this is a reverse-engineered model, it's recommended to include keywords in your prompt such as: ",draw a xxx", "generate a xxx", "draw a xxx". Language is not restricted; OpenAI itself supports multilingual models with excellent Chinese support.

referImages
array

Reference image array

hookUrl
string

Callback notification URL. When task completes or fails, this URL will be notified. Notification data structure is consistent with fetch structure. If not set, you need to request the fetch interface for query

Response

Request successful

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

data
object
required
Example:
{
"job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Last modified on March 13, 2026