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

# 빠른 시작

> 첫 번째 AFK Crypto API 호출

## 4단계로 시작하기

계정을 만들고 자동화를 활성화하며 API 키를 생성하고 첫 요청을 수행합니다.

### 1단계: 로그인

<AccordionGroup>
  <Accordion icon="user" title="계정에 로그인">
    <a href="https://app.afkcrypto.com">app.afkcrypto.com</a> 에 접속하세요.
  </Accordion>
</AccordionGroup>

### 2단계: 자동화 활성화(지갑)

<AccordionGroup>
  <Accordion icon="toggle-on" title="AFK가 대신 서명하도록 허용(비수탁)">
    <a href="https://app.afkcrypto.com/wallets">Wallets</a> 페이지에서 주소의 Automation을 켜세요. 세션 기반 비수탁 서명으로 자동화 워크플로우의 트랜잭션에 서명합니다. 언제든 해제할 수 있습니다.
  </Accordion>
</AccordionGroup>

### 3단계: API 키 생성(지갑 자동화)

<AccordionGroup>
  <Accordion icon="key" title="API 키 생성">
    대시보드 <a href="https://app.afkcrypto.com/api-keys">API Keys</a>에서 지갑 자동화용 API 키를 생성합니다.

    * 헤더: `x-api-key: afk_<prefix>_<random>`
    * 비밀로 유지하세요. 유출 시 교체

    자세한 내용은 <a href="/api-reference/authentication/">인증</a>을 참조하세요.
  </Accordion>
</AccordionGroup>

### 4단계: API 호출 수행

<AccordionGroup>
  <Accordion icon="list" title="지갑 목록 조회">
    재사용을 위해 환경 변수에 API 키 설정:

    ```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="자산 전송(멱등)">
    모든 쓰기 엔드포인트에 `Idempotency-Key: <uuid>`를 포함하세요.

    ```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="컨트랙트 상호작용(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="SPL 토큰 전송(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="트랜잭션 조회">
    ```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>

## 다음 단계

핵심 엔드포인트 살펴보기:

<CardGroup cols={2}>
  <Card title="자산 전송" icon="paper-plane" href="/api-reference/endpoint/send/">
    네이티브 및 토큰 자산 전송.
  </Card>

  <Card title="토큰 승인" icon="key" href="/api-reference/endpoint/token-approve/">
    ERC20 허용량 설정.
  </Card>

  <Card title="거래" icon="right-left" href="/api-reference/endpoint/trade-quote/">
    견적 요청 및 스왑 실행.
  </Card>

  <Card title="API 문서" icon="code" href="/api-reference/introduction/">
    엔드포인트와 규약을 확인.
  </Card>
</CardGroup>

<Note>
  **도움이 필요하신가요?** <a href="mailto:hello@afkcrypto.com">[hello@afkcrypto.com](mailto:hello@afkcrypto.com)</a> 으로 이메일하거나 <a href="https://twitter.com/afkcryptoai">Twitter</a> 에서 문의하세요.
</Note>
