How to get and use an xAI Grok API key
Grok is a family of Large Language Models (LLMs) developed by xAI. You can access these models via the GrokPrompt config node. To make use of these, however, you'll need to have an XAI account, and generate an API key. It's worth noting as well, that xAI is a paid service, and to make use of it, you'll need to set up billing details on their website.
Account and API Key Creation
Before you can get API keys for your xAI account, you'll need a xAI account. To begin, head to https://x.ai
Info
If you already have an account, go ahead and skip ahead to Step 2
1. Create a xAI account
-
Click on the console login option, or navigate to https://accounts.x.ai/sign-up
-
Complete the signup process, it is extremely straightforward.
2. Set Up Billing
Billing Required
Before using xAI models with Griptape Nodes, be aware that xAI requires billing information to be set up. Without this step, the models won't be available for use in your Nodes.
If you attempt to run Nodes using xAI without completing this billing setup, your workflows will fail as the service will reject the account credentials.
3. Generate an API Key
-
Navigate to the API keys section; there are multiple links to take you there.
-
Click on "Create API Key"
-
Name your API key (suggested name: GriptapeNodes!)
-
Click save
-
Copy and securely store your API key
Security Notice
It is recommended to save this token in a password locker or secure notes app, so you can find it, but also keep it secure.
Your access token is a personal identifier for requests made to OpenAI services. Never share it with anyone, and take precautions to avoid displaying it in screenshots, videos, or during screen-sharing sessions.
Treat it like you would a credit card number.
Add Your API Key to Griptape Nodes Settings
Overview
Now that you've set up your xAI account, you need to configure Griptape Nodes to use your API key. This process is straightforward.
1. Open the Griptape Nodes Settings Menu
-
Launch Griptape Nodes
-
Look for the Settings menu located in the top menu bar (just to the right of File and Edit)
-
Click on Settings to open the configuration options
2. Add your xAI API Key in API Keys & Secrets
- In the Configuration Editor, click on API Keys and Secrets on the left
- Scroll down to the GROK_API_KEY field
- Paste the API key you just generated into this field
- Close the Configuration Editor to automatically save your settings
Setup Complete
After completing these steps, you should have the ability to use models via your own Grok.ai account credentials.