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.

  • Base URL: https://openai.rc.asu.edu/v1. Include the /v1: off campus, paths without it are refused.
  • Where it works: anywhere, on or off campus, without the VPN. Only the Voyager portal, where you manage keys, needs the ASU network or the SSLVPN.
  • Cost: none. Every model runs on Research Computing hardware at ASU.
Want an AI assistant that edits your code, not just an API?

Getting Started with AI walks you from zero to a working setup — key, assistant, agents, and skills — and assumes no prior experience. This page is the API reference underneath it.

How to Request an API Key​

API keys are managed through the Voyager User Administration portal.

  1. Log in to the Voyager portal.
  2. Open your profile and select the Keys tab. The API keys button on the AI LLM tab opens it too.
  3. Click Create API key. You can name the key and, optionally, limit it to allowed networks. The full key is shown only once, so copy it before closing the dialog. Keys start with obl_.
  4. Review the list of available models on the AI LLM tab to use in your requests.
Keys marked Legacy

Keys marked Legacy go through the older gateway, which is being retired. They keep working for now, but newer endpoints such as Verdicts are only on the current gateway. Click Rotate on the AI LLM tab to move a key: you get a new key to put in your code, and the old one stops working immediately.

Voyager AI LLM tab

Examples​

Replace <YOUR_API_KEY> with your actual key and <MODEL_NAME> with a supported model (e.g., qwen38-27b).

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."
}
]
}'

What you can call​

EndpointWhat it doesGuide
POST /v1/chat/completionsChat: streaming, reasoning effort, function calling, structured output, images in the promptChat completions
POST /v1/responses, POST /v1/messagesThe same chat models through the OpenAI Responses and Anthropic Messages APIsResponses and Messages
POST /v1/embeddingsVectors for semantic search and RAGEmbeddings
POST /v1/images/generations, /v1/images/editsGenerate and edit imagesImage generation
POST /v1/audio/speechText-to-speech, including streaming audioAudio
POST /v1/audio/transcriptions, /v1/audio/translationsSpeech-to-text, and translation into EnglishAudio
POST /v1/videosShort video clips, as jobsVideo generation
POST /v1/files, /v1/batchesThousands of requests in one file, run in the background on spare capacityBatches
POST /v1/searchWeb search results for your codeWeb search
POST /v1/verdictsTyped answers (yes/no, choice, score) with probabilitiesVerdicts API
GET /v1/modelsEvery model and what it supportsbelow

Use Python​

For real projects, keep secrets out of source files by reading them from the environment.

Install the SDK into your virtual environment with Mamba:

mamba install -c conda-forge openai

Set the connection values in your shell (or a .env file that you keep out of source control). Read the key in from a prompt so it does not land in your shell history:

read -rs OPENAI_API_KEY # paste your key, then press Enter (nothing is echoed)
export OPENAI_API_KEY
export OPENAI_BASE_URL="https://openai.rc.asu.edu/v1"

To set it permanently, add the export line to ~/.zshrc or ~/.bashrc by editing the file in a text editor rather than echoing the key into it — an echo command containing your key is itself recorded in your history.

Keep the key out of your shell history

Anything typed at a prompt is written in plain text to ~/.zsh_history, ~/.bash_history, or PowerShell's ConsoleHost_history.txt. The same goes for the placeholder keys in the examples above: substitute a variable rather than pasting the real value. If a key is exposed, regenerate it in the Voyager portal — rotating it invalidates the old one.

Your Python code can then read the key and base URL from the environment automatically:

from openai import OpenAI

client = OpenAI() # reads OPENAI_API_KEY and OPENAI_BASE_URL from the environment

response = client.chat.completions.create(
model="<MODEL_NAME>",
messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)

Use an AI coding assistant​

Prefer to build with an AI assistant that can read your project and edit files? These options connect to this same RC gateway with your key:

  • Getting Started with AI — the complete beginner path: pick a tool, set it up, and learn the prompting and agent habits that make our models work well. Start here.
  • Set up OpenCode — a free assistant with a desktop app and a terminal interface. The guide walks you through installing it, storing your key, and adding RC as a provider from scratch.
  • Connect VS Code to the RC API — use VS Code Chat with the RC gateway (Bring Your Own Key).
OpenCode: sign in, or generate a config

On the ASU network or the VPN, OpenCode can sign in with your ASU account instead of using a key. Otherwise it needs your API key and a provider config pointing at https://openai.rc.asu.edu/v1. The OpenCode tab under AI LLM in the Voyager portal generates that config, including agent roles and tool permissions. It reads the key from the ASU_AIR_API_KEY environment variable by default. See Getting Started with AI.

List available models​

curl https://openai.rc.asu.edu/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"

Each entry's id is the model value to send, and model_type says which endpoint it belongs to: chat models for chat, Responses, Messages and Verdicts; embedding, image, audio_speech, audio_transcription and video models for their own endpoints. Entries also carry the context_window, what the model supports (supports_function_calling, supports_vision, supports_response_schema), its reasoning levels, and, for models being retired, a status and replacement; Chat completions explains each field. The AI LLM › LLMs list in the Voyager portal shows the same models with badges, benchmarks and your usage.

Limits, usage and data​

  • Requests wait in a fair queue when a model is busy, and may run for up to 60 minutes. See Limits and Errors for the queue, time limits, retries and every error code.
  • Your requests, tokens and an indicative value per key and model are under AI LLM › Usage in Voyager, with a request log and CSV export.
  • The gateway keeps metadata about each request (time, key, model, token counts, status) for 180 days, not the text of prompts or replies. See Usage and data handling.

Typed answers with the Verdicts API​

When you need a yes/no answer, a category, or a score rather than prose, use POST https://openai.rc.asu.edu/v1/verdicts instead of parsing a chat reply. You send content and a set of typed questions, and each answer comes back with its probabilities and a confidence score. It is useful for screening, labeling, rubric scoring, and checking images. See Verdicts API.

Troubleshooting​

Common issues when using the API:

  • Authentication Failed (401): Ensure your API key is correct and has not expired. You can regenerate it in the portal.
  • Model Not Found (404 model 'x' is not registered): copy the model ID exactly from GET /v1/models or AI LLM › LLMs (e.g., qwen38-27b, not qwen3-8-27b).
  • SDK ignores the endpoint: If curl works but an SDK does not, confirm the SDK is using https://openai.rc.asu.edu/v1 as its base URL (the Anthropic SDK is the exception: it takes https://openai.rc.asu.edu).
  • Slow responses or 503 timed out waiting for model capacity: the model is busy and requests are queued. Retry with backoff, send fewer requests at once, or try another model. See Limits and Errors.
  • 429 token budget exceeded: a per-minute token budget is used up. Wait a minute and retry.
  • Empty content from a reasoning model: the model spent max_tokens thinking. Raise max_tokens or set reasoning_effort to none. See Reasoning effort.
  • 404 {"detail":"Not Found"} on newer endpoints: your key is a Legacy key. Rotate it.
  • 403 ip_not_allowed ("This API key can't be used from …"): the key is limited to certain networks and the request came from somewhere else. See Keys and allowed networks.