Skip to content
Sign Up Free
Coding Agent setup

Goose setup: API key, Base URL, and models

Configure Goose with a BetterToken API Key, the correct OpenAI host, and a Model ID. Enable the developer extension and verify a text request.

Connect Goose to BetterToken using its OpenAI provider. In macOS testing with a GPT model, Goose 1.55.0 completed text requests and file-reading tool calls through /v1/responses.

Key settings

FieldValue
API KeyBetterToken API Key in OPENAI_API_KEY
Base URLhttps://bettertoken.ai in OPENAI_HOST, without /v1
ModelYOUR_MODEL_ID in GOOSE_MODEL
ProviderGOOSE_PROVIDER=openai

Prerequisites

Install

Use the official Goose installer:

Terminal window
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
goose --version

Manual setup

Replace YOUR_API_KEY and YOUR_MODEL_ID before running:

Terminal window
export GOOSE_PROVIDER="openai"
export GOOSE_MODEL="YOUR_MODEL_ID"
export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_HOST="https://bettertoken.ai"

OPENAI_HOST takes the site root. Keep /v1 out of this field, even though the provider is OpenAI.

For file access, run goose configure, choose Toggle Extensions, and enable developer. The developer extension supplies file and shell tools.

Verify the connection

Run this command in the same terminal:

Terminal window
goose run --no-session --max-turns 4 -t "Reply with only: OK"

Check that the final answer is OK. To check file access separately, run Goose in your project and ask it to read a known file; check both the tool result and final answer.

Switch models

Set GOOSE_MODEL to another exact Model ID from the model plaza, then start a new run.

Common errors

SymptomWhat to check
Authentication failsCheck OPENAI_API_KEY in the terminal running Goose.
Wrong request URLSet OPENAI_HOST to https://bettertoken.ai, without /v1 or an endpoint suffix.
File tools are unavailableEnable the developer built-in extension with goose configure.
Requests still use ResponsesIn Goose 1.55.0 testing, even OPENAI_BASE_PATH=v1/chat/completions did not change the tested model’s route from /v1/responses. Check the actual request path.

Technical details

The tested text and file-reading requests used /v1/responses. Provider names and environment variable names alone do not establish which protocol Goose selects for another model.