> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Code Reference

> Complete reference for every HTTP status code and apiCode the Geekflare API can return, with sample responses.

Every Geekflare API response includes an `apiCode` that mirrors the HTTP status code, plus a `message` describing what went wrong. Use this page as the canonical reference; the sections below link to dedicated troubleshooting guides for the most common failures.

## Success

| Code  | Meaning | Notes                                                  |
| ----- | ------- | ------------------------------------------------------ |
| `200` | Success | The request completed and `data` contains your result. |

## Client Errors (4xx)

| Code  | Meaning                           | Guide                                       |
| ----- | --------------------------------- | ------------------------------------------- |
| `401` | Missing or invalid `x-api-key`    | [Unauthorized](/unauthorized)               |
| `402` | Credit balance exhausted          | [Credit Exhausted](/credit-exhausted)       |
| `403` | Endpoint requires a higher plan   | [Forbidden](/forbidden)                     |
| `404` | Wrong endpoint URL or HTTP method | —                                           |
| `429` | Rate limit exceeded               | [Rate Limit Exceeded](/rate-limit-exceeded) |

### 404 — Not Found

Returned when the endpoint path or HTTP method is wrong (for example, sending a `GET` request to an endpoint that only accepts `POST`).

```json theme={null}
{
  "timestamp": 1657208461046,
  "apiStatus": "failure",
  "apiCode": 404,
  "message": "API not found.",
  "meta": {
    "method": "POST",
    "endpoint": "/helloworld"
  }
}
```

<Tip>Double-check the endpoint path against the [API Reference](/endpoint/reference) and confirm you're using the correct HTTP method.</Tip>

## Server Errors (5xx)

Any `5xx` response indicates an issue on Geekflare's infrastructure, not your request. These are generally **not charged** against your credit balance — see [Failed Requests](/api-credit-mapping#2-failed-requests).

If you see a `5xx` error, check [status.geekflare.com](https://status.geekflare.com/) first to confirm whether it's a known incident, then retry with backoff (see [Best Practices](/best-practices)). If it persists, [contact support](https://geekflare.com/contact/?product=api).

## Related

<CardGroup cols={2}>
  <Card title="Unauthorized (401)" icon="key" href="/unauthorized">
    Missing or invalid API key
  </Card>

  <Card title="Credit Exhausted (402)" icon="coins" href="/credit-exhausted">
    Zero credit balance
  </Card>

  <Card title="Forbidden (403)" icon="ban" href="/forbidden">
    Endpoint not available on your plan
  </Card>

  <Card title="Rate Limit Exceeded (429)" icon="gauge" href="/rate-limit-exceeded">
    Too many requests per second
  </Card>
</CardGroup>
