Skip to main content

Official Python SDK for AceDataCloud — AI-powered data services

Project description

AceDataCloud Python SDK

Official Python client for the AceDataCloud API.

Installation

pip install acedatacloud

Quick Start

from acedatacloud import AceDataCloud

client = AceDataCloud(api_token="your-token")

# OpenAI-compatible chat completions
response = client.openai.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response["choices"][0]["message"]["content"])

# Streaming
for chunk in client.openai.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True,
):
    print(chunk.get("choices", [{}])[0].get("delta", {}).get("content", ""), end="")

Async Usage

import asyncio
from acedatacloud import AsyncAceDataCloud

async def main():
    client = AsyncAceDataCloud(api_token="your-token")
    result = await client.search.google(q="Python SDK")
    print(result)
    await client.close()

asyncio.run(main())

Resources

Resource Description
client.openai OpenAI-compatible chat completions and responses
client.chat Native chat messages
client.images Image generation (Midjourney, Flux, etc.)
client.audio Music generation (Suno)
client.video Video generation (Luma, Sora, Veo, etc.)
client.search Web search (Google SERP)
client.tasks Cross-service async task polling
client.files File uploads
client.platform Applications, credentials, models management

Image Generation (with Task Polling)

# Default provider (nano-banana)
task = client.images.generate(prompt="A sunset over mountains")
result = task.wait()  # polls until complete
print(result["image_url"])

# Use a specific provider
mj_task = client.images.generate(prompt="A sunset over mountains", provider="midjourney")

Multi-Provider Support

Image, video, and audio resources support a provider parameter to switch between services:

# Video — default is 'sora'
client.video.generate(prompt="A cat playing piano", provider="kling")
client.video.generate(prompt="Ocean waves", provider="luma")

# Audio — default is 'suno'
client.audio.generate(prompt="A jazz song", provider="producer")

Available providers:

Resource Providers
client.images nano-banana (default), midjourney, flux, seedream
client.video sora (default), luma, veo, kling, hailuo, seedance, wan, pika, pixverse
client.audio suno (default), producer

Error Handling

from acedatacloud import AceDataCloud, AuthenticationError, RateLimitError

client = AceDataCloud(api_token="your-token")
try:
    client.search.google(q="test")
except AuthenticationError:
    print("Invalid or expired token")
except RateLimitError:
    print("Too many requests, slow down")

Configuration

client = AceDataCloud(
    api_token="your-token",
    base_url="https://api.acedata.cloud",       # API gateway
    platform_base_url="https://platform.acedata.cloud",  # Management plane
    timeout=300.0,      # Request timeout in seconds
    max_retries=2,      # Retry count for transient errors
)

The token can also be set via the ACEDATACLOUD_API_TOKEN environment variable.

License

MIT

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

acedatacloud-2026.4.18.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

acedatacloud-2026.4.18.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file acedatacloud-2026.4.18.0.tar.gz.

File metadata

  • Download URL: acedatacloud-2026.4.18.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for acedatacloud-2026.4.18.0.tar.gz
Algorithm Hash digest
SHA256 8a78781bd3e5b965f85d8f65b2e91a22ba7e3e4273e63999bcb523c0256f22c2
MD5 f10c949a536e969a748e8868456d7fcb
BLAKE2b-256 f4efe0b8e5281a1a19fdf69d67c7e4f2309528895d5eeef751bd189ad6f74bf4

See more details on using hashes here.

File details

Details for the file acedatacloud-2026.4.18.0-py3-none-any.whl.

File metadata

File hashes

Hashes for acedatacloud-2026.4.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd1a837a6c325bc5270734363a6babf3577883d8ab269c43df876e49a2443696
MD5 b9d73905987ea7e2ffb204eda6af640e
BLAKE2b-256 0fd040bde16ea7f6541a9610d7d9adb04fff1cb0556adf540d980b1e8e256a43

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