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

# API Reference

> Complete API reference for Nefarious Labs services

# API Reference

Welcome to the Nefarious Labs API reference. Here you'll find detailed documentation for all available endpoints.

## Base URL

```
https://api.nefariouslabs.dev
```

## Authentication

All API requests require an API key. Include it in the request header:

```bash theme={null}
X-API-Key: your-api-key
```

<Warning>
  Never expose your API key in client-side code. Always make API calls from your backend.
</Warning>

## Rate Limiting

Rate limits are applied per API key. When you exceed your rate limit, you'll receive a `429 Too Many Requests` response.

Response headers include:

* `X-RateLimit-Limit`: Your rate limit
* `X-RateLimit-Remaining`: Remaining requests
* `X-RateLimit-Reset`: Unix timestamp when the limit resets

## Error Handling

All errors follow a consistent format:

```json theme={null}
{
  "error": {
    "code": "INVALID_WALLET",
    "message": "The provided wallet address is invalid",
    "details": {}
  }
}
```

### Common Error Codes

| Code             | HTTP Status | Description                |
| ---------------- | ----------- | -------------------------- |
| `UNAUTHORIZED`   | 401         | Invalid or missing API key |
| `RATE_LIMITED`   | 429         | Rate limit exceeded        |
| `INVALID_PARAMS` | 400         | Invalid request parameters |
| `NOT_FOUND`      | 404         | Resource not found         |
| `INTERNAL_ERROR` | 500         | Internal server error      |

## SDKs

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="js" href="https://github.com/nefarious-labs/sdk-ts">
    Official TypeScript/JavaScript SDK
  </Card>

  <Card title="Python SDK" icon="python" href="https://github.com/nefarious-labs/sdk-python">
    Official Python SDK
  </Card>
</CardGroup>
