# Limits and troubleshooting

## Rate limits

Limits apply across the keys, endpoints and models on one account. Each output in a request with multiple choices counts towards usage.

| Account setting | In flight | Admitted per 10 seconds |
|---|---:|---:|
| Standard | 5 | 30 |
| Enhanced | 15 | 90 |
| Infinite usage | Unlimited | Unlimited |

Use **GET `/v1/usage`** or the dashboard to see your current account usage. When Site6 returns HTTP 429, honour `Retry-After` when provided. Add backoff when several callers share an account. A model or provider can have its own capacity limit.

## Request limits

| Limit | Value |
|---|---:|
| JSON request body | 8 MiB |
| Messages in one request | 1,000 |
| Characters in one message | 262,144 |
| Output tokens per choice | 16,384 |
| Advertised tools | 512 |
| Parallel tool calls | 32 |
| System prompt / AGENTS.md | 150 KB / 200 KB |

The token maximum is an output ceiling. Each model also has a context limit. If a supplied output budget is capped, `X-Site6-Max-Output-Tokens` reports the applied limit. Large histories, schemas, files and instructions all take space away from the reply.

## Spending and reported tokens

Accounts start with unlimited spending. The Site6 administrator can configure a custom USD cap and reset period. For metered requests Site6 reserves an allowance before generation and uses token counts reported by the model provider to settle tracked usage. Check the limits shown on your dashboard.

`usage` reports counts when available. When a Responses request lacks a complete count, `usage` can be `null` and `usage_metadata.reported` can contain the measured parts. Estimate costs separately if you need forecasts.

## Troubleshoot an error

| Status | What to check |
|---|---|
| 400 | Inspect the returned `error.code` and message. Check the model ID, allowed options, input format and tool schema. |
| 401 | Send your Site6 key as a bearer token or `x-api-key`. |
| 402 | The remaining spending allowance cannot cover the request. Try a smaller output budget or a model with a lower rate. |
| 403 | Check the account and model access assigned to the key. |
| 404 | Check the endpoint or use a stored object ID that your key can access. |
| 413 | Reduce input, attachments or conversation length. `context_length_exceeded` indicates a model/provider context refusal. |
| 429 | Retry after the supplied interval and reduce concurrency. |
| 502 | The model returned invalid or incomplete output. A smaller request or a larger output budget can help when the error says the output budget was exhausted. |
| 503 | The selected route or model is temporarily unavailable. Check [model status](https://status.site6.eokgg.win/) and retry with backoff. |
| 504 | The model or a tool timed out. Check the model status, then shorten or retry the request. |

Keep `X-Request-Id` and the error code when reporting a failed request. For streaming requests, also check for an error event after HTTP 200. [Streaming details](/streaming/#collect-text-and-handle-completion).

## Diagnose a client problem

| Symptom | First check |
|---|---|
| Client lists no models | Request `GET /v1/models` with the same key. Check how the client constructs its base URL and which model IDs are granted to the key. |
| Response is blank after a tool call | Look for `tool_calls` or a `function_call` output item. Return the result with the exact call ID and wait for the next generation. |
| Long request returns 413 | Check both the UTF-8 request size and the model's input and output token budget. See [long requests](/instructions/#budget-for-long-requests). |
| Output stops mid-sentence | Inspect `finish_reason` or `incomplete_details`. If the reason is the output limit, raise the budget within the model's context or ask for a shorter answer. |
| Stream starts and later errors | Keep the error event, the first-delta time and the request ID. Check whether the route reports `incremental` or `buffered` in `X-Site6-Stream-Mode`. |

## Collect safe diagnostics

This request checks key access and records the response headers and basic timing. It uses the key from your environment.

~~~bash
curl -sS --fail-with-body https://site6.eokgg.win/v1/models \
  -H "Authorization: Bearer $SITE6_API_KEY" \
  -D site6-response.headers \
  -w '\nHTTP %{http_code} · first byte %{time_starttransfer}s · total %{time_total}s\n'
~~~

When reporting an issue, include the endpoint, model ID, approximate time, HTTP status, request ID and error code. A small synthetic request makes comparison easier. Share timing and status details with keys and private prompt contents removed.

## Retry a transient failure

For `429`, respect `Retry-After` and queue requests behind your account's active limit. For repeated `502`, `503` or `504` responses, check [model status](https://status.site6.eokgg.win/), then use capped exponential backoff with jitter. Give each generation a per-request deadline and cancel it when the caller leaves.

If a request included an action in your application, check whether the action already completed before retrying. [Tool continuations](/tools/#build-a-responses-tool-loop) show how to carry a completed result forward by call ID.
