Перейти к основному содержанию
POST
/
grok
/
image
cURL
curl --request POST \
  --url https://api.ttapi.io/grok/image \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "enable_pro": true,
  "aspect_ratio": "1:1",
  "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.

Это основной endpoint генерации в Grok Image API

Авторизации

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

Перейдите в TTAPI Console, чтобы получить API-ключ.

Тело

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

Промпт

enable_pro
boolean
по умолчанию:true

По умолчанию true — режим качества, false — режим скорости

aspect_ratio
enum<string>
по умолчанию:1:1

Соотношение сторон изображения

Доступные опции:
2:3,
3:2,
1:1,
9:16,
16:9
n
integer
по умолчанию:1

Number of generated images (1 - 4)

hook_url
string

Callback URL. Notifications will be sent to this address when the task is completed or failed, and the notification data structure is consistent with the fetch structure [blocked]. If not set, you need to request the fetch interface [blocked] to query the result.

Пример:

"https://example.com/callback"

Ответ

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

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

"SUCCESS"

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

"success"

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