Skip to content

aichat

aichat is a powerful AI chat CLI that supports multiple providers via its OpenAI-compatible client configuration.

Prerequisites

  • A running Corveil instance (see deployment options)
  • A Corveil virtual API key (sk-citadel-...)
  • aichat installed (brew install aichat or cargo install aichat)

Mode

Direct mode only. aichat uses the OpenAI-compatible client type, which sends your Corveil key as the standard API key.

1. Configure aichat

Open your aichat config file. Run aichat --info to find its location, then add a Corveil client:

yaml
clients:
- type: openai-compatible
  name: corveil
  api_base: https://your-corveil-host/v1    # must include /v1
  api_key: sk-citadel-your-key-here
  models:
  - name: or-claude-haiku-4.5
  - name: or-gpt-5.1

Replace your-corveil-host with your Corveil URL and sk-citadel-your-key-here with your virtual API key. List any models your key has access to — check GET /v1/models for the full list.

2. Start chatting

bash
# One-shot query
aichat -m corveil:or-claude-haiku-4.5 "Explain zero-trust architecture"

# Interactive session
aichat -m corveil:or-claude-haiku-4.5

Troubleshooting

  • 401 Unauthorized: Verify your api_key matches a valid Corveil virtual API key
  • Connection refused: Ensure your Corveil instance is running and the api_base URL is reachable
  • Model not found: Check that the model names match models available through your Corveil instance (GET /v1/models)
  • Missing /v1 in URL: The api_base must include the /v1 path suffix