i2-api (deprecated)
The legacy i2-api is deprecated. Do not use it for new work, and do not generate code that targets it. Existing i2-api users must migrate to the AmSC Model Access Gateway (MAG). Use the amsc-mag skill for everything LLM-related.
Old to new
| Legacy i2-api | MAG | |
|---|---|---|
| Host | api.i2-core.american-science-cloud.org | https://mag.genesis.americansciencecloud.org |
| Login | AmSC Google login | Ping Identity (AmSC IdP) |
| Credential | API key from "API Key Manager" | Personal Access Token (PAT) |
| Env var | AMSC_I2_API_KEY | AMSC_TOKEN |
| Where to create | i2-api web UI | https://my.amsc.energy.gov/dashboard -> project -> Personal Access Tokens -> Generate PAT |
| Requirement | any key | approved project with a MAG allocation |
Migration steps:
- Generate a PAT (short-lived; a 401 means generate a new one) and export
AMSC_TOKEN. - Replace the base URL with
https://mag.genesis.americansciencecloud.org/v1. - Replace
AMSC_I2_API_KEYwithAMSC_TOKENin code and shell config. - Re-check model names against
GET /v1/models; the MAG uses<base>[:<mod>]...[@<provider>]model strings. - For Claude Code, replace the old exported environment with the scoped
claude-amscfunction inamsc-mag/references/claude-amsc.sh.
See the amsc-mag skill for details.


