Get started

Auray API

Every generator is an HTTP address — reachable from your code or from a desktop on the same account and the same credits.

Auray gives you one integration point for every generator: photos, music, video, 3D models, chat and code, each at its own address, charged to one balance of credits, with the same authentication and the same asynchronous requests for every model. Nothing is charged per user, per project or per seat. There is no private path — the desktop submits through the same route your code does.

Make a request

Every model uses the same authentication and the same asynchronous request: POST the model's address, then poll it or take a webhook. The model's name is the URL — 423 addresses across 16 namespaces, all reached the same way.

Start with one of the models behind our own apps. Replace the prompt with yours and send the request with your API key.

curl -X POST https://queue.auray.run/auray-ai/krea-2-turbo/text-to-image \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a brass orrery on a walnut desk, morning light from a window to the left",
    "aspect_ratio": "16:9",
    "resolution": 1024
  }'

The API answers at once with the job's identifier and the addresses that follow it. Poll status_url, or have a webhook delivered when the job completes.

{
  "status": "IN_QUEUE",
  "request_id": "photo_docs-mtpb1vnh",
  "job_id": "photo_docs-mtpb1vnh",
  "model": "auray-ai/krea-2-turbo/text-to-image",
  "status_url": "https://queue.auray.run/auray-ai/krea-2-turbo/text-to-image/requests/photo_docs-mtpb1vnh/status",
  "response_url": "https://queue.auray.run/auray-ai/krea-2-turbo/text-to-image/requests/photo_docs-mtpb1vnh",
  "cancel_url": "https://queue.auray.run/auray-ai/krea-2-turbo/text-to-image/requests/photo_docs-mtpb1vnh/cancel"
}

Choose your path

A job is kept 7 days: after that its request and its results are deleted, so download what you need before then.

Was this page helpful?

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.