What is the base url / path for Groq API?

The base path for Groq's OpenAI-compatible API is https://api.groq.com/openai/v1.

For example, the chat completions endpoint is https://api.groq.com/openai/v1/chat/completions.

An example call to our API would look like this:

curl https://api.groq.com/openai/v1/chat/completions -s \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GROQ_API_KEY" \
-d '{
"model": "llama-3.3-70b-versatile",
"messages": [{
"role": "user",
"content": "Explain the importance of fast language models"
}]
}'

Review the full API documentation here: https://console.groq.com/docs/overview