> ## 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.

# Quickstart

> Choose the fastest way to integrate with Token Layer

Token Layer exposes the same protocol surface through three integration paths:

* raw HTTP calls against the REST API
* the TypeScript SDK for typed app integrations
* the Rust CLI for agents, scripts, and terminal workflows

## Base URLs

```bash theme={null}
export TL_API_URL="https://api.tokenlayer.network/functions/v1"
export TL_TESTNET_API_URL="https://api-testnet.tokenlayer.network/functions/v1"
```

## Choose your integration path

<CardGroup cols={3}>
  <Card title="REST API" icon="globe" href="/api-reference">
    Direct HTTP access to the full public surface
  </Card>

  <Card title="TypeScript SDK" icon="code" href="/integrations/sdk-typescript">
    Typed client for `/token-layer` and `/info`
  </Card>

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

## Option 1: Start with raw HTTP

Use `POST /info` for read-oriented operations and `POST /token-layer` for action execution.

```bash theme={null}
curl -X POST "${TL_API_URL}/info" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "getTokensV2",
    "keyword": "base",
    "limit": 10,
    "offset": 0,
    "order_by": "volume_24h",
    "order_direction": "DESC"
  }'
```

For authenticated requests:

```bash theme={null}
curl -X GET "${TL_API_URL}/me" \
  -H "Authorization: Bearer ${TL_API_KEY}"
```

## Option 2: Start with the SDK

```bash theme={null}
npm install @token-layer/sdk-typescript viem
```

```ts theme={null}
import { TokenLayer } from "@token-layer/sdk-typescript";

const tokenLayer = new TokenLayer({
  baseUrl: "https://api.tokenlayer.network/functions/v1",
  auth: { type: "apiKey", token: process.env.TL_API_KEY! },
});

const tokens = await tokenLayer.info.getTokensV2({
  keyword: "base",
  limit: 10,
  offset: 0,
  order_by: "volume_24h",
  order_direction: "DESC",
});
```

## Option 3: Start with the CLI

```bash theme={null}
cd packages/token-layer-cli
cargo install --path .

tokenlayer init --quick-wallet --name default
tokenlayer info get-tokens-v2 --order-by volume_24h --limit 10
```

## Authentication

Depending on the endpoint and client, Token Layer supports:

* API key auth
* JWT auth
* wallet-signed auth for supported flows

## Next steps

* Read the [API Reference](/api-reference)
* Integrate with the [TypeScript SDK](/integrations/sdk-typescript)
* Automate workflows with the [Token Layer CLI](/integrations/token-layer-cli)
* Connect AI clients with the [MCP Server](/mcp-server)
