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

# Authentication & Basics

> API key, rate limits, and response format

Everything you need before hitting the endpoints below.

## Base URL

```
https://api.gigabrain.gg
```

All endpoints are prefixed with `/v1`.

## Authentication

Sign in and go to [Profile → API Keys](https://gigabrain.gg/profile?tab=api) to generate your key. Keys start with `gb_sk_`.

Include it in the `Authorization` header with every request:

```bash theme={null}
Authorization: Bearer gb_sk_<your-key>
```

You can also use the `X-API-Key` header:

```bash theme={null}
X-API-Key: gb_sk_<your-key>
```

## Rate Limits

**60 requests per minute.**

Every response includes headers showing your current usage:

```
X-RateLimit-Limit-Minute: 60
X-RateLimit-Remaining-Minute: 59
X-RateLimit-Reset-Minute: 2026-01-07T13:21:00.000Z
```

When you exceed the limit, you'll get a `429` response with a `Retry-After` header (seconds to wait).

## Response Format

All chat responses return analysis in the `content` field:

```json theme={null}
{
  "session_id": "uuid",
  "content": "The analysis or JSON data goes here",
  "timestamp": "2026-01-07T12:00:00Z"
}
```

<Note>
  The response field is `content` (not `message`).
</Note>

For structured data, add "Respond as JSON with:" to your query and specify the fields. The `content` field will contain parseable JSON instead of markdown.

## Response Times

| Query Type                                                    | Typical Response Time |
| ------------------------------------------------------------- | --------------------- |
| Simple data lookups (prices, funding rates, Fear & Greed)     | 40-60 seconds         |
| Multi-domain analysis (trade setups, protocol deep dives)     | 60-120 seconds        |
| Complex aggregations (yield opportunities, perp DEX rankings) | 120-180 seconds       |
| Maximum timeout                                               | \~600 seconds         |

<Warning>
  Set your HTTP client timeout to at least 600 seconds. If a query times out (504), break it into smaller, more specific requests.
</Warning>

## HTTP Status Codes

| Status | Meaning                             |
| ------ | ----------------------------------- |
| `200`  | Success                             |
| `201`  | Resource created                    |
| `400`  | Bad request                         |
| `401`  | Invalid or revoked API key          |
| `404`  | Resource not found                  |
| `429`  | Rate limit exceeded                 |
| `500`  | Server error                        |
| `504`  | Query timeout (try a simpler query) |

## Support

* **Email:** [support@gigabrain.gg](mailto:support@gigabrain.gg)
* **Telegram:** [t.me/gigabraingg](https://t.me/gigabraingg)

When contacting support, include:

* Your API key (first 10 characters only)
* Session ID from error responses
