Python SDK for the AIOZ AI API
Project description
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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiozai_sdk-1.0.9.tar.gz.
File metadata
- Download URL: aiozai_sdk-1.0.9.tar.gz
- Upload date:
- Size: 136.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45fb782a97b4dc6646cd1da55a5470c27a53616daece1b0975b712f2c0bc20bb
|
|
| MD5 |
ab20c8bd436aa86c232c9a0b277f9dec
|
|
| BLAKE2b-256 |
fcc6ce20b29d36f18ad6e5295307fe9169cd08805805b3e08239e70c3870de8b
|
File details
Details for the file aiozai_sdk-1.0.9-py3-none-any.whl.
File metadata
- Download URL: aiozai_sdk-1.0.9-py3-none-any.whl
- Upload date:
- Size: 518.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca07c1c1e96152c7a1890d19877adbd5fbb1c692a15ed4f24442a65ca5e14bcc
|
|
| MD5 |
e73e0b0f4c534c9d0f83475bd8821a11
|
|
| BLAKE2b-256 |
bbe5b61cdf4afcda2f84397e9d373b623d3a3010c31094ad8a0622c2ff2df3cf
|