Warning
These SDKs are no longer maintained. For the latest SDKs, refer to the Livepeer AI Subnet documentation.
Welcome to the repository for auto-generated client SDKs for interacting with the Livepeer AI Subnet. These SDKs are generated from the OpenAPI specification using the OpenAPI Generator tool.
The following SDKs are currently available:
Tip
If the client SDK you need is not available, you can generate it using the OpenAPI Generator tool and submit a pull request to add it to this repository.
To generate the SDKs, follow these steps:
-
Install the OpenAPI Generator tool. You can find the installation instructions here.
-
Install JDK 9 or later.
-
Generate the OpenAPI specification by running the
gen_openapi.py
script located in the ai-worker repository. This script produces theopenapi_gateway.json
file at the root of the repository. Use the--entrypoint
flag to define the entrypoint for the OpenAPI specification. For instance, to create the OpenAPI specification for the gateway, use the command below:python gen_openapi.py --entrypoint gateway
-
Copy the
openapi_gateway.json
file to the root of this repository. -
Execute the following command to generate the Python Client SDK:
npx @openapitools/openapi-generator-cli generate -i openapi_gateway.json -g python -o sdks/python-typed -p packageName=livepeer_ai
To use the SDKs, navigate to the sdks
directory and then to the specific client directory for the SDK you wish to use. For example, to use the Python SDK, navigate to the sdks/python directory. Within this directory, you'll find documentation specific to the Python SDK.
To install the Python SDK, run:
cd sdks/python
pip install .
After installation, you can import the SDK in your code as follows:
import livepeer_ai
For additional information and documentation, refer to the respective SDK directories within the sdks
folder.