Use Infersia with aichat
The all-in-one LLM CLI — shell assistant, chat REPL, RAG and agents
aichat treats openai-compatible as a first-class client type, so adding Infersia is a short block of YAML and no plugin. The result is your terminal running on DeepSeek V4 Flash at its full 1,048,576-token context — which is what you want the moment you start piping repositories and logs into --file.
Before you start
- aichat installed. If
aichat --versionprints a version, you’re set — otherwisebrew install aichat, or see the project’s own install notes. - An Infersia API key. Create one at infersia.com/dashboard/keys. It starts with
isk-v1-. Copy it somewhere now — the dashboard shows it once.
No credit card needed to try: qwen/qwen3-8b:free runs at no cost, up to 50,000 tokens a day.
Know your way around already?
These are the only values that change. Everything below is the same thing, slowly.
- Client type
- openai-compatible
- API base
https://api.infersia.com/v1- Model reference
infersia:deepseek/deepseek-v4-flash-0731- API key
- isk-v1-… create one
Setting it up
aichat keeps everything in one config file, and adding a provider means editing it. That is true whether or not you have used aichat before — the setup wizard only runs when there is no config file at all.
Find your config file
aichat will tell you where it lives:
aichat --info | grep config_fileOn macOS and Linux that is normally ~/.config/aichat/config.yaml, and on Windows %APPDATA%\aichat\config.yaml. If the file doesn’t exist yet, see the first-run wizard below instead.
Add Infersia as a client
Add this to the clients: list. If your file already has other clients, append it as another list item — don’t replace them.
model: infersia:deepseek/deepseek-v4-flash-0731
clients:
- type: openai-compatible
name: infersia
api_base: https://api.infersia.com/v1
api_key: isk-v1-your-key-here
models:
- name: deepseek/deepseek-v4-flash-0731
max_input_tokens: 1048576
supports_function_calling: true
- name: qwen/qwen3.6-35b-a3b
max_input_tokens: 262144
supports_function_calling: true
supports_vision: true
- name: qwen/qwen3-14b
max_input_tokens: 131072
supports_function_calling: true
- name: qwen/qwen3-8b
max_input_tokens: 40960
supports_function_calling: true
- name: qwen/qwen3-8b:free
max_input_tokens: 40960
supports_function_calling: trueThe name: infersia line is what turns into the infersia: prefix on every model reference. Call it something else and the prefix changes to match.
Or start smaller
You don’t have to list every model. This is enough to get going on the free tier, and you can add the others later:
model: infersia:qwen/qwen3-8b:free
clients:
- type: openai-compatible
name: infersia
api_base: https://api.infersia.com/v1
api_key: isk-v1-your-key-here
models:
- name: qwen/qwen3-8b:free
max_input_tokens: 40960Check it works
aichat --list-models # should print five infersia: entries
aichat "Say hello in exactly three words."A reply means you’re done. The request will also appear in your activity log within a few seconds, with its token counts and exact cost.
Don’t leave out max_input_tokens
This is the one setting worth being careful about. aichat uses max_input_tokens to decide when to compress a session and whether a --file payload will fit, and it has no way to discover the figure on its own — its model discovery reads names from /v1/models and nothing else.
Omit it on DeepSeek V4 Flash and you have a 1M-context model that aichat will start compressing early, which is the opposite of why you chose it. The values in the block above are the real ones; they are also on each catalogue page if you add a model later.
Installing aichat for the first time?
If you have no config file yet, running aichat offers to build one. Answer yes, then pick openai-compatible from the provider list — it is the second entry, above all the named platforms. It then asks for four things:
Provider Name: infersia
API Base: https://api.infersia.com/v1
API Key: isk-v1-your-key-here
LLMs to include: (multi-select, fetched from your endpoint)That last step calls /v1/models and offers our catalogue as a checklist, so you don’t have to type model ids. What it cannot fill in is max_input_tokens — so once the wizard has written the file, open it and add the limits from the block above.
The wizard is genuinely first-run only. There is no command that adds a second provider later, so if aichat is already configured for something else, ignore this section and edit the file.
Switching models
Every model is addressed as infersia: plus its id, including the publisher prefix:
# one-off, from your shell
aichat -m infersia:qwen/qwen3-8b:free "summarise this"
# inside the REPL
.model infersia:qwen/qwen3.6-35b-a3bThe model: key at the top of the config sets the default when you don’t pass -m.
The shell assistant
This is what most people install aichat for, and it is the workload our pricing suits best — hundreds of very short requests a day, where a cheap model is indistinguishable from an expensive one:
aichat -e "find every file over 100MB under my home directory"
aichat -c "a bash function that retries a command three times"qwen/qwen3-8b is a good default here — a one-line shell command does not need a 284B model, and at $0.05 per million input tokens a heavy day of -e costs less than a cent. Set it per-invocation with -m, or keep it as the default and reach for DeepSeek when you’re piping in real files.
Which model to pick
deepseek/deepseek-v4-flash-0731
The one to use with --file, RAG and long sessions. Tool calling, and the full 1,048,576-token window — a directory of source files or a day of logs fits without thinking about it.
qwen/qwen3-8b
The shell-assistant default. Fast, cheap, and entirely adequate for -e and -c.
qwen/qwen3-8b:free
The same model at no cost, 50,000 tokens a day, no card. Good for confirming the setup works before you decide anything.
qwen/qwen3.6-35b-a3b
Accepts images, so it is the one to point at a screenshot with --file.
If something goes wrong
- “Incorrect API key provided”
- Check the key was pasted whole — they are long, and a partial copy is the usual cause. Confirm it independently of aichat:A JSON list of models means the key is good and the problem is in the config.
curl https://api.infersia.com/v1/models \ -H "Authorization: Bearer isk-v1-your-key-here" --list-modelsshows nothing from us- Almost always YAML indentation. The
models:list belongs inside the client entry, at the same level asapi_base— not at the top of the file. Compare against the block above, and checkaichat --infois reading the file you edited. - “Model not found”
- Model ids include the publisher prefix, and the reference includes the client name on top of that —
infersia:qwen/qwen3-8b, notqwen3-8b. The exact strings are on the catalogue page, each with a copy button. - Sessions compress sooner than you expect
- That is
max_input_tokensmissing or set low — see the note above. aichat also has its owncompress_threshold, which defaults to 4,000 tokens and is independent of the model’s window; raise it in the config if you want long sessions kept verbatim. - Does
--sync-modelsoverwrite this? - No. That command refreshes aichat’s own registry of built-in providers, which is separate from the client you defined. We checked: running it leaves this configuration untouched.
Why a client block and not a menu entry
aichat ships a list of built-in providers compiled into the binary, and we are not on it. The block above is not a workaround for that — openai-compatible is a supported client type with its own entry in the setup wizard, and it is the same mechanism aichat’s own documentation uses for Ollama. The only thing a built-in entry would save you is typing the base URL once.
Still stuck?
Write to support@infersia.com with what you tried and the error text. If you maintain a tool and want your users routed here, the partner programme pays you a share of what they spend.
aichat is an open-source project by sigoden, published under the Apache 2.0 and MIT licences. Its name is used here only to identify the software these instructions are for. Infersia is not affiliated with or endorsed by the project.