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

# API Reference

> Reference for Token Layer REST endpoints and generated OpenAPI docs

## Overview

The OpenAPI spec in this site is generated from the Supabase edge-function source in this repo. It currently documents the public Token Layer REST surface, including:

* token discovery and pricing
* Token Layer action execution
* fees, referrals, portfolio, and leaderboard reads
* social and hub endpoints used by the app
* user, notification, and search endpoints

## Base URL

```
https://api.tokenlayer.network/functions/v1
```

Testnet base URL:

```
https://api-testnet.tokenlayer.network/functions/v1
```

## Authentication

Authentication depends on the route. Common patterns are:

```bash theme={null}
Authorization: Bearer <API_KEY_OR_JWT>
```

* many `info` reads are public
* account-bound reads and actions require API key or JWT auth
* selected action flows also support wallet signing through the SDK and CLI

## Core endpoints

* `POST /info` consolidates typed read operations behind a discriminated request union
* `POST /token-layer` executes typed protocol actions
* other routes expose direct endpoint-specific operations such as `/me`, `/search-token`, and `/get-pool-data`

Browse the generated endpoint pages in the navigation.

### Quick Links

<CardGroup cols={2}>
  <Card title="Info Endpoint" icon="circle-info" href="/api-reference/tokens/get-info-data">
    Typed read operations through `POST /info`
  </Card>

  <Card title="Token Layer Actions" icon="bolt" href="/api-reference/transactions/execute-token-layer-action">
    Execute actions through `POST /token-layer`
  </Card>

  <Card title="SDK" icon="code" href="/integrations/sdk-typescript">
    Typed TypeScript client
  </Card>

  <Card title="CLI" icon="terminal" href="/integrations/token-layer-cli">
    Scriptable Rust command surface
  </Card>
</CardGroup>

## Source of truth

The canonical spec file is `api-docs/openapi.yaml`, generated by:

```bash theme={null}
npm run generate-openapi
```
