Docs / Connect

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:

  1. llm models lists axforge among the models. If it does not, the YAML is in the wrong directory.
  2. llm -m axforge 'hello' answers.
  3. 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 seeWhat it meansFix
axforge not in llm modelsthe file is not in llm's config directoryfind it with dirname "$(llm logs path)" — it is not your project folder
401the keyllm keys set axforge, or the key in the YAML
Unknown modela typo in model_idthe 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.

Anything unclear on this page?

Ask on the forum — the answer helps the next person too.

Ask about this page
© 2026 AxForge · EU-hosted AI infrastructure Docs Models For AI axforge.ai Pricing Trust Acceptable use Community guidelines