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

# API 레퍼런스 개요

> AgentWallex REST API의 기본 URL, 인증, 페이지네이션, 오류 규약입니다.

## 기본 URL

```
Sandbox:    https://api-sandbox.agentwallex.com/api/v1
Production: https://api.agentwallex.com/api/v1
```

<Note>
  개발 및 테스트에는 샌드박스 URL을 사용하세요. 실제 자금으로 거래할 준비가 된 경우에만 프로덕션으로 전환하세요.
</Note>

## 인증

모든 API 요청에는 다음 인증 헤더 중 하나가 포함되어야 합니다:

| 방법         | 헤더              | 예시                                    |
| ---------- | --------------- | ------------------------------------- |
| API Key    | `X-API-Key`     | `X-API-Key: awx_your_api_key`         |
| JWT Bearer | `Authorization` | `Authorization: Bearer eyJhbGciOi...` |

```bash theme={null}
# API key authentication
curl -X GET https://api.agentwallex.com/api/v1/agents \
  -H "X-API-Key: awx_your_api_key"

# JWT authentication
curl -X GET https://api.agentwallex.com/api/v1/agents \
  -H "Authorization: Bearer eyJhbGciOi..."
```

자격 증명 획득 및 관리에 대한 전체 세부 사항은 [인증](/ko/introduction/authentication)을 참조하세요.

## 페이지네이션

모든 목록 엔드포인트는 다음 쿼리 매개변수를 통해 페이지네이션을 지원합니다:

| 매개변수        | 기본값 | 최대  | 설명              |
| ----------- | --- | --- | --------------- |
| `page_num`  | 1   | --  | 페이지 번호 (1부터 시작) |
| `page_size` | 20  | 100 | 페이지당 항목 수       |

응답 형식:

```json theme={null}
{
  "data": [],
  "total": 42,
  "has_more": true
}
```

## 오류 규약

모든 오류는 일관된 형식을 따릅니다:

```json theme={null}
{
  "code": "invalid_request",
  "type": "invalid_request_error",
  "message": "human readable error description"
}
```

### 오류 유형

| 유형                      | HTTP 상태 | 설명                    |
| ----------------------- | ------- | --------------------- |
| `invalid_request_error` | 400     | 유효하지 않은 요청 본문 또는 매개변수 |
| `authentication_error`  | 401     | 누락되었거나 유효하지 않은 자격 증명  |
| `authorization_error`   | 403     | 권한 부족                 |
| `not_found_error`       | 404     | 리소스가 존재하지 않음          |
| `rate_limit_error`      | 429     | 속도 제한 초과              |
| `internal_error`        | 500     | 서버 측 오류               |

자세한 오류 처리 가이드는 [오류 처리](/ko/guides/error-handling)를 참조하세요.

## API 섹션

<CardGroup cols={2}>
  <Card title="에이전트" icon="robot" href="/ko/api-reference/agents-create">
    AI 에이전트 지갑을 생성하고 관리합니다.
  </Card>

  <Card title="거래" icon="arrow-right-arrow-left" href="/ko/api-reference/transactions-create">
    결제를 전송하고 거래 내역을 조회합니다.
  </Card>

  <Card title="정책" icon="shield-check" href="/ko/api-reference/policies">
    지출 한도 및 접근 제어를 구성합니다.
  </Card>

  <Card title="웹훅" icon="bell" href="/ko/api-reference/webhooks">
    웹훅 엔드포인트를 등록하고 관리합니다.
  </Card>

  <Card title="x402 결제" icon="credit-card" href="/ko/api-reference/x402-pay">
    x402 소액 결제 협상을 실행합니다.
  </Card>

  <Card title="x402 세션" icon="clock" href="/ko/api-reference/x402-sessions">
    x402 세션 예산을 관리합니다.
  </Card>
</CardGroup>
