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

# Overview

> The LightSwap API reference: base URL, authentication, endpoint list, and the shared error format.

This reference is generated from the LightSwap API OpenAPI specification. Each endpoint page documents request fields, response fields, and every error response with examples.

Use canonical lowercase `network` values such as `solana`, `base`, `bitcoin`, and `tron` when calling the API.

## Base URL

```text theme={null}
https://lightswap.me/api/partner/v1
```

## Authentication

Every request requires the `x-api-key` header:

```http theme={null}
x-api-key: <api_key>
```

## Endpoints

<CardGroup cols={2}>
  <Card title="Assets" icon="coins" href="/api-reference/asset">
    List active assets and filter by network or symbol.
  </Card>

  <Card title="Address validation" icon="shield-check" href="/api-reference/address">
    Validate a payout address before creating a swap.
  </Card>

  <Card title="Quotes" icon="badge-dollar-sign" href="/api-reference/quote">
    Create a short-lived exact-input quote.
  </Card>

  <Card title="Swaps" icon="repeat" href="/api-reference/swap">
    Create a swap and poll its status.
  </Card>
</CardGroup>

## Response format

Successful responses return the endpoint payload directly. Error responses use a shared structure:

```json theme={null}
{
  "error": {
    "code": "quote_expired",
    "message": "Quote has expired.",
    "details": {}
  },
  "requestId": "request-id"
}
```

The endpoint pages show which status codes each endpoint returns and which error codes come with them. [Statuses and errors](/integrations/direct-api/statuses-errors) lists every code with suggested handling.
