> ## Documentation Index
> Fetch the complete documentation index at: https://docs.airmux.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway only

> Run the inference gateway from local files without Postgres or a control plane.

Run a standalone gateway when you need an inference endpoint without the full platform. You manage its models, keys, and
provider credentials locally. For the webapp, workspaces, and managed usage history, use the [full platform](/docs/quickstart).

## Install

You need Python 3.13+ and uv. Clone the repository and sync the CLI package:

```bash theme={null}
git clone https://github.com/michel-tricot/airmux.git
cd airmux
uv sync --package airmux --frozen
```

Run CLI commands from this checkout with `uv run airmux`.

## Start the gateway

Set a provider key, then initialize and start the gateway. The initializer creates a local configuration and inference key:

```bash theme={null}
export OPENAI_API_KEY='your-provider-key'
airmux gateway init
airmux gateway validate
airmux gateway serve
```

The gateway runs in the foreground at `http://127.0.0.1:8080`. Keep the provider key available to the process. To use
another provider, export its key before starting the gateway. The initializer prints ready-to-run commands for your setup.

## Send a request

In another terminal, copy the inference key created by initialization and send a request using a model ID from the local
taxonomy:

```bash theme={null}
export AIRMUX_INFERENCE_KEY="$(cat .airmux/inference.key)"
curl --fail http://127.0.0.1:8080/readyz
curl --fail-with-body http://127.0.0.1:8080/inf/v1/chat/completions \
  -H "Authorization: Bearer $AIRMUX_INFERENCE_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"openai/gpt-5.4-mini","messages":[{"role":"user","content":"Hello"}]}'
```

Change the `model` value to another ID in your taxonomy. See the [inference reference](/docs/reference/inference) for
other request formats.

## Run the gateway in a container

Clone the source and build the image, then run the gateway with the local configuration mounted read-only:

```bash theme={null}
AIRMUX_CONFIG_DIR="$PWD"
AIRMUX_SOURCE_DIR="$(mktemp -d)/airmux"
git clone https://github.com/michel-tricot/airmux.git "$AIRMUX_SOURCE_DIR"
docker build -t airmux:local "$AIRMUX_SOURCE_DIR"
docker run --rm --user "$(id -u):$(id -g)" \
  --entrypoint airmux \
  --mount "type=bind,source=$PWD,target=/config,readonly" \
  -e OPENAI_API_KEY -p 8080:8081 \
  airmux:local gateway serve --config /config/.airmux/airmux.yml --host 0.0.0.0 --port 8081
```

## Customize local setup

`gateway init` creates the starter configuration and taxonomy in `.airmux`. Use `--directory` to choose another location
or `--taxonomy` to use your own model catalog. See the [configuration reference](/docs/reference/configuration) for
advanced settings.

Standalone mode has no management API, webapp, or managed usage history. Its keys share one local workspace, and
provider credentials come from environment variables. Usage events are discarded by default; see the
[event outbox settings](/docs/reference/configuration#event-outboxes) to write them to a local file.
