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

# Autenticación

> Cada petición se autentica con una clave API en el header X-API-Key.

Todas las peticiones (excepto `/api/status`) exigen tu clave API en el header **`X-API-Key`**.

```bash theme={null}
curl https://api.apinn.io/api/sports \
  -H "X-API-Key: pnk_tu_clave"
```

## Obtener y gestionar tu clave

Tu clave se emite en el registro y es visible en tu [área de cliente](https://www.apinn.io/account). Puedes **regenerarla** en cualquier momento — la antigua queda invalidada inmediatamente.

<Warning>
  Nunca compartas tu clave ni la expongas en el navegador. Llama a la API desde tu servidor.
</Warning>

## Respuestas de error

| Código | Significado                                           |
| ------ | ----------------------------------------------------- |
| `401`  | Clave ausente, inválida o revocada.                   |
| `429`  | Cuota horaria superada — ver el header `Retry-After`. |
| `422`  | Parámetro obligatorio ausente (p. ej. `event_id`).    |

```json 401 theme={null}
{ "detail": "Not authenticated" }
```

Ver [Cuotas y límites](/es/rate-limits) para el detalle del header `Retry-After` y del conteo.
