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

# 토큰 목록 조회

> 현재 사용자의 API 토큰 목록을 페이지네이션으로 조회

> 업데이트: 2026-07-20

## 인터페이스 설명

현재 사용자가 생성한 모든 API 토큰(Token)을 조회하며, 페이지네이션을 지원합니다.

<Note>
  이 `/api/token/*` 계열 인터페이스는 주로 Crazyrouter 콘솔에서 API Key 관리 자동화에 사용됩니다. 사용자 `access token`과 `New-Api-User` 요청 헤더가 필요하며, 일반적인 `sk-xxx` 모델 호출 흐름에서 직접 사용하는 인터페이스가 아닙니다. 요청 기본 주소는 반드시 `https://crazyrouter.com`을 사용해야 합니다. `https://api.crazyrouter.com`은 모델 API 전용 진입점이므로 관리 경로를 호출하면 `404 api_only_endpoint`가 반환됩니다.
</Note>

## 인증 방식

사용자의 Access Token으로 인증하며, 요청 헤더에 다음을 포함해야 합니다.

```text theme={null}
Authorization: Bearer {access_token}
New-Api-User: {user_id}
```

## 요청 파라미터

<ParamField query="p" type="integer" default="1">
  페이지 번호. 코드는 이전 방식과의 호환성을 유지하지만, `1`부터 시작하는 것을 권장합니다
</ParamField>

<ParamField query="size" type="integer" default="10">
  페이지당 개수, 최대 100
</ParamField>

## 응답 형식

```json theme={null}
{
  "success": true,
  "message": "",
  "data": {
    "page": 1,
    "page_size": 10,
    "total": 1,
    "items": [
      {
        "id": 1,
        "user_id": 1,
        "key": "sk-xxxxxxxxxxxxxxxx",
        "status": 1,
        "name": "내 토큰",
        "created_time": 1706000000,
        "accessed_time": 1706100000,
        "expired_time": -1,
        "remain_quota": 500000,
        "unlimited_quota": false,
        "model_limits_enabled": true,
        "model_limits": "[\"gpt-5.5\",\"claude-opus-4-8\"]",
        "allow_ips": "203.0.113.10",
        "used_quota": 12345,
        "group": "default"
      }
    ]
  }
}
```

## 필드 설명

| 필드                     | 타입     | 설명                          |
| ---------------------- | ------ | --------------------------- |
| `id`                   | int    | 토큰 ID                       |
| `key`                  | string | API Key(sk-xxx 형식)          |
| `status`               | int    | 상태: 1=활성화, 2=비활성화           |
| `name`                 | string | 토큰 이름                       |
| `expired_time`         | int    | 만료 타임스탬프, `-1`은 만료되지 않음을 의미 |
| `remain_quota`         | int    | 잔여 크레딧                      |
| `unlimited_quota`      | bool   | 무제한 크레딧 여부                  |
| `used_quota`           | int    | 이미 사용한 크레딧                  |
| `model_limits_enabled` | bool   | 모델 화이트리스트 활성화 여부            |
| `model_limits`         | string | 모델 제한 설정 문자열                |
| `allow_ips`            | string | IP 화이트리스트 문자열               |
| `group`                | string | 그룹                          |

## 코드 예시

<CodeGroup>
  ```python Python theme={null}
  import requests

  headers = {
      "Authorization": "Bearer your_access_token",
      "New-Api-User": "1",
      "User-Agent": "Mozilla/5.0"
  }

  response = requests.get(
      "https://crazyrouter.com/api/token/?p=1&size=100",
      headers=headers
  )

  page = response.json()["data"]
  for token in page["items"]:
      print(f"[{token['name']}] {token['key'][:10]}... 크레딧: {token['remain_quota']}")
  ```

  ```bash cURL theme={null}
  curl "https://crazyrouter.com/api/token/?p=1&size=100" \
    -H "Authorization: Bearer your_access_token" \
    -H "New-Api-User: 1"
  ```
</CodeGroup>
