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

# Quickstart

> Your first AFK Crypto API call

## Get started in 4 steps

Create an account, enable automation, create an API key, and make your first request.

### Step 1: Sign in

<AccordionGroup>
  <Accordion icon="user" title="Sign into your account">
    Sign in at <a href="https://app.afkcrypto.com">app.afkcrypto.com</a>.
  </Accordion>
</AccordionGroup>

### Step 2: Enable automation (Wallets)

<AccordionGroup>
  <Accordion icon="toggle-on" title="Allow AFK to sign for you (non-custodial)">
    In the <a href="https://app.afkcrypto.com/wallets">Wallets</a> page, toggle on Automation for your address. This enables AFK to sign transactions for automated workflows using session-based, non-custodial signing. You can revoke at any time.
  </Accordion>
</AccordionGroup>

### Step 3: Create API key (wallet automation)

<AccordionGroup>
  <Accordion icon="key" title="Create API key">
    In the dashboard's <a href="https://app.afkcrypto.com/api-keys">API Keys</a> page, create an API key for wallet automation.

    * Header: `x-api-key: afk_<prefix>_<random>`
    * Keep this secret; rotate if compromised

    See <a href="/api-reference/authentication/">Authentication</a> for details.
  </Accordion>
</AccordionGroup>

### Step 4: Make API calls

<AccordionGroup>
  <Accordion icon="list" title="List wallets">
    Set your API key in an environment variable for reuse:

    ```bash theme={null}
    export AFK_API_KEY="afk_abcd_xxx"
    ```

    ```bash theme={null}
    curl -s -H "x-api-key: $AFK_API_KEY" \
      "https://api.afkcrypto.com/v1/wallets?chain=ethereum"
    ```

    ```json theme={null}
    {
      "wallets": [
        {
          "address": "0xabc...",
          "chainType": "ethereum",
          "isDefault": true,
          "automationEnabled": true,
          "providerType": "embedded",
          "clientType": "privy"
        }
      ]
    }
    ```
  </Accordion>

  <Accordion icon="paper-plane" title="Send an asset (idempotent)">
    Provide `Idempotency-Key: <uuid>` on all write endpoints.

    ```bash theme={null}
    curl -s -X POST https://api.afkcrypto.com/v1/send \
      -H "x-api-key: $AFK_API_KEY" -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
        "chain":"base-sepolia",
        "asset":"erc20",
        "token":"0xToken",
        "to":"0xRecipient",
        "amount":"1000000000000000000"
      }'
    ```

    ```json theme={null}
    { "id": "tx_...", "status": "SUBMITTED", "hash": "0x...", "explorerUrl": "https://basescan.org/tx/0x...", "chainName": "Base" }
    ```
  </Accordion>

  <Accordion icon="bolt" title="Interact with contracts (EVM)">
    ```bash theme={null}
    curl -s -X POST https://api.afkcrypto.com/v1/contracts/send \
      -H "x-api-key: $AFK_API_KEY" -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
        "chain":"base-sepolia",
        "to":"0xContract",
        "data":"0xabcdef...",
        "value":"0"
      }'
    ```
  </Accordion>

  <Accordion icon="circle-nodes" title="Send SPL token (Solana)">
    ```bash theme={null}
    curl -s -X POST https://api.afkcrypto.com/v1/send \
      -H "x-api-key: $AFK_API_KEY" -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
        "chain":"solana-devnet",
        "asset":"spl",
        "token":"MintAddress",
        "to":"RecipientOwnerAddress",
        "amount":"1000000"
      }'
    ```
  </Accordion>

  <Accordion icon="receipt" title="Lookup transaction">
    ```bash theme={null}
    curl -s -H "x-api-key: $AFK_API_KEY" \
      "https://api.afkcrypto.com/v1/tx/tx_cuid_here"
    ```

    ```json theme={null}
    {
      "id":"tx_cuid_here",
      "status":"PENDING",
      "hash": null,
      "explorerUrl": null,
      "chainName":"Base",
      "chainType":"ethereum",
      "chainId":8453,
      "to":"0xrecipient...",
      "value":"1000000000000000",
      "error": null,
      "createdAt":"2025-08-25T08:00:00.000Z",
      "updatedAt":"2025-08-25T08:00:00.000Z"
    }
    ```
  </Accordion>
</AccordionGroup>

## Next steps

Explore the core endpoints next:

<CardGroup cols={2}>
  <Card title="Send asset" icon="paper-plane" href="/api-reference/endpoint/send/">
    Transfer native and token assets.
  </Card>

  <Card title="Approve tokens" icon="key" href="/api-reference/endpoint/token-approve/">
    Approve ERC20 allowances.
  </Card>

  <Card title="Trade" icon="right-left" href="/api-reference/endpoint/trade-quote/">
    Request quotes and execute swaps.
  </Card>

  <Card title="API documentation" icon="code" href="/api-reference/introduction/">
    Explore endpoints and conventions.
  </Card>
</CardGroup>

<Note>
  **Need help?** Email <a href="mailto:hello@afkcrypto.com">[hello@afkcrypto.com](mailto:hello@afkcrypto.com)</a> or reach out on <a href="https://twitter.com/afkcryptoai">Twitter</a>.
</Note>
