Skip to main content

auray-client

The Auray API from Python. One dependency, httpx; Python 3.10+.

pip install auray-client
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="my-first-render",
    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.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 auray-client 0.2.0
File Size Uploaded
auray_client-0.2.0.tar.gz 19.5 kB Details

Built distribution (wheel)

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

Total release size: 39.0 kB

Release files / auray_client-0.2.0.tar.gz

Download URL auray_client-0.2.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c546f979c5ed619a83af32f79e9f2abee611a21e0a8d0be9ee674b5b32ebfc02
BLAKE2b-256 checksum
How to use checksums
8f05b3e2709024f0f3de9e93483d11e017df504b7a65014fdb05f1c984146ebd
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.0-py3-none-any.whl

Download URL auray_client-0.2.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5917e7f388648d93fc22e18290dea9705681b551efecfa0515bd1ab2c81b129f
BLAKE2b-256 checksum
How to use checksums
34d4a669c4d405051e782d90f02c074d5f0d9d5a81a7e1d7fbfc18b04c864632
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

0.2.1

2 release files

This release

0.2.0 This release

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