Metadata-Version: 2.4
Name: corent
Version: 0.1.0
Summary: Official Python SDK for Corent — one API for AI image, video, and voice generation with built-in routing, failover, and exact receipts.
Project-URL: Homepage, https://corent.tech
Project-URL: Documentation, https://corent.tech/docs
Author-email: Corent <krrocicrypto@gmail.com>
License-Expression: MIT
Keywords: ai,api,corent,image-generation,text-to-speech,video-generation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24
Description-Content-Type: text/markdown

# Corent Python SDK

One API for AI **image, video, and voice** generation. You pick a quality tier; Corent's router picks the best live model, reroutes failures, verifies the output, and returns the exact charge on every response. Failed generations are never billed.

```bash
pip install corent
```

```python
from corent import Corent

client = Corent("co_live_...")  # get a key at https://corent.tech

image = client.images.generate("a lighthouse at dusk", tier="premium", aspect_ratio="9:16")
print(image.url, image.width, image.height, image.cost_cents)

video = client.videos.generate("a paper boat drifting across a puddle",
                               tier="premium", duration_s=5, resolution="1080p")
print(video.url, video.resolution, video.cost_cents)

speech = client.speech.generate("Welcome to Corent.")
print(speech.url, speech.cost_cents)
```

## What the SDK handles for you

- **Timeout-safe renders** — images submit as background jobs and are polled; a network hiccup can never lose a finished (and billed) result.
- **Safe retries** — every generate call carries an auto idempotency key; retries can never double-charge.
- **Backoff** — 429/5xx are retried with `Retry-After` respected.
- **Honest receipts** — `width`/`height` are the *measured* pixels of the delivered file, and `cost_cents` is the exact charge.

## Fine-grained control

```python
job = client.images.generate("...", tier="max_pro", wait=False)  # returns immediately
job = client.jobs.wait(job.id)                                    # resume any time

client.tiers()          # live catalog with honest min-max price ranges
client.balance_cents()  # prepaid balance
```

Tiers: `air` | `lite` | `premium` | `pro` | `max_pro` — see [corent.tech/pricing](https://corent.tech/pricing). Docs: [corent.tech/docs](https://corent.tech/docs).
