Goose

Goose is an agent for the terminal and desktop. This guide adds the exchange as a custom OpenAI-compatible provider. The provider file holds the URL, the model metadata and the headers.

Each team member can use the same file with a separate buyer key.

Start with the Liquid CLI

The Liquid CLI starts Goose with the exchange as its provider. It sets the base URL, the key and the model for that process only. It writes no file of yours. Use it unless you must keep the settings in your own files.

curl -fsSL https://inference.ai.exchange/cli/install.sh | bash
liquid login
liquid goose

Add --model liquid.auto:cheapest to rank the offers by price, or --cap 0.50 to limit what one request can cost. To set up Goose yourself, follow the steps below.

Before you start

Get the CLI or Desktop from the Goose 1.53.0 release.

1. Install Goose CLI

curl -fsSL https://github.com/aaif-goose/goose/releases/download/v1.53.0/download_cli.sh | GOOSE_VERSION=1.53.0 CONFIGURE=false bash
export PATH="$HOME/.local/bin:$PATH"

The installer places the CLI in ~/.local/bin. The second command adds this directory to the PATH of the current shell.

2. Create the provider directory

mkdir -p ~/.config/goose/custom_providers

Goose uses ~/.config/goose on macOS and Linux. These commands assume the default directory.

3. Export the buyer key

Replace the placeholder with your buyer key. Use the same shell for each CLI command below.

export LIQUID_API_KEY=sk-liquid-...
Setting Purpose
LIQUID_API_KEY The buyer key that Goose reads from the shell.

Keep this key outside the provider file. Do not share it. Each team member must use their own key.

4. Write the provider file

This command replaces only custom_liquid.json. Other provider files and the main Goose configuration stay unchanged.

cat > ~/.config/goose/custom_providers/custom_liquid.json <<'EOF'
{
  "name": "custom_liquid",
  "engine": "openai",
  "display_name": "Liquid Inference",
  "api_key_env": "LIQUID_API_KEY",
  "base_url": "https://router.inference.ai.exchange/v1/chat/completions",
  "models": [
    {
      "name": "liquid.auto",
      "context_limit": 128000
    }
  ],
  "headers": {
    "X-Title": "Goose",
    "x-liquid-cap-usd": "1.00"
  },
  "supports_streaming": true,
  "requires_auth": true,
  "dynamic_models": true
}
EOF
Setting Purpose
name The provider ID for CLI commands.
engine Selects the OpenAI-compatible engine.
display_name The provider name in the model picker.
base_url The full Chat Completions URL, with /v1/chat/completions.
api_key_env Names the variable that holds the buyer key.
models Supplies the selected model and its context limit.
context_limit The number of tokens in the selected model's context window.
headers Sets the request headers below.
dynamic_models Enables native model discovery from GET /v1/models.
X-Title Identifies Goose on the receipt.
x-liquid-cap-usd Limits the charge for each request.
requires_auth Requires a buyer key.
supports_streaming Enables response streaming.

For the file format, see Goose custom providers.

5. Check it works

goose run --provider custom_liquid --model liquid.auto --no-profile --with-builtin developer --max-turns 6 --text "Reply with the word ready"

The command selects the provider and model. --no-profile omits default extensions. --with-builtin developer supplies local file and shell tools.

The answer must contain ready. Open Credits → Receipts to check the charge and the Goose client label.

6. Start a session

goose session --provider custom_liquid --model liquid.auto --no-profile --with-builtin developer

To use another model, change --model. Use an exact model, a router model or a preset. See Connect an app.

To set a default provider and model for future sessions, run this command. Select Configure Providers, then Liquid Inference, then a model.

goose configure

Use Goose Desktop

The CLI and Desktop use the same provider directory on macOS and Linux. Install Desktop from the release above. Write the provider file from step 4 before you open Desktop.

Desktop does not inherit the environment of a terminal when you start it from the launcher. Store the buyer key through Desktop instead:

  1. Open Settings → Models → Configure providers.
  2. Select Liquid Inference.
  3. Enter your buyer key in the API Key field.
  4. Select Update Provider.
  5. Open Settings → Models → Switch models.
  6. Select Liquid Inference.
  7. Select your model from the list.
  8. Select Select model.
  9. Start a session with a short request.
  10. Check its receipt for the Goose client label.

Goose stores the key in its keychain. If the keychain is unavailable or disabled, Goose uses secrets.yaml. Keep that file private.

Do not create a second custom provider through Desktop. Use the shared custom_liquid.json file, so each team member has the same headers and URL.

See Goose provider setup for the Desktop controls.

Control the cost

The x-liquid-cap-usd header limits each request. Change its value in the provider file to set a different cap.

A task can cause several requests, and the request cap does not limit the total charge. Set a spend limit on the key to limit total spend. See API keys.

Use a preset for other purchasing rules. See Purchasing rules.

Troubleshooting

Symptom Cause and fix
goose is absent from PATH. Add ~/.local/bin to PATH in the shell that starts Goose.
The provider is absent. Check the provider directory. Check that custom_liquid.json is valid JSON. Restart Goose.
Goose cannot get LIQUID_API_KEY. Export the key in the CLI shell. In Desktop, configure the key through the provider controls.
401 Check that the key is valid and has not expired.
403 Check the key's spend scope, address restriction and preset rules.
402 Add credit to the workspace or check the key's spend limit.
404 Keep the full /v1/chat/completions URL in base_url.
The model is absent. Check the live offers and the workspace presets. Use --model to select an exact name.
output_bound_unsupported Select a model with a live offer that accepts the requested output limit.
cap_exceeds_buyer_cap Increase the request cap or select a cheaper model.

See Errors for the exchange's error codes and causes.

Next steps