Poe API
Create creative and artistic images with Grok Imagine Image. Supports text-to-image and image-editing (single image of jpeg/png/webp format). Set aspect ratio via parameter controls.
Powered by a server managed by @fal. Learn more
- OFFICIAL
Build with Grok-Imagine-Image using the Poe API
Start by creating an API key, for use with any bot on Poe:
Code samples
python
import openai
client = openai.OpenAI(
api_key = "YOUR_POE_API_KEY", # or os.getenv("POE_API_KEY")
base_url = "https://api.poe.com/v1",
)
chat = client.chat.completions.create(
model = "grok-imagine-image",
messages = [{
"role": "user",
"content": "Orange Tabby cat in an intricate mosaic artwork, vibrant, Byzantine style"
}]
)
print(chat.choices[0].message.content)See the full documentation for comprehensive guidance on getting started.