AsyncApiClient

class baseten.client.inferenceapi.AsyncApiClient(http_client)

Bases: object

Generated 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:
Return type:

AsyncPredictOutput

async async_predict_deployment(*, deployment_id, body)

Asynchronously call a specific deployment of a model.

Parameters:
Return type:

AsyncPredictOutput

async async_predict_development(*, body)

Asynchronously call the development deployment of a model.

Parameters:

body (AsyncPredictRequest)

Return type:

AsyncPredictOutput

async async_predict_production(*, body)

Asynchronously call the production environment of a model.

Parameters:

body (AsyncPredictRequest)

Return type:

AsyncPredictOutput

async async_predict_regional(*, body)

Asynchronously call a regional environment of a model.

Parameters:

body (AsyncPredictRequest)

Return type:

AsyncPredictOutput

async async_run_remote(*, env_name, body)

Asynchronously call a named environment of a chain.

Parameters:
Return type:

AsyncRunRemoteOutput

async async_run_remote_deployment(*, deployment_id, body)

Asynchronously call a specific deployment of a chain.

Parameters:
Return type:

AsyncRunRemoteOutput

async async_run_remote_development(*, body)

Asynchronously call the development deployment of a chain.

Parameters:

body (AsyncRunRemoteInput)

Return type:

AsyncRunRemoteOutput

async async_run_remote_production(*, body)

Asynchronously call the production environment of a chain.

Parameters:

body (AsyncRunRemoteInput)

Return type:

AsyncRunRemoteOutput

async async_run_remote_regional(*, body)

Asynchronously call a regional environment of a chain.

Parameters:

body (AsyncRunRemoteInput)

Return type:

AsyncRunRemoteOutput

async cancel_async_request(*, request_id)

Cancel a queued async request.

Parameters:

request_id (str)

Return type:

CancelAsyncRequestOutput

async get_async_queue_status(*, env_name)

Get async queue status for a named environment.

Parameters:

env_name (str)

Return type:

GetAsyncQueueStatusOutput

async get_async_queue_status_deployment(*, deployment_id)

Get async queue status for a specific deployment.

Parameters:

deployment_id (str)

Return type:

GetAsyncQueueStatusOutput

async get_async_queue_status_development()

Get async queue status for the development deployment.

Return type:

GetAsyncQueueStatusOutput

async get_async_queue_status_production()

Get async queue status for the production environment.

Return type:

GetAsyncQueueStatusOutput

async get_async_queue_status_regional()

Get async queue status for a regional environment.

Return type:

GetAsyncQueueStatusOutput

async get_async_request_status(*, request_id)

Get the status of an async request.

Parameters:

request_id (str)

Return type:

AsyncRequestStatusResponse

async predict(*, env_name, body)

Call the model deployment associated with a specified environment.

Parameters:
Return type:

PredictOutput

async predict_deployment(*, deployment_id, body)

Call a specific deployment of a model by deployment ID.

Parameters:
Return type:

PredictOutput

async predict_development(*, body)

Call the development deployment of a model.

Parameters:

body (PredictInput)

Return type:

PredictOutput

async predict_production(*, body)

Call the production environment of a model.

Parameters:

body (PredictInput)

Return type:

PredictOutput

async predict_regional(*, body)

Call a regional environment of a model.

Parameters:

body (PredictInput)

Return type:

PredictOutput

async run_remote(*, env_name, body)

Call the chain deployment associated with a specified environment.

Parameters:
Return type:

RunRemoteOutput

async run_remote_deployment(*, deployment_id, body)

Call a specific chain deployment by deployment ID.

Parameters:
Return type:

RunRemoteOutput

async run_remote_development(*, body)

Call the development deployment of a chain.

Parameters:

body (RunRemoteInput)

Return type:

RunRemoteOutput

async run_remote_production(*, body)

Call the production environment of a chain.

Parameters:

body (RunRemoteInput)

Return type:

RunRemoteOutput

async run_remote_regional(*, body)

Call a regional environment of a chain.

Parameters:

body (RunRemoteInput)

Return type:

RunRemoteOutput

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