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

# Status Code and Throttling

## HTTP Status Code

<table data-header-hidden><thead><tr><th width="152.0859375">Status Code</th><th>Description</th></tr></thead><tbody><tr><td><code>200</code></td><td>Successful.</td></tr><tr><td><code>201</code></td><td>The resource has been created.</td></tr><tr><td><code>202</code></td><td>Accepted. Your image generation request has been accepted for processing.</td></tr><tr><td><code>400</code></td><td>Check your request, it is invalid.</td></tr><tr><td><code>401</code></td><td>Not authorized. Make sure the provided API key is correct.</td></tr><tr><td><code>404</code></td><td>The resource is not found.</td></tr><tr><td><code>405</code></td><td>Method not allowed. Ensure you're using the correct HTTP verb for the endpoint.</td></tr><tr><td><code>429</code></td><td>Too many requests, slow down. See <a href="/pages/-MavJA6IYmXiG6AmI0w7#throttling">throttling</a>. </td></tr><tr><td><code>500</code></td><td>Something is wrong with our server. Let us know!</td></tr></tbody></table>

## Throttling

Throttle rate is set at 10 requests per 10 seconds. You request will return with `429` status if your request has been throttled.

The following headers will also be sent,

<table data-header-hidden><thead><tr><th width="233.78729248046875">Header</th><th>Descripton</th></tr></thead><tbody><tr><td><code>X-RATELIMIT-LIMIT</code></td><td>Current limit</td></tr><tr><td><code>X-RATELIMIT-REMAINING</code></td><td>Remaining request that can be sent within limit</td></tr><tr><td><code>X-RATELIMIT-RESET</code></td><td>Epoch time (seconds) for when the limit is reset</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usestencil.com/api/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
