Skip to main content

Installation

Usage

This client can be used to call Inferless API from your Python code. It supports both synchronous and asynchronous calls.

inferless.call

This method sends a synchronous request to the Inferless API endpoint

Parameters

  • url - Inferless Model API URL
  • workspace_api_key - Inferless Workspace API Key
  • data - Model Input Data in Dict Format
  • inputs (Optional) - Model Input Data in Inference Protocol format, data should not be given is this is given

Example

inferless.call_async

This method sends a request to the inferless endpoint in the background.

Parameters

  • url - Inferless Model API URL
  • workspace_api_key - Inferless Workspace API Key
  • data - Model Input Data in Dict Format
  • inputs (Optional) - Model Input Data in Inference Protocol format, data should not be given is this is given
  • **callback - The callback function will be called after receiving the response.
    • callback function should have two params: callback(error, response)
    • error - any error resulting while calling the inferless endpoint
    • response - response from the inferless endpoint

Using the Inference Protocol format