Skip to main content
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.

This is the core generation interface of the Grok Image API

Authorizations

TT-API-KEY
string
header
required

Please go to TTAPI Console to obtain the API key.

Body

application/json
prompt
string
required

Prompt word

enable_pro
boolean
default:true

True is quality mode, false is speed mode

aspect_ratio
enum<string>
default:1:1

Image aspect ratio

Available options:
2:3,
3:2,
1:1,
9:16,
16:9
n
integer
default: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 endpoint [blocked] to query the result.

Example:

"https://example.com/callback"

Response

Request succeeded

status
string
required
Example:

"SUCCESS"

message
string
required
Example:

"success"

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