xAI, the artificial intelligence company led by Elon Musk, has launched a new application programming interface (API) that introduces image generation capabilities for developers. This new addition marks a significant step for xAI, as it is the first developer tool from the company to support image creation. The release of this API is part of xAI’s ongoing focus on empowering developers, with a total of five APIs launched since the company debuted its first one in November 2024. While the pricing for the API is on the higher side, it offers developers the ability to generate images based on text prompts, although customization of the output is not yet available.
Before this launch, xAI provided developers with four AI models via API, all based on its Grok large language model (LLM) family. Two of these models were based on the original Grok LLM, and the other two were based on Grok 2. Although image understanding was part of the offerings, there was no functionality for generating images directly from the API. This limitation was likely due to the fact that xAI had been outsourcing the image generation feature to Black Forest Labs, an AI startup that previously handled the image creation on Grok’s chat platform.
However, in December, xAI unveiled Aurora, an image generation model built using a mixture of experts (MoE) network, signaling a shift in how the company would handle image creation moving forward. With the new Grok API, developers now have access to the grok-2-image-1212 model, which integrates this new image generation capability. The process is fairly simple—developers send a text prompt, which the chat model revises for clarity. The adjusted prompt is then forwarded to the image generation model, and the output is produced accordingly.
Currently, the API allows developers to generate up to 10 images per request, with a cap of five requests per second. Any attempts to exceed this limit will result in an error message. The generated images are provided in JPEG format, and the cost for each image is reportedly set at $0.07 (approximately Rs. 6). This development marks an exciting new chapter for xAI and its suite of developer tools, opening up new possibilities for integrating AI-generated images into various applications.