xAI, the artificial intelligence company founded by Elon Musk, has officially launched an application programming interface (API) for its Grok AI chatbot. This milestone follows Musk’s commitment made in August to transform Grok into an accessible API, which is now available for users to explore and utilize. The xAI console enables users to generate API keys and offers customization options for their interactions with the service. However, pricing for input and output tokens has been set higher than that of its competitors in the market.
Launch of xAI API
Musk took to X, the platform formerly known as Twitter, to announce the API’s availability for all users. An API serves as a set of protocols that facilitate communication between different software systems, providing a valuable tool for developers to create applications using data accessed through the API.
The Grok API allows developers to build a range of chatbot applications or integrate chatbot capabilities into their existing offerings, all powered by the Grok AI models.
At present, users can access a single large language model (LLM) identified as “grok-beta” through the API. Details about the model remain undisclosed, including whether it is a refined version of the recently unveiled Grok-2. The current capabilities of the AI are restricted to text generation.
The pricing structure includes a rate of $5 (approximately Rs. 420) for every million input tokens and $15 (about Rs. 1261) for each million output tokens, where one million tokens are roughly equivalent to 750,000 words. This pricing strategy positions xAI’s API at a higher tier compared to options like OpenAI’s ChatGPT and Google’s Gemini. Interested users can access the new xAI API via the xAI Console.
The API includes support for function calling, a vital feature for any AI model-based API. This functionality allows users to specify requests clearly, enabling the system to retrieve the relevant data. In this case, the API connects to the Grok AI model, which serves as an internet-enabled chatbot, providing responses to various prompts and inquiries.