xai

xAI: Grok 2 Image 1212

models/Grok 2 Image 1212

Grok 2 Image is xAI's image generation model. It processes text prompts to generate high quality images with a datestamp of 2023 12 12. This model internally uses a chat model to revise the prompt before generating the image, enhancing the quality and relevance of the output.

Price range: $0.07 - $0.07
  • Standard: $0.07 for size 1024x1024
(Per image)
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
POSThttps://api.indoxhub.com/api/v1/images/generations
Configxai/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}")