---
title: "Errors"
description: "The error codes a refused request answers with, and what a failed read means."
---

> Documentation Index
> Fetch the complete documentation index at: https://api.whyviral.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

A refused request answers with an HTTP error status and a body naming the `code`. Some codes add details, such as `cap` here.

```json title="429 response"
{
  "error": {
    "code": "MONTHLY_LIMIT",
    "message": "This key's limit of 1,000 reads this month is used up",
    "cap": 1000
  }
}
```

| `code` | Status | What it means |
| --- | --- | --- |
| `INVALID_REQUEST` | 400 | The body isn’t JSON, its `url` is missing or too long, or a parameter has a value it doesn’t take. |
| `UNSUPPORTED_LINK` | 400 | The link isn’t one TikTok, Instagram, YouTube or X post. |
| `INVALID_PERIOD` | 400 | `days` isn’t a period this endpoint takes; `days` in the answer lists the ones it does. |
| `AMBIGUOUS_PROJECT` | 400 | Several of your projects share the name you sent; pass the project’s `id`. |
| `INVALID_REPORT` | 400 | The report can’t be made as asked, for example with no creator or too many. |
| `CREATOR_NOT_SAVED` | 400 | A creator you named isn’t among the project’s saved creators. |
| `TOO_MANY_REPORTS` | 400 | The project holds as many reports as it can; delete one in the app. |
| `INVALID_API_KEY` | 401 | The key is missing, mistyped or revoked. |
| `INSUFFICIENT_CREDITS` | 402 | The balance can’t pay for the read; `required` and `balance` say by how much. |
| `ACCOUNT_DISABLED` | 403 | The key’s account is disabled. |
| `NOT_FOUND` | 404 | No read, project, creator, campaign or report like this on your account. |
| `TRACKER_NOT_FOUND` | 404 | `tracker` isn’t the id or exact name of anything the project tracks. |
| `MONTHLY_LIMIT` | 429 | The key used up the monthly limit its owner set; `cap` gives it. |
| `RATE_LIMITED` | 429 | Too many new reads, data requests, searches or report links; wait the `Retry-After` header’s seconds. |
| `INTERNAL` | 500 | Something broke on our side; try again. |
| `SEARCH_UNAVAILABLE` | 503 | A search by sentence can’t run right now; try again, or search by filters alone. |

When a 429 carries a `Retry-After` header, wait that many seconds before you ask again.

## When a read fails

A read that can’t be made answers 200 with `status: "failed"` and an `error`. It’s refunded: `credits` is 0, and it doesn’t count toward the key’s monthly limit.

| `error.code` | What it means |
| --- | --- |
| `TOO_LONG` | A video longer than 180 seconds. |
| `NOT_FOUND` | The post doesn’t exist or was deleted. |
| `PRIVATE` | The post is private. |
| `UNAVAILABLE` | The post was taken down or isn’t available to us. |
| `TIMEOUT` | Reading the post took too long. |

Any other code means the read didn’t work this time. Sending the link again starts a new read, except for a post that was too long, missing, private or unavailable: that failure comes back at once, free, until WhyViral checks the post again.

Source: https://api.whyviral.ai/errors/index.mdx
