AIOZ AI SDK for Python
Python client library for the AIOZ AI API. Auto-generated from the Swagger 2.0 specification with typed Pydantic v2 models.
Installation
pip install aiozai-sdk
Quick Start
from aiozai_sdk import AiozAIClient
client = AiozAIClient(api_key="your-api-key")
# Access services
result = client.models.model.post_model_list(input={...})
Error Handling
from aiozai_sdk import AiozAPIError
try:
result = client.models.model.get_model_by_id(id="model-id")
except AiozAPIError as e:
print(f"[{e.status_code}] {e.message} — {e.method} {e.endpoint}")
Configuration
from aiozai_sdk import AiozAIClient, RetryConfig
client = AiozAIClient(
api_key="your-api-key",
base_url="https://api.aiozai.network/api/v1",
timeout=60.0,
retry_config=RetryConfig(max_retries=5, base_delay=2.0, max_delay=60.0),
)
Service Groups
| Service | Access | Description | Reference |
|---|---|---|---|
| Collections | client.collections |
Collection management | docs/collections.md |
| Competitions | client.competitions |
Competitions & submissions | docs/competitions.md |
| Core | client.core |
Core endpoints | docs/core.md |
| Datasets | client.datasets |
Dataset management | docs/datasets.md |
| Discussions | client.discussions |
Discussions & comments | docs/discussions.md |
| Models | client.models |
Model management | docs/models.md |
| Organizations | client.organizations |
Organization management | docs/organizations.md |
| Public | client.public |
Public endpoints (no auth) | docs/public.md |
| Repositories | client.repositories |
Repository operations | docs/repositories.md |
| Storage | client.storage |
Storage & uploads | docs/storage.md |
| Tasks | client.Tasks() |
Task management | docs/tasks.md |
| Users | client.users |
User management | docs/users.md |
Requirements
- Python 3.9+
- pydantic >= 2.0
- urllib3 >= 2.0
- tenacity >= 8.0
License
Apache 2.0
SDK Usage Guide
Authentication Setup
Initialize the client once with your API key and reuse it across all calls:
import os
from aiozai_sdk import AiozAIClient
client = AiozAIClient(api_key=os.environ["AIOZ_AI_API_KEY"])
# Use client.models, client.datasets, etc.
Obtain your API key from the AIOZ AI dashboard.
Common Response Types
These types appear in error responses across all endpoints.
FailResponse (400 Bad Request)
| Field | Type | Description |
|---|---|---|
message |
string |
Human-readable error message |
status |
string |
fail |
ErrorResponse (500 Internal Server Error)
| Field | Type | Description |
|---|---|---|
message |
string |
Internal error message |
status |
string |
error |
Metadata
Release files for aiozai-sdk 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiozai_sdk-1.1.0.tar.gz | 137.8 kB | Without provenance | Details for aiozai_sdk-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiozai_sdk-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for aiozai_sdk-1.1.0-py3-none-any.whl |
Total release size: 664.5 kB
Release files / aiozai_sdk-1.1.0.tar.gz
| Download URL | aiozai_sdk-1.1.0.tar.gz |
|---|---|
| Size | 137.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
940f9f64e15bc7a46dad3381cebb4da4d669aa4a7e29a3f3fd85c5bb0876deb4
|
|
BLAKE2b-256 checksum How to use checksums |
13e524dd737582fc313150b230efa4aadeb08d36616608e27f7fd8aef24fe265
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / aiozai_sdk-1.1.0-py3-none-any.whl
| Download URL | aiozai_sdk-1.1.0-py3-none-any.whl |
|---|---|
| Size | 526.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
256cd4014289e0a01e09637911d45b3b475f6bab11ad9db3b108a1cc9ed062aa
|
|
BLAKE2b-256 checksum How to use checksums |
fc0296aa841d932f91148637eac0b078a901aef8807df5687a439e4a908d9089
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Security for aiozai-sdk 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.