SandboxClientOptions

class baseten.sandbox.SandboxClientOptions(api_key, team_id=None, token_provider=None, base_url_override=None, headers=None, retry=None, http2=None)

Bases: object

Options for SandboxClient and AsyncSandboxClient.

Obtain via SandboxClient.options to inspect the values a client was constructed with.

Parameters:
api_key: str

API key for authentication.

property base_url: str

The resolved base URL for the management API.

base_url_override: str | None = None

Explicit base URL override, or None to use the default.

headers: Mapping[str, str] | None = None

Additional headers to send on every request.

http2: bool | None = None

Whether the client’s own HTTP client uses HTTP/2.

retry: SandboxRetryOptions | None = None

Retry budgets for transient failures, or None for the defaults.

team_id: str | None = None

Team to act in, or None for the caller’s only team.

token_provider: Callable[[SandboxTokenProviderContext], str] | Callable[[SandboxTokenProviderContext], Awaitable[str]] | None = None

Provider of each request’s bearer token, in place of the API key.