Skip to main content

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.

pip install corent
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.

Pick a model yourself (direct access)

Pass model instead of tier to pin an exact model. It is never substituted: if that model can't deliver, the call fails and you are not charged.

image = client.images.generate("a lighthouse at dusk", model="flux-schnell")
print(image.model)  # "flux-schnell" — the name you asked for

client.models()  # the menu: every model with its kind, quality and exact price

Each model has one name. When we can reach it by more than one route, Corent serves whichever is cheapest at that moment and charges you that price — you never have to shop between near-identical entries.

Fine-grained control

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.models()         # direct-access menu with per-model prices
client.balance_cents()  # prepaid balance

Tiers: air | lite | premium | pro | max_pro — see corent.tech/pricing. Models: corent.tech/models. Docs: corent.tech/docs.

Metadata

Release files for corent 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for corent 0.2.0
File Size Uploaded Provenance Actions
corent-0.2.0.tar.gz 6.5 kB Without provenance Details for corent-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for corent 0.2.0
File Interpreter ABI Platform Actions
corent-0.2.0-py3-none-any.whl Python 3 none any Details for corent-0.2.0-py3-none-any.whl

Total release size: 13.4 kB

Release files / corent-0.2.0.tar.gz

Download URL corent-0.2.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b8cb403e8bf74dbb5d00af466e5e69810575a57d76f9ed1085aceaeb7af03301
BLAKE2b-256 checksum
How to use checksums
5af127596839dc09b6287eb58300c1a39135289222c78b452d8d6ce2bfc82749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / corent-0.2.0-py3-none-any.whl

Download URL corent-0.2.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24e4327b9fa39941e2c5a1f9611d10734720879f5e5ad0a9008c59fbf807a8fe
BLAKE2b-256 checksum
How to use checksums
b08a64bc896a04c070e951b48b0ace9762c1fcc152a1a5a0e51e329ac492a50c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for corent 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page