Quickstart
Get up and running with the Groq API in a few minutes.
Create an API Key
Please visit here to create an API Key.
Set up your API Key (recommended)
Configure your API key as an environment variable. This approach streamlines your API usage by eliminating the need to include your API key in each request. Moreover, it enhances security by minimizing the risk of inadvertently including your API key in your codebase.
In your terminal of choice:
Requesting your first chat completion
Execute this curl command in the terminal of your choice:
Execute this curl command in the terminal of your choice:
Install the Groq JavaScript library:
Performing a Chat Completion:
Now that you have successfully received a chat completion, you can try out the other endpoints in the API.
Install the Groq Python library::
Performing a Chat Completion:
Now that you have successfully received a chat completion, you can try out the other endpoints in the API.
Pass the following as the request body:
Now that you have successfully received a chat completion, you can try out the other endpoints in the API.
Next Steps
- Check out the Playground to try out the Groq API in your browser
- Join our GroqCloud developer community on Discord
- Chat with our Docs at lightning speed using the Groq API!
- Add a how-to on your project to the Groq API Cookbook