Grok Imagine Image is good. These would like a word anyway.
Grok Imagine Image is good. These would like a word anyway.
xAI's image generation model, pairing Grok's prompt understanding with high-quality output. Aimed at detailed, creative images that follow the prompt closely.
fromimport openai OpenAI
client = OpenAI(
"https://api.x.ai/v1" base_url=,
"$XAI_API_KEY" api_key=,
)
response = client.chat.completions.create(
"grok-imagine-image" model=,
"role""user""content""Hello!" messages=[{: , : }],
)
print(response.choices[0].message.content)Set XAI_API_KEY with your xAI API key from console.x.ai.
17 outputs · generated before accounting joined the chat
xAI's image generation model, pairing Grok's prompt understanding with high-quality output. Aimed at detailed, creative images that follow the prompt closely.
fromimport openai OpenAI
client = OpenAI(
"https://api.x.ai/v1" base_url=,
"$XAI_API_KEY" api_key=,
)
response = client.chat.completions.create(
"grok-imagine-image" model=,
"role""user""content""Hello!" messages=[{: , : }],
)
print(response.choices[0].message.content)Set XAI_API_KEY with your xAI API key from console.x.ai.
17 outputs · generated before accounting joined the chat