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

# API reference

> Access the Sunrise API OpenAPI specification.

The Sunrise API is served from `https://api.sunrise.xyz`. Send your API key as a Bearer token on every request:

```http theme={null}
Authorization: Bearer <your-api-key>
```

Every response includes a `requestId`, also sent as the `X-Request-Id` header.

Every error carries a `code` that means one next step. See [Errors](https://docs.sunrise.xyz/api-reference/errors.md) for every code and what to do.

The full specification is at [`https://api.sunrise.xyz/openapi`](https://api.sunrise.xyz/openapi). For a complete swap, see [Swap with the API](https://docs.sunrise.xyz/recipes/swap.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.