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"
  }
}
This is the edit endpoint 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

refer_images
string[]

Reference image list, currently only one image is supported

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

Number of images to generate, range: 1 - 4

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

Callback URL. The system will send a notification to this URL when the task is completed or failed. The notification data structure is consistent with the fetch structure. If not set, you need to call the fetch interface 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 30, 2026