Skip to main content

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.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 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
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 with make guide from 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 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
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

aiozai_sdk-1.0.5.tar.gz (327.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiozai_sdk-1.0.5-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file aiozai_sdk-1.0.5.tar.gz.

File metadata

  • Download URL: aiozai_sdk-1.0.5.tar.gz
  • Upload date:
  • Size: 327.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for aiozai_sdk-1.0.5.tar.gz
Algorithm Hash digest
SHA256 c4a68a8be492d5a6b32d2f8ffa08e7d148bb050b32c2904c6405efb7ad7f6538
MD5 f619c7891797f552e567ee0225f89f66
BLAKE2b-256 d301657c52d4ad18ecc2891993a360cd943c18901cb120c08507ba4aaa16ccd4

See more details on using hashes here.

File details

Details for the file aiozai_sdk-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: aiozai_sdk-1.0.5-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.10.20

File hashes

Hashes for aiozai_sdk-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1a8c5ca03a11440e36698295b3aaad58bc5f421d2afee086cacde228c2b061b9
MD5 4acd8db5befbc5049aea789e64c15c65
BLAKE2b-256 f1efee94bd31dcb981e983acdf19c867cacd7a1bbbeddd4f4cef7a90859db9c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page