跳转到主要内容
POST
/
grok
/
generations
cURL
curl --request POST \
  --url https://api.ttapi.io/grok/generations \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "aspect_ratio": "16:9",
  "video_length": "10",
  "resolution_name": "720p",
  "refer_images": [
    "<string>"
  ],
  "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 的核心生成接口。 如果你想查看完整的接口目录、推荐接入流程和相关能力,请先阅读 Grok 视频 API 总览

授权

TT-API-KEY
string
header
必填

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

请求体

application/json
prompt
string
必填

提示词

aspect_ratio
enum<string>
默认值:16:9

视频宽高比

可用选项:
2:3,
3:2,
1:1,
9:16,
16:9
video_length
string
默认值:10

视频时长 取值范围为 10 到 30。

resolution_name
string
默认值:720p

输出分辨率,当前仅支持 720p

refer_images
string[]

垫图地址
['https://cdn.ttapi.io/other/2026-03-13/a86ca2c7-6333-4840-b337-395a5d02a182.png','https://cdn.ttapi.io/other/2026-03-13/64a858ed-6095-45ce-92d5-b515c9864703.png']

hook_url
string

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

示例:

"https://example.com/callback"

响应

请求成功

status
string
必填
示例:

"SUCCESS"

message
string
必填
示例:

"success"

data
object
必填
示例:
{ "job_id": "job_id" }
Last modified on March 26, 2026