xAI: Grok 2 Image 1212
models/Grok 2 Image 1212Overview
Create api keyPrice range: $0.07 - $0.07
- Standard: $0.07 for size 1024x1024
Currency$USD
Generate API Key Generate your API Key to securely access IndoxHub's AI models. Integrate with OpenAI-compatible tools, run queries, and build powerful AI applications — all with a single secure key.
Endpoint
POST
https://api.indoxhub.com/api/v1/images/generationsConfigxai/grok-2-image-1212
from indoxhub import Client
client = Client(api_key="[LOGIN TO GET API KEY]")
# Generate an image
response = client.images(
prompt="A serene mountain landscape with a lake at sunset",
model="xai/grok-2-image-1212"
)
# Get the image URL
image_url = response["data"][0]["url"]
print(f"Generated image URL: {image_url}")