***

title: Errors
og:title: You.com API Error Reference | HTTP Status Codes & Troubleshooting
og:description: Complete reference for You.com API errors and HTTP status codes. Understand 401, 402, 403, 404, 429, and 500 errors with causes and recommended actions.
---------------------

For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://you.com/docs/error-handling/llms.txt. For full documentation content, see https://you.com/docs/error-handling/llms-full.txt.

### Overview of errors you might encounter

| Status Code | Meaning               | Action                                   |
| ----------- | --------------------- | ---------------------------------------- |
| 200         | Success               | Request completed successfully           |
| 400         | Bad Request           | Check request parameters                 |
| 422         | Unprocessable Entity  | Check for invalid parameter combinations |
| 401         | Unauthorized          | Verify API key is valid                  |
| 402         | Payment Required      | Add credits to your account              |
| 403         | Forbidden             | Check API key scopes/permissions         |
| 404         | Not Found             | Agent/resource doesn't exist             |
| 429         | Too Many Requests     | Implement backoff and retry              |
| 500         | Internal Server Error | Contact support if persistent            |

### In-depth

| HTTP | Code                                                    | When it happens                                                                                                                                                                                                      |
| ---- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 401  | `unauthorized`                                          | This can happen for a missing API key: `{"detail": "API key is required"}`, an invalid/expired API key: `{"detail": "Invalid or expired API key"}` or for other auth parsing errors: `{"detail": "<error message>"}` |
| 402  | `payment_required`                                      | Your account has run out of credits: `{"detail": "Insufficient credits"}`                                                                                                                                            |
| 403  | `forbidden`                                             | API key lacks scope for the path (example: `/v1/contents`): `{"detail": "Missing required scopes"}`                                                                                                                  |
| 404  | `agent_not_found` or `agent_not_supported_yet`          | The agent ID does not exist (or was deleted), or the agent uses an unsupported model/feature                                                                                                                         |
| 422  | `invalid_request`                                       | Invalid parameter combination. For example, passing both `include_domains` and `exclude_domains` in the same request: `{"error": "invalid request parameter(s)"}`                                                    |
| 500  | `Internal Server Error (auth/authorization middleware)` | This can happen in the case of authentication failure: `{"detail": "Internal authentication error"}` or authorization failure: `{"detail": "Internal authorization error"}`                                          |