auray-client
The Auray API from Python. One dependency, httpx; Python 3.10+.
pip install auray-client
import uuid
from auray_client import Client
auray = Client() # reads AURAY_API_KEY
result = auray.subscribe(
"auray-ai/krea-2-turbo/text-to-image",
input={"prompt": "a brass orrery on a walnut desk, morning light", "aspect_ratio": "16:9", "resolution": 1024},
idempotency_key=str(uuid.uuid4()), # one per submit: a fixed key hands back the first job
on_queue_update=lambda s: print(s["status"]),
)
assets = auray.platform.jobs.assets(result["request_id"])
print(assets["assets"][0]["url"])
run(address, input=..., wait_seconds=..., timeout=...)— the synchronous host; a504 run_timed_outis followed by the job it names (queue_request_id, never the trace inrequest_id), never resubmitted.wait_secondsis how long the host holds the connection,timeoutthe whole call's deadline; running out raisessubscribe_timed_outcarrying the job.subscribe(address, input=..., idempotency_key=..., on_queue_update=...)— submit, follow, fetch the result, waiting as long as the server'sgive_up_after_secondssays unlesstimeoutsays otherwise.queue.submit / status / result / cancel / stream_status— the request lifecycle, fal's shape.storage.upload(address=..., content_type=..., data=...)andupload_file(path, address=...)— three calls, a signed URL, and the field it goes in.platform.me / usage / plans / catalogue / status / changelog / jobs / models / webhooks / chat— the account's side.embeddings.create(model=..., input=...)— vectors from the OpenAI-compatible route.AsyncClient— the same surface, awaited:async with AsyncClient() as auray: ...
Every refusal raises AurayError with status, code, error_type, the API's message, docs and
request_id, and the body's own retry and charged: a refusal is resent only when that advice says
the identical request may be answered (same_key, after_retry_after) and no charge stands.
Documentation: https://auray.ai/docs/clients/python
Metadata
Release files for auray-client 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auray_client-0.3.0.tar.gz | 26.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auray_client-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.6 kB
Release files / auray_client-0.3.0.tar.gz
| Download URL | auray_client-0.3.0.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12df6ec98fd1fd7c5394e830b16cce1758804a87ff9e494bad026c380c6014ea
|
|
BLAKE2b-256 checksum How to use checksums |
4680ba195876fbdf502a065ceb374f5c27d5c01926ab817a65829332ac3a5618
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / auray_client-0.3.0-py3-none-any.whl
| Download URL | auray_client-0.3.0-py3-none-any.whl |
|---|---|
| Size | 25.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5112022e4c711c3d64fa9d2d3f9336a5afdb32db12f13daedf8919a450c9a8ec
|
|
BLAKE2b-256 checksum How to use checksums |
6d02adfd1fdf35040742a0321d431489df3e11d2b190d867d476b1cac77cebad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|