SandboxClient

class baseten.client.SandboxClient(*, token, base_url, headers=None, http_client_override=None, close_http_client_on_close=None)

Bases: object

Synchronous client for one sandbox’s execution-plane API.

Can be used as a context manager to ensure the underlying HTTP client is closed on exit.

Parameters:
  • token (str)

  • base_url (str)

  • headers (Mapping[str, str] | None)

  • http_client_override (httpx.Client | None)

  • close_http_client_on_close (bool | None)

property api: ApiClient

The generated API client.

The generated API surface is not covered by stability guarantees and may change between versions.

close()

Close the client, optionally closing the underlying HTTP client.

Return type:

None

property http_client: Client

The underlying HTTP client.

property options: SandboxClientOptions

Client options.