Connect → llm
Use AxForge with llm
llm (Simon Willison's CLI) talks to models from the terminal. Register AxForge as an OpenAI-compatible model with one config file.
Get llm
A terminal tool, installed from PyPI:
$ python -m pip install llm
Or, if you use uv,
uv tool install llm. Documentation:
llm.datasette.io.
1. Add the model
Create extra-openai-models.yaml in llm's config dir — find it with
dirname "$(llm logs path)":
# extra-openai-models.yaml
- model_id: axforge # the name you'll pass to -m
model_name: chat # the model id the API expects
api_base: "https://api.axforge.ai/v1"
api_key_name: axforge # the NAME of a stored key (below)
2. Store the key & call it
$ llm keys set axforge # paste your AxForge key at the prompt
$ llm -m axforge "Say hello in one line"
$ llm models # axforge should appear in the list
Include /v1, and mind api_key_name.
llm's OpenAI client appends /chat/completions, so api_base
must be https://api.axforge.ai/v1 (some local-server examples omit it —
don't copy that here). api_key_name is the name of the key you
set with llm keys set, not the key value.
Check that it worked
Two things, and the second is the one that proves it end to end:
llm modelslistsaxforgeamong the models. If it does not, the YAML is in the wrong directory.llm -m axforge 'hello'answers.- The call appears in the console at Billing & usage within a minute or two. Nothing else confirms that your key reached our API — a reply alone could be a cache or another provider.
When it does not work
| What you see | What it means | Fix |
|---|---|---|
axforge not in llm models | the file is not in llm's config directory | find it with dirname "$(llm logs path)" — it is not your project folder |
401 | the key | llm keys set axforge, or the key in the YAML |
Unknown model | a typo in model_id | the id you call must match the one in the file |
Run the self-test first when you are unsure — it says in one click whether the problem is your key, your quota or us, so you know whether the tool is worth debugging at all.