Authorization
Grok by xAI
Prerequisites
Before creating a Grok by xAI credential, you'll need to obtain an API key from your xAI account. xAI provides API keys for programmatic access to the Grok API, which are used to authenticate API requests.
To obtain a Grok API key:
-
Log in to your xAI account or create an account at
https://x.aiif you don't have one. -
Navigate to the API settings or developer section of your xAI account dashboard. This is typically accessible from your account settings or a dedicated API/Developer section.
-
In the API settings, locate the option to create or generate a new API key. xAI API keys typically start with the prefix
xai-. -
Click Create API Key or Generate New Key to create a new API key for your application.
-
Copy the API key immediately after generation, as it may only be displayed once for security purposes. Store it securely, as you'll need both the API key and the ability to regenerate it if needed.
-
Note the base URL for the Grok API (typically
https://api.x.ai) and the API version you'll be using (typicallyv1for the current Grok API version).
For detailed information about Grok API authentication and API key management, refer to the xAI API Documentation.
Create a Grok by xAI Credential
- To create a new Grok by xAI credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
New Credential Overlay – Grok by xAI

Credential Name & Description
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Resource descriptions are recommended but are not required. They should be used provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.
Authentication Settings
-
In the API Key field, enter the Grok API key that you obtained from your xAI account. This is the API key that starts with
xai-and is used to authenticate requests to the Grok API.The API key is sensitive information and should be kept secure. If you've lost your API key, you'll need to generate a new one in your xAI account settings. API keys are used in the Authorization header as a Bearer token for all API requests.
-
In the Base URL field, enter the base URL for the Grok API. The default value is
https://api.x.ai, which is the standard base URL for xAI's Grok API. You typically won't need to change this unless you're using a custom endpoint. -
In the API Version field, enter the API version you want to use. The default value is
v1, which is the current version of the Grok API. You can specify a different version if your organization uses a specific API version.
Save the Credential
-
Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.
-
The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.