Get Started with AISIX OSS
The open-source AISIX gateway runs directly from a declarative resources.yaml file, without a control plane. In this quickstart, you start the gateway in one Docker container and declare the required provider key, model, and caller API key. You then verify the first request through its OpenAI-compatible API.
This setup does not require a dashboard, control plane, or separate configuration store, making it the fastest way to evaluate the gateway locally. The example uses OpenAI as the upstream provider. Your client authenticates to AISIX with a caller API key, while the gateway uses a separate provider key to authenticate to OpenAI.
The request follows this path:
When the client requests the AISIX model name gpt-4o-mini, the gateway authenticates the request with the caller API key and uses the stored provider key to call OpenAI. The upstream OpenAI key is never exposed to the client.
Prerequisites
- Install Docker to run the AISIX gateway container.
- Install cURL to send requests to the gateway.
- Prepare an OpenAI API key for an account with access to
gpt-4o-miniand available quota.
Create the Resources File
First, create a working directory:
mkdir aisix-quickstart
cd aisix-quickstart
Provider keys, models, and caller API keys are declared together in one resources.yaml file. Create it:
_format_version: "1"
provider_keys:
- display_name: openai-main
provider: openai
adapter: openai
api_key: ${OPENAI_API_KEY}
api_base: https://api.openai.com/v1
models:
- display_name: gpt-4o-mini
provider: openai
model_name: gpt-4o-mini
provider_key: openai-main
api_keys:
- display_name: quickstart-caller
key_env: CALLER_API_KEY
allowed_models:
- gpt-4o-mini
❶ _format_version: "1" is mandatory and must be a quoted string. It pins the file format so a future revision can never silently misread this file.