class documentation
Authenticate with HubAI and expose its high-level service modules.
A client does not hold a separate HTTP session. Its service attributes are modules whose functions use the API key stored in the SDK environment. Consequently, creating another client replaces the process-wide key used by subsequent service calls.
Example
The constructor finds HUBAI_API_KEY automatically.
from hubai_sdk import HubAIClient client = HubAIClient() models = client.models.list_models(is_public=True)
Note
Installed hubai.plugins entry points can add more attributes. A plugin cannot replace one of the built-in service attributes.
| Method | __init__ |
Initialize a HubAI SDK client. |
| Instance Variable | convert |
Hosted model conversion functions. |
| Instance Variable | instances |
Functions for model artifacts and their files. |
| Instance Variable | models |
Functions for model resources. |
| Instance Variable | variants |
Functions for versioned model variants. |
| Method | _verify |
Check whether the configured API key is accepted by HubAI. |
Initialize a HubAI SDK client.
| Parameters | |
apistr | None | HubAI API key. If omitted, the client falls back to the HUBAI_API_KEY environment variable and then to the key loaded from secure credential storage. |
| Raises | |
ValueError | If no API key is available or the provided key is invalid. |