AsyncInferenceClient¶
- class baseten.client.AsyncInferenceClient(*, api_key, headers=None, model_id=None, chain_id=None, environment=None, base_url_override=None, http_client_override=None, close_http_client_on_close=None)¶
Bases:
objectAsynchronous client for the Baseten Inference API.
Can be used as an async context manager to ensure the underlying HTTP client is closed on exit.
- Parameters:
- property api: AsyncApiClient¶
The generated API client.
The generated API surface is not covered by stability guarantees and may change between versions.
- async close()¶
Close the client, optionally closing the underlying HTTP client.
- Return type:
None
- classmethod default_base_url(*, model_id=None, chain_id=None, environment=None)¶
Compute the default inference base URL.
See
InferenceClient.default_base_url()for details.
- property http_client: AsyncClient¶
The underlying HTTP client.
- property options: InferenceClientOptions¶
Client options.