Installation
Install the package from PyPI:Initialization
TheAris client is your main entry point. It handles:
- Node Discovery: Finding active compute nodes.
- Handshake: Negotiating payment and session tokens.
- Execution: Sending prompts to the node.
Usage
client.generate()
The core method to run inference.
The client automatically handles the connection handshake. If a session token expires, it will attempt to refresh it automatically.
Helper Function
For quick, one-off scripts, you can use the top-levelgenerate helper:
Configuration
You can configure the client using environment variables to avoid hardcoding secrets.| Variable | Description |
|---|---|
ARIS_API_KEY | Your unique API key (starts with sk-). |
ARIS_REGISTRY_URL | URL of the registry (default: http://localhost:8000). |
Error Handling
See the Error Handling page for details onArisPaymentError and ArisNodeError.