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.
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.
- Log in to the Voyager portal.
- Open your profile and select the Keys tab. The API keys button on the AI LLM tab opens it too.
- 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_. - Review the list of available models on the AI LLM tab to use in your requests.
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.

Examples
- curl
- Python
- JavaScript
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."
}
]
}'
You can use the standard openai Python library to interact with the API.
from openai import OpenAI
# Initialize the client with the ASU API endpoint
client = OpenAI(
base_url="https://openai.rc.asu.edu/v1",
api_key="<YOUR_API_KEY>",
)
response = client.chat.completions.create(
model="<MODEL_NAME>",
messages=[
{"role": "user", "content": "Write a hello world program in Python."},
],
)
print(response.choices[0].message.content)
You can use the official openai npm package to interact with the API.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://openai.rc.asu.edu/v1",
apiKey: "<YOUR_API_KEY>",
});
const response = await client.chat.completions.create({
model: "<MODEL_NAME>",
messages: [
{ role: "user", content: "Write a hello world program in JavaScript." },
],
});
console.log(response.choices[0].message.content);
What you can call
| Endpoint | What it does | Guide |
|---|---|---|
POST /v1/chat/completions | Chat: streaming, reasoning effort, function calling, structured output, images in the prompt | Chat completions |
POST /v1/responses, POST /v1/messages | The same chat models through the OpenAI Responses and Anthropic Messages APIs | Responses and Messages |
POST /v1/embeddings | Vectors for semantic search and RAG | Embeddings |
POST /v1/images/generations, /v1/images/edits | Generate and edit images | Image generation |
POST /v1/audio/speech | Text-to-speech, including streaming audio | Audio |
POST /v1/audio/transcriptions, /v1/audio/translations | Speech-to-text, and translation into English | Audio |
POST /v1/videos | Short video clips, as jobs | Video generation |
POST /v1/files, /v1/batches | Thousands of requests in one file, run in the background on spare capacity | Batches |
POST /v1/search | Web search results for your code | Web search |
POST /v1/verdicts | Typed answers (yes/no, choice, score) with probabilities | Verdicts API |
GET /v1/models | Every model and what it supports | below |
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.
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).
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 fromGET /v1/modelsor AI LLM › LLMs (e.g.,qwen38-27b, notqwen3-8-27b). - SDK ignores the endpoint: If curl works but an SDK does not, confirm the SDK is using
https://openai.rc.asu.edu/v1as its base URL (the Anthropic SDK is the exception: it takeshttps://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
contentfrom a reasoning model: the model spentmax_tokensthinking. Raisemax_tokensor setreasoning_efforttonone. 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.
Related guides
- Getting Started with AI — the complete beginner setup path: tools, agents, skills, and prompting.
- Set up OpenCode — connect the OpenCode AI coding assistant to the RC gateway.
- Connect VS Code to the RC API — use VS Code Chat with the RC LLM gateway (BYOK).
- Chat completions: streaming, reasoning effort, tools, structured output, vision, and the
automodel. - Keys and allowed networks: limit where a key can be used from, see where it was last used, and what Research Computing checks.
- Limits and Errors: queuing, time limits, retries, error codes, usage, and data handling.
- Verdicts API: typed answers (boolean, choice, score) with probabilities, for screening, labeling, and image checks.
- Connect AI Agents to Your RC Account: let an agent read your jobs, storage, and allocations through the Voyager MCP server.
- Tutorials & Projects — build small research tools with the API and AI coding assistance.