Skip to main content
POST
/
generate
/
k
/
grok-text-to-image
Grok Text to Image
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/grok-text-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A beautiful sunset over the ocean",
  "aspect_ratio": ""
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate high-quality images from text using xAI’s Aurora image generation model. Key Features:
  • Photorealistic Rendering - Autoregressive mixture-of-experts architecture for lifelike portraits and entities
  • Precise Instruction Following - Accurately understand and execute complex text descriptions
  • Text & Logo Rendering - Excellent artistic text and brand logo generation capabilities
  • Celebrity/Entity Recognition - Accurately generate images of real-world people and objects

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required)

Required string length: 1 - 5000
Example:

"A beautiful sunset over the ocean"

aspect_ratio
enum<string>

Aspect ratio (optional, default 3:2)

Available options:
2:3,
3:2,
1:1
Example:

""

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"