Docs

Client libraries

Client libraries

The API from JavaScript, Python, a terminal, an agent, or a generated client — the same three hosts, the same envelope, the same refusals.

Everything in this documentation can be done with curl, and every guide shows it that way. The clients below save you the loop: submit, follow the request until it settles, fetch the result, and turn a refusal into an error with the code, the message and the link the API sent.

#Compatibility

The queue host follows the queue protocol fal's clients speak — IN_QUEUE, IN_PROGRESS, COMPLETED, a result read once it is done, PUT …/cancel — and the MCP server has the same eleven tools by the same names as fal's Run MCP. So a client, a webhook receiver or an agent configuration written for fal's queue works here with a new base URL and an Auray key: ?fal_webhook= is accepted beside ?webhook=, and every delivery carries the X-Fal-Webhook-* signature headers beside our own. Jobs, Webhooks and MCP say the details.

#What every client does the same way

  • The address is the model. auray-ai/krea-2-turbo/text-to-image is the string you pass; nothing else identifies what runs. Addresses explains the grammar.
  • Three hosts, chosen for you. A submit goes to the queue host; run goes to the synchronous host and waits; the account's side — jobs, assets, uploads, webhooks — is the platform host. Jobs has the envelopes each one answers.
  • A refusal is an error you can read. Every client raises the API's own body: status, the error code, the message, the docs link into the error catalogue, and the request_id to quote. Only 429 and 503 are retried, and only as Retry-After says.
  • Idempotency is yours to name. Pass an idempotency key and a retry is handed the same request rather than charged twice. Idempotency says what the key is scoped to.
  • The desktop is a client too. Since 2026-09-06 the desktop spends credits through this same API, with a session key it mints for the browser. The desktop has the details.

#Published, or not yet

The Install block at the top of each page says which. A package that has not reached its registry yet says so, and cannot be installed until it does — the repository it is built in is not public; the block flips to the install command the day the registry has it.

Start typing to search every page of the documentation.

Up arrow Down arrow to moveEnter to openEscape to close