ApiClient¶
- class baseten.client.inferenceapi.ApiClient(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.Client)
- async_predict(*, env_name, body)¶
Asynchronously call a named environment of a model.
- Parameters:
env_name (str)
body (AsyncPredictRequest)
- Return type:
- async_predict_deployment(*, deployment_id, body)¶
Asynchronously call a specific deployment of a model.
- Parameters:
deployment_id (str)
body (AsyncPredictRequest)
- Return type:
- async_predict_development(*, body)¶
Asynchronously call the development deployment of a model.
- Parameters:
body (AsyncPredictRequest)
- Return type:
- async_predict_production(*, body)¶
Asynchronously call the production environment of a model.
- Parameters:
body (AsyncPredictRequest)
- Return type:
- async_predict_regional(*, body)¶
Asynchronously call a regional environment of a model.
- Parameters:
body (AsyncPredictRequest)
- Return type:
- async_run_remote(*, env_name, body)¶
Asynchronously call a named environment of a chain.
- Parameters:
env_name (str)
body (AsyncRunRemoteInput)
- Return type:
- async_run_remote_deployment(*, deployment_id, body)¶
Asynchronously call a specific deployment of a chain.
- Parameters:
deployment_id (str)
body (AsyncRunRemoteInput)
- Return type:
- async_run_remote_development(*, body)¶
Asynchronously call the development deployment of a chain.
- Parameters:
body (AsyncRunRemoteInput)
- Return type:
- async_run_remote_production(*, body)¶
Asynchronously call the production environment of a chain.
- Parameters:
body (AsyncRunRemoteInput)
- Return type:
- async_run_remote_regional(*, body)¶
Asynchronously call a regional environment of a chain.
- Parameters:
body (AsyncRunRemoteInput)
- Return type:
- cancel_async_request(*, request_id)¶
Cancel a queued async request.
- Parameters:
request_id (str)
- Return type:
- get_async_queue_status(*, env_name)¶
Get async queue status for a named environment.
- Parameters:
env_name (str)
- Return type:
- get_async_queue_status_deployment(*, deployment_id)¶
Get async queue status for a specific deployment.
- Parameters:
deployment_id (str)
- Return type:
- get_async_queue_status_development()¶
Get async queue status for the development deployment.
- Return type:
- get_async_queue_status_production()¶
Get async queue status for the production environment.
- Return type:
- get_async_queue_status_regional()¶
Get async queue status for a regional environment.
- Return type:
- get_async_request_status(*, request_id)¶
Get the status of an async request.
- Parameters:
request_id (str)
- Return type:
- predict(*, env_name, body)¶
Call the model deployment associated with a specified environment.
- Parameters:
env_name (str)
body (PredictInput)
- Return type:
- predict_deployment(*, deployment_id, body)¶
Call a specific deployment of a model by deployment ID.
- Parameters:
deployment_id (str)
body (PredictInput)
- Return type:
- predict_development(*, body)¶
Call the development deployment of a model.
- Parameters:
body (PredictInput)
- Return type:
- predict_production(*, body)¶
Call the production environment of a model.
- Parameters:
body (PredictInput)
- Return type:
- predict_regional(*, body)¶
Call a regional environment of a model.
- Parameters:
body (PredictInput)
- Return type:
- run_remote(*, env_name, body)¶
Call the chain deployment associated with a specified environment.
- Parameters:
env_name (str)
body (RunRemoteInput)
- Return type:
- run_remote_deployment(*, deployment_id, body)¶
Call a specific chain deployment by deployment ID.
- Parameters:
deployment_id (str)
body (RunRemoteInput)
- Return type:
- run_remote_development(*, body)¶
Call the development deployment of a chain.
- Parameters:
body (RunRemoteInput)
- Return type:
- run_remote_production(*, body)¶
Call the production environment of a chain.
- Parameters:
body (RunRemoteInput)
- Return type:
- run_remote_regional(*, body)¶
Call a regional environment of a chain.
- Parameters:
body (RunRemoteInput)
- Return type:
- wake(*, env_name)¶
Wake a named environment of a model.
- Parameters:
env_name (str)
- Return type:
None
- wake_deployment(*, deployment_id)¶
Wake a specific deployment of a model by deployment ID.
- Parameters:
deployment_id (str)
- Return type:
None
- wake_development()¶
Wake the development deployment of a model.
- Return type:
None
- wake_production()¶
Wake the production environment of a model.
- Return type:
None
- wake_regional()¶
Wake a regional environment of a model.
- Return type:
None