Python client library for the AIOZ AI API. Auto-generated from the Swagger 2.0 specification with typed Pydantic v2 models.
pip install aiozai-sdkfrom aiozai_sdk import AiozAIClient
client = AiozAIClient(api_key="your-api-key")
# Access services
result = client.models.model.post_model_list(input={...})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}")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 | 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 |
- Python 3.9+
- pydantic >= 2.0
- urllib3 >= 2.0
- tenacity >= 8.0
Apache 2.0
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.
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 |