Skip to main content
POST
/
openai
/
gpt
/
generations
cURL
curl --request POST \
  --url https://api.ttapi.io/openai/gpt/generations \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "model": "gpt-image-2",
  "referImages": [
    "https://cdn.ttapi.io/xxx1.png",
    "https://cdn.ttapi.io/xxx2.png"
  ],
  "hookUrl": "<string>"
}
'
{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

TT-API-KEY
string
header
required

Вы можете получить API-ключ в 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", 'draw a xxx', Language is not restricted; OpenAI itself supports multilingual models with excellent Chinese support.

model
enum<string>
default:gpt-image-2

Supported models

Available options:
gpt-4o-image,
gpt-image-1,
gpt-image-1.5,
gpt-image-2
referImages
string[]

Reference image array

Example:
[
"https://cdn.ttapi.io/xxx1.png",
"https://cdn.ttapi.io/xxx2.png"
]
hookUrl
string

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

Response

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

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

data
object
required
Example:
{
"job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Last modified on April 22, 2026