Skip to main content
POST
/
grok
/
image
/
edits
cURL
curl --request POST \
  --url https://api.ttapi.io/grok/image/edits \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "refer_images": [
    "https://cdn.ttapi.io/grok/2026-03-30/bd61449e07eb46a5ac8870651f374e50.jpg"
  ],
  "n": 1,
  "hook_url": "https://example.com/callback"
}
'
{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "job_id": "job_id"
  }
}

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.

这是 Grok 图片 API 的编辑接口。

Authorizations

TT-API-KEY
string
header
required

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

Body

application/json
prompt
string
required

提示词

refer_images
string[]

参考图像列表,目前只支持一个图像

Example:
[
"https://cdn.ttapi.io/grok/2026-03-30/bd61449e07eb46a5ac8870651f374e50.jpg"
]
n
integer
default:1

生成图片数量 1 - 4

Required range: 1 <= x <= 4
hook_url
string

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

Example:

"https://example.com/callback"

Response

请求成功

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

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