Перейти к основному содержанию
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"
  }
}
Примечание: этот endpoint основан на reverse engineering, поэтому его стабильность со временем может меняться.

Авторизации

TT-API-KEY
string
header
обязательно

Вы можете получить API-ключ в TTAPI Dashboard.

Тело

application/json
prompt
string
обязательно

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

Ответ

Запрос выполнен успешно

status
string
обязательно
Пример:

"SUCCESS"

message
string
обязательно
Пример:

"success"

data
object
обязательно
Пример:
{
"job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Last modified on March 26, 2026