> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/api.md).

# Use the Duaer public API

Call the Duaer public REST API with an API key.
## What this section covers

- [Authentication](/api/authentication.md): create a key and call with X-DUAER-API-KEY.
- [Endpoint reference](/api/api-reference.md): read /api/v1 on your instance instead of a route list that would go stale.

What a key can do depends on its scopes and on the role of the person who created it. A key is not a pass to change every workflow on the instance.

## Request limits per API key <a href="#rate-limits" id="rate-limits"></a>

When an admin sets DUAER_PUBLIC_API_RATE_LIMIT_ENABLED=true, each API key may make up to 1,200 reads and 300 writes a minute across all endpoints, and up to 600 reads and 200 writes a minute on one endpoint. GET and HEAD count as reads; the other methods as writes.

Each response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over a limit the API answers 429; try again after the reset time. The DUAER_PUBLIC_API_RATE_LIMIT_* variables change each limit, and 0 turns that layer off.

## Retry a POST safely <a href="#idempotency" id="idempotency"></a>

Send an Idempotency-Key header (1 to 128 visible ASCII characters) with a POST. Sent again with the same key and the same request within 12 hours, Duaer does not run it again: it returns the first response.

Sent again while the first is still running, the API answers 409; the same key with a different request, 422; a key in the wrong format, 400.
## Questions

### Does the public API use the same permissions as the canvas in Duaer?

Not exactly. The API uses a scoped key. What it can do depends on those scopes and on the role of the person who created the key.

