AsyncApiClient¶
- class baseten.client.inferenceapi.AsyncApiClient(http_client)¶
Bases:
objectGenerated HTTP client for the Baseten API.
Methods on this client are generated from the OpenAPI specification and are NOT covered by any stability or compatibility guarantees. They may change without notice between versions.
- Parameters:
http_client (httpx.AsyncClient)
- async async_predict(*, env_name, body)¶
Asynchronously call a named environment of a model.
- Parameters:
env_name (str)
body (AsyncPredictRequest)
- Return type:
- async async_predict_deployment(*, deployment_id, body)¶
Asynchronously call a specific deployment of a model.
- Parameters:
deployment_id (str)
body (AsyncPredictRequest)
- Return type:
- async async_predict_development(*, body)¶
Asynchronously call the development deployment of a model.
- Parameters:
body (AsyncPredictRequest)
- Return type:
- async async_predict_production(*, body)¶
Asynchronously call the production environment of a model.
- Parameters:
body (AsyncPredictRequest)
- Return type:
- async async_predict_regional(*, body)¶
Asynchronously call a regional environment of a model.
- Parameters:
body (AsyncPredictRequest)
- Return type:
- async async_run_remote(*, env_name, body)¶
Asynchronously call a named environment of a chain.
- Parameters:
env_name (str)
body (AsyncRunRemoteInput)
- Return type:
- async async_run_remote_deployment(*, deployment_id, body)¶
Asynchronously call a specific deployment of a chain.
- Parameters:
deployment_id (str)
body (AsyncRunRemoteInput)
- Return type:
- async async_run_remote_development(*, body)¶
Asynchronously call the development deployment of a chain.
- Parameters:
body (AsyncRunRemoteInput)
- Return type:
- async async_run_remote_production(*, body)¶
Asynchronously call the production environment of a chain.
- Parameters:
body (AsyncRunRemoteInput)
- Return type:
- async async_run_remote_regional(*, body)¶
Asynchronously call a regional environment of a chain.
- Parameters:
body (AsyncRunRemoteInput)
- Return type:
- async cancel_async_request(*, request_id)¶
Cancel a queued async request.
- Parameters:
request_id (str)
- Return type:
- async get_async_queue_status(*, env_name)¶
Get async queue status for a named environment.
- Parameters:
env_name (str)
- Return type:
- async get_async_queue_status_deployment(*, deployment_id)¶
Get async queue status for a specific deployment.
- Parameters:
deployment_id (str)
- Return type:
- async get_async_queue_status_development()¶
Get async queue status for the development deployment.
- Return type:
- async get_async_queue_status_production()¶
Get async queue status for the production environment.
- Return type:
- async get_async_queue_status_regional()¶
Get async queue status for a regional environment.
- Return type:
- async get_async_request_status(*, request_id)¶
Get the status of an async request.
- Parameters:
request_id (str)
- Return type:
- async predict(*, env_name, body)¶
Call the model deployment associated with a specified environment.
- Parameters:
env_name (str)
body (PredictInput)
- Return type:
- async predict_deployment(*, deployment_id, body)¶
Call a specific deployment of a model by deployment ID.
- Parameters:
deployment_id (str)
body (PredictInput)
- Return type:
- async predict_development(*, body)¶
Call the development deployment of a model.
- Parameters:
body (PredictInput)
- Return type:
- async predict_production(*, body)¶
Call the production environment of a model.
- Parameters:
body (PredictInput)
- Return type:
- async predict_regional(*, body)¶
Call a regional environment of a model.
- Parameters:
body (PredictInput)
- Return type:
- async run_remote(*, env_name, body)¶
Call the chain deployment associated with a specified environment.
- Parameters:
env_name (str)
body (RunRemoteInput)
- Return type:
- async run_remote_deployment(*, deployment_id, body)¶
Call a specific chain deployment by deployment ID.
- Parameters:
deployment_id (str)
body (RunRemoteInput)
- Return type:
- async run_remote_development(*, body)¶
Call the development deployment of a chain.
- Parameters:
body (RunRemoteInput)
- Return type:
- async run_remote_production(*, body)¶
Call the production environment of a chain.
- Parameters:
body (RunRemoteInput)
- Return type:
- async run_remote_regional(*, body)¶
Call a regional environment of a chain.
- Parameters:
body (RunRemoteInput)
- Return type:
- async wake(*, env_name)¶
Wake a named environment of a model.
- Parameters:
env_name (str)
- Return type:
None
- async wake_deployment(*, deployment_id)¶
Wake a specific deployment of a model by deployment ID.
- Parameters:
deployment_id (str)
- Return type:
None
- async wake_development()¶
Wake the development deployment of a model.
- Return type:
None
- async wake_production()¶
Wake the production environment of a model.
- Return type:
None
- async wake_regional()¶
Wake a regional environment of a model.
- Return type:
None