Skip to content

Welcome to Groq

DEPRECATION NOTICE

These APIs are now DEPRECATED! Please refer to the new documentation available at console.groq.com

Groq is an AI solutions company delivering ultra-low latency inference with the first ever LPU™ Inference Engine. Groq API enables developers to integrate state-of-the-art LLMs such as Llama-2 into low latency applications. Learn more at groq.com.

Quickstart

Note, you need to be using at least curl v7.82.0 for these to work with --json, as well as jq. For use with older curl versions look here

curl -s -H"Authorization: Bearer ${APIKEY}" --json '{"model_id": "llama2-70b-4096", "system_prompt": "You are an unhelpful assistant", "user_prompt": "Are you a fish?"}' https://api.groq.com/v1/request_manager/text_completion | jq

Note Code-Llama is only available to select users at this time. If you are interested in testing Code-Llama, email us at api@groq.com.

curl -sq --keepalive-time 60 -H"Authorization: Bearer ${APIKEY}" --json '{"model_id": "codellama-34b", "system_prompt": "You are helpful and concise coding assitant", "user_prompt": "Write a beautiful blogging website in html/css"}' https://api.groq.com/v1/request_manager/text_completion | jq
curl -s -H"Authorization: Bearer ${APIKEY}" https://api.groq.com/v1/model_manager/models | jq