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 AiozClient
client = AiozClient(api_key="your-api-key")
# Access services
result = client.models.model.api_key_model_list(body={...})
Error Handling
from aiozai_sdk import AiozAPIError
try:
result = client.models.model.api_key_model_id_get(id="model-id")
except AiozAPIError as e:
print(f"[{e.status_code}] {e.message} — {e.method} {e.endpoint}")
Configuration
from aiozai_sdk import AiozClient, RetryConfig
client = AiozClient(
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 |
|---|---|---|---|
| Models | client.models |
AI model management | docs/models.md |
| Datasets | client.datasets |
Dataset management | docs/datasets.md |
| Competitions | client.competitions |
Competitions & submissions | docs/competitions.md |
| Collections | client.collections |
Curated collections | docs/collections.md |
| Discussions | client.discussions |
Discussions & comments | docs/discussions.md |
| Notifications | client.notifications |
Notification system | docs/notifications.md |
| Organizations | client.organizations |
Organization management | docs/organizations.md |
| Repositories | client.repositories |
Repository operations | docs/repositories.md |
| Storage | client.storage |
Storage & uploads | docs/storage.md |
| Users | client.users |
User management | docs/users.md |
| Core | client.core |
Core endpoints, search, offers | docs/core.md |
| Public | client.public |
Public endpoints (no auth) | docs/public.md |
Requirements
- Python 3.9+
- pydantic >= 2.0
- urllib3 >= 2.0
- tenacity >= 8.0
License
Apache 2.0
SDK Usage Guide
Auto-generated from
swagger/sdk.json— do not edit this section manually. Re-generate withmake guidefrom the repo root.
Authentication Setup
Initialize the client once with your API key and reuse it across all calls:
import os
from aiozai_sdk import AiozClient
client = AiozClient(api_key=os.environ["AIOZ_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 |
errors |
array[string] |
Field-level validation errors |
ErrorResponse (500 Internal Server Error)
| Field | Type | Description |
|---|---|---|
message |
string |
Internal error message |
Project details
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.1.tar.gz.
File metadata
- Download URL: aiozai_sdk-1.0.1.tar.gz
- Upload date:
- Size: 326.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
936905ae25b361e6f569a677d9b99fd2ae62b9e20c87e71cf8aaa4bd7f02a7f0
|
|
| MD5 |
1ff9806879b8656d618b6d2918559b22
|
|
| BLAKE2b-256 |
064d1883704fd46798126d1c28d31bfd27cc0aef41aaf9d665e1b49d630be5b0
|
File details
Details for the file aiozai_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: aiozai_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e0036cda3ee6baca8da7f12a9aa41453984212471d28cf1155f33c353b40c3
|
|
| MD5 |
5c06b835fc0c83bccc8e470b8755e4b4
|
|
| BLAKE2b-256 |
d7ae475bd90b769e20bd0146f6bd30aa25adfcea6d1f01c042df24332204a46a
|