Other Tools
MAG provides an OpenAI-compatible API. Most AI tools can connect to MAG, even if this guide has no page for the tool.
Applications with settings
-
In the settings of the tool, look for a provider named OpenAI Compatible, Custom OpenAI, or LiteLLM.
-
Enter the base URL and the PAT:
Setting Value Base URL https://mag.genesis.americansciencecloud.org/v1API key Your PAT Model A MAG model name -
Send a test prompt.
Some tools with a LiteLLM provider ask for the base URL without /v1. If a request fails with a 404 error, remove /v1 or add it.
Command-line tools
Many command-line tools read the OpenAI environment variables:
export OPENAI_API_KEY="$AMSC_TOKEN"
export OPENAI_BASE_URL="https://mag.genesis.americansciencecloud.org/v1"
The variable AMSC_TOKEN contains your PAT. See Step 4. Some tools use OPENAI_API_BASE instead of OPENAI_BASE_URL. Check the documentation of the tool.
Model names
Use the MAG model names. See Model Selection & Options. To select the provider that serves the model, send the header X-AmSC-MAG-Provider. See Model Selection & Options.
Tools that do not work
A tool that works only with a fixed vendor endpoint and has no setting for a base URL cannot connect to MAG.