Skip to main content

LLM API Access

Overview

You can access Large Language Models (LLMs) programmatically for your applications or scripts. The API is compatible with the OpenAI specification, allowing you to use standard tools and libraries.

How to Request an API Key

API keys are managed through the Voyager User Administration portal.

  1. Login to the Voyager portal.
  2. Navigate to the LLM Access tab.
  3. Click Create Key to generate an API token.
  4. Review the list of available models to use in your requests.

Voyager LLM Access Tab

Examples

Replace <YOUR_API_KEY> with your actual key and <MODEL_NAME> with a supported model (e.g., llama3).

curl https://openai.rc.asu.edu/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "<MODEL_NAME>",
"messages": [
{
"role": "user",
"content": "Explain quantum computing in one sentence."
}
]
}'

Troubleshooting

Common issues when using the API:

  • Authentication Failed: Ensure your API key is correct and has not expired. You can regenerate it in the Voyager portal.
  • Model Not Found: Check the "Available Models" list in Voyager to ensure you are requesting a valid model name (e.g., llama3 vs llama-3).
  • Rate Limits: If you receive a 429 error, you may be exceeding the allowed request rate. Please wait and try again.