Using the base-model API
Coding with an AI assistant? Point it at
https://infra.acsresearch.org/llms.txt— the one-page version of the docs and API reference — and it can write your client for you.
This app provides access to base models — raw next-token prediction, no chat template, no instruction tuning — served over an OpenAI-compatible /v1/completions endpoint.
What you get
- Three base models — a small one for quick tests plus two larger ones (see Models). Some are kept warm; others cold-start on first use.
- Next-token access — arbitrary prefill/continuation,
logprobsandprompt_logprobsfor likelihood/surprisal and interpretability work,echo, and SSE streaming. - Sampling controls —
temperature,top_p,top_k,min_p, penalties, and aseedfor reproducibility. - API — OpenAI-compatible
/v1/completionswith strict input validation (a misspelled parameter returns an error instead of silently defaulting) and structured JSON errors. - Browser Workbench — try prompts and manage API keys without writing code.
- Per-key budgets & usage — set token caps per key and track spend (see Account).
- Feedback — a one-click Feedback button in the Workbench for feature requests and bug reports.
Two ways in
- Workbench — prompt the models straight from your browser. Good for getting a feel before you write any code.
- The API (below) — for anything programmatic. Create a key from your API keys page (your email → API keys).
Quick start
Create a key on your API keys page (your email → API keys), then point any OpenAI-compatible client at the API:
export ACS_API_KEY="acs-bm-..." # your key
export ACS_API_BASE="https://infra.acsresearch.org/v1"
A first request with curl:
curl -s "$ACS_API_BASE/completions" \
-H "Authorization: Bearer $ACS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "llama-8b", "prompt": "The capital of France is", "max_tokens": 8}'
Or with the Python SDK (pip install openai):
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["ACS_API_BASE"],
api_key=os.environ["ACS_API_KEY"],
)
resp = client.completions.create( # completions — not chat.completions
model="llama-8b",
prompt="The capital of France is",
max_tokens=16,
logprobs=5,
)
print(resp.choices[0].text)
Worked examples
Examples has short, runnable snippets, one page per feature. The curl examples assume ACS_API_KEY + ACS_API_BASE are exported (see Quick start); the Python examples use the same openai SDK client as above.
The Colab workshop introduces base models in your browser, with no local setup. It covers completions, sampling, logprobs, reading a model's activations, and steering it to talk like a pirate.