Skip to main content
Grid commands are in pre-release and support macOS and Linux. Their arguments, flags, and output can change.
A connection lets routes use an external provider without storing that provider’s API key in each route. It points to an existing team secret. To rotate credentials for every route that uses a connection, update the connection to point to another secret; the routes don’t change.

list

List connections across your teams; use --team to select one. In scripts that expect results from one team, always pass --team.

Options

TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID. Omit to list across all accessible teams.
BOOL
Enable verbose logging

Examples

List connections across your teams:

Filter output with --jq

Print connection IDs:

Output

Text mode (--output text): Table with ID, TEAM ID, TEAM NAME, PROVIDER, and SECRET NAME columns. Lists all pages; secret values are never returned. JSON mode (--output json): Returns an items array of connections.

create

The secret must belong to the connection’s team. Creating a connection requires team admin. If you belong to one team, --team is optional. If you belong to several, specify a team.

Options

TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
required
Upstream provider.One of: anthropic, openai, xai
TEXT
required
Name of an existing secret in the connection’s team.
TEXT
Team name or ID. Omit to use your only team; required when you belong to several.
BOOL
Enable verbose logging

Examples

Connect Anthropic using a team secret:

Filter output with --jq

Print the new connection ID:

Output

Text mode (--output text): Confirmation on stderr; JSON contains the created connection. JSON mode (--output json): Returns the created connection.

update

Updating a connection requires team admin. The provider must match the existing connection. You can’t change the provider or owning team.

Options

TEXT
required
Connection ID.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
required
Upstream provider.One of: anthropic, openai, xai
TEXT
required
Name of an existing secret in the connection’s team.
BOOL
Enable verbose logging

Examples

Change the secret used by a connection:

Filter output with --jq

Print the updated secret metadata:

Output

Text mode (--output text): Confirmation on stderr; JSON contains the updated connection. JSON mode (--output json): Returns the updated connection.

delete

Requires team admin. Leaves the referenced secret in place. Pass --yes to skip confirmation.

Options

TEXT
required
Connection ID.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Skip confirmation; required when stdin is not a terminal.
BOOL
Enable verbose logging

Examples

Delete a connection:

Filter output with --jq

Print the deleted ID:

Output

Text mode (--output text): Confirmation on stderr; JSON contains the deleted connection ID. JSON mode (--output json): Returns the deleted connection’s ID.