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>",
  "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.

注意:由于openai目前暂未以api形式提供该接口,所以该接口目前为逆向接口。稳定性可能存在波动,目前整体定价较为便宜,后续官方正式上线后,可能会同步调整接口字段以及定价。

Authorizations

TT-API-KEY
string
header
required

请前往 TTAPI 控制台 获取 API 密钥。

Body

application/json
prompt
string
required

生成图片文字提示,因为目前为逆向模型,建议文案提示存在关键字:** “画一张xxx”, “生成一张”,'draw a xxx', ** 具体语言不限制,openai本身就支持多语言模型,中文支持也非常友好。

referImages
array

垫图数组

hookUrl
string

回调通知地址,任务完成或失败将通过请地址进行通知,通知数据结构 [blocked]与fetch结构一致。如果未设置,则需要请求fetch接口 [blocked]进行查询

Response

请求成功

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

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