Skip to main content

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; a 504 run_timed_out is followed by the job it names (queue_request_id, never the trace in request_id), never resubmitted. wait_seconds is how long the host holds the connection, timeout the whole call's deadline; running out raises subscribe_timed_out carrying the job.
  • subscribe(address, input=..., idempotency_key=..., on_queue_update=...) — submit, follow, fetch the result, waiting as long as the server's give_up_after_seconds says unless timeout says otherwise.
  • queue.submit / status / result / cancel / stream_status — the request lifecycle, fal's shape.
  • storage.upload(address=..., content_type=..., data=...) and upload_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.2.1

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

Source distribution (sdist)

Source distribution for auray-client 0.2.1
File Size Uploaded
auray_client-0.2.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for auray-client 0.2.1
File Interpreter ABI Platform
auray_client-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 kB

Release files / auray_client-0.2.1.tar.gz

Download URL auray_client-0.2.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cacee4f7f99d6c6402f2922f7ae024de43724736492dc0759dff2a635caf47c9
BLAKE2b-256 checksum
How to use checksums
0ca8af4dfcbe7a7bd1e423f95bf1019cdaec58c0232c21b4ad42386636e385a3
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.2.1-py3-none-any.whl

Download URL auray_client-0.2.1-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26f6f7caf4dcb52a4fc4c4bfe20275aaf783f4934a6b9062ce13e8aa67d2acb8
BLAKE2b-256 checksum
How to use checksums
161a6cb5fe863655685d2e9b40becbadeea0fa51fcffd531c201067079e90cec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

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