On October 21st, Elon Musk announced via his social media platform X (formerly Twitter) that xAI has launched an Application Programming Interface (API) available for third-party developers. This API allows access to and the development of applications and functionalities based on xAI's Grok large language model.
According to xAI's API documentation, this interface grants developers access to xAI's latest multimodal language models, Grok-2 and Grok-2 Mini. Additionally, these models are capable of generating images in collaboration with Black Forest Labs' Flux.1 diffusion model. However, testing feedback indicates that only the model named "Grok-beta" is currently accessible. The API website prominently displays "Public Beta" at the top, signifying that xAI’s developers and engineers will continue to refine and enhance the API with new features in the coming days.
The introduction of the xAI API is significant for xAI and marks a direct competition against OpenAI, which was co-founded by Musk but later left. OpenAI also offers API services.
The xAI API provides a web-based console for generating API keys, exploring endpoints, and integrating models into applications. It supports REST, gRPC, and SDKs, and is compatible with other AI services like OpenAI, enabling seamless integration with existing systems.
In terms of pricing, xAI's rates are currently higher than OpenAI’s. For instance, GPT-4o is priced at $2.5 per million input tokens and $10 per million output tokens, whereas Grok is priced at $5 per million input tokens and $15 per million output tokens. However, OpenAI's new inference model o1 is priced even higher, at $15 per million input tokens and $60 per million output tokens.
The Grok models offer capabilities including text and code generation, visual analysis, and function calling. This enables them to handle tasks such as code creation, content summarization, and data extraction, as well as extend to image analysis and generation and interactions with real-world tools like flight booking and IoT device access.
Toby Boren, one of xAI's founding members, shared more details about the new API on the X social network, mentioning features like usage explorer, streamlined team management, and enhanced security. The platform also supports two-factor authentication through TouchID, security keys, and authentication apps.
To utilize the xAI API, developers need to register through the xAI console, organize their teams, and set up billing. Each team has its own API key and billing configurations to ensure businesses can effectively track costs and manage resources.
It remains uncertain whether developers will flock to xAI’s API in large numbers and use it alongside or in place of other AI competitors like OpenAI, Anthropic, Google, and Microsoft’s products. Nonetheless, xAI now offers them this additional option.