Welcome to the L&S AI Inference platform – an on‑premises large‑language‑model service for UCSB students, staff, and faculty, hosted entirely on UCSB infrastructure. This guide shows you how to get access and start interacting with the model.
Instructions
Note – No API key or additional configuration is required for this workflow.
If you need to call the model from code, a personal API key can be generated in the portal (see “API Key” note below). The key is not required for the browser chat.
API Key note (optional)
To use the Python client,
aider,opencode, or VS Code extensions, obtain an API key from the L&S API portal at https://api.ai.college.ucsb.edu. Keep the key secret – never commit it to source control.
Pick the interaction method that best fits your use case. All alternatives point to the same underlying L&S endpoint (https://api.ai.college.ucsb.edu/v1).
| Workflow | How to Use | Key Points |
|---|---|---|
| Browser chat only | Use the web UI you just opened. | No extra setup. |
| Python scripts / notebooks | Run a Python script using the OpenAI client. | See Python Quickstart for more examples. |
| Coding agents | See the “Coding agents” section below for details on Aider, Opencode, Continue, and Pi‑dev. |
from openai import OpenAI
client = OpenAI(api_key="YOUR_KEY", base_url="https://api.ai.college.ucsb.edu/v1")
response = client.chat.completions.create(model="gemma-4-31b", messages=[{"role":"user","content":"Hello!"}])
print(response.choices[0].message.content)
All inference runs on UCSB hardware. Your input stays within campus infrastructure except when the Web‑search feature in the Open WebUI is enabled; that query is sent to an external search engine. Disable web‑search for sensitive topics.
Do NOT submit any of the following:
When in doubt, leave it out.
| Goal | Resource |
|---|---|
| Learn the chat interface | Open WebUI Guide |
| Choose the right model | Model Selection |
| Manage long conversations | Context‑Windows Guide |
| Use the API with Python | Python Quickstart |
| Use curl or other languages | cURL & REST Quickstart |
| Set up aider | Aider Guide |
| Set up opencode | Opencode Guide |
| Set up Continue in VS Code | Continue‑VSCode Guide |
| Set up Pi‑dev | Pi‑dev Guide |