
Elon Musk’s AI company, xAI, has rolled out a new application programming interface (API) aimed at revolutionising image generation for developers. The launch marks the first time xAI has enabled image creation via its API, a significant step forward for the company that has released five APIs since November 2024.
The latest release, named ‘grok-2-image-1212,’ is designed to simplify the process of generating images from text prompts. Unlike previous xAI APIs which only featured image understanding capabilities, this new model offers developers the ability to create images directly. The feature was previously unavailable because xAI had outsourced image generation to the AI startup Black Forest Labs via its chat platform.
However, the introduction of the Aurora image generation model in December 2024, built on a mixture of experts (MoE) network, has paved the way for this new developer-focused tool. With this API, developers can now generate up to 10 images with a single request, though there is a limit of five requests per second. Generated images are provided in JPEG format, making them compatible with a wide array of applications.
According to a TechCrunch report, xAI’s new API is priced at $0.07 (approximately Rs. 6) per image. While the cost is on the higher side compared to competitors like Black Forest Labs’ Flux API ($0.05 per image) and Google’s Imagen 3 ($0.03 per image), it is still cheaper than Ideogram, which charges $0.08 per image.
The company has made it clear that the API does not yet support output customisation, meaning developers cannot alter the quality, size, or style of the generated images. However, xAI has hinted that future updates may include more advanced features to enhance user control over the outputs.
xAI has designed the ‘grok-2-image-1212’ API to be user-friendly and efficient. When a text prompt is submitted, a chat model revises the prompt for clarity before handing it off to the image generation model. The resulting image is then generated and returned to the user. While the functionality is straightforward, the company is currently limiting customisation to maintain streamlined performance.
Additionally, the API’s endpoint is compatible with OpenAI’s SDK, though it does not support the Anthropic SDK, potentially limiting some integrations.
For Unparalleled coverage of India's Businesses and Economy – Subscribe to Business Today Magazine
Copyright©2025 Living Media India Limited. For reprint rights: Syndications Today