Skip to main content
To see available models on GroqCloud, you can programmatically check by sending a request to our models endpoint for a JSON list of all models or visit our API documentation at https://console.groq.com/docs/models:

import requests
import os

api_key = os.environ.get("GROQ_API_KEY")
url = "https://api.groq.com/openai/v1/models"

headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)

print(response.json())
Be the first to reply!

Reply