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

# 파일 목록

> 배치 워크플로우와 지원되는 파일 기반 호환 모드용 업로드 파일을 나열합니다.

## 개요

이 엔드포인트는 주로 TokenLab의 OpenAI 호환 Batch API를 대상으로 합니다. 업로드된 배치 입력과 생성된 출력 또는 오류 파일을 포함합니다.

요청이 Anthropic Files 호환 모드를 선택한 경우, 같은 경로에서 바인딩된 작업공간의 Anthropic 스타일 파일도 나열할 수 있습니다.

Anthropic 헤더가 없으면 목록에 배치 파일과 TokenLab 이미지/참조 파일이 함께 포함될 수 있습니다. `purpose=batch`, `purpose=batch_output`, `purpose=user_data`, `purpose=vision`으로 범위를 좁힐 수 있습니다.

## 참고 사항

* 배치 입력 파일은 `purpose=batch`를 사용해야 합니다.
* 생성된 출력 파일만 보려면 `purpose=batch_output`을 사용하세요.
* `completion_window`는 현재 `24h`입니다.
* 출력 순서는 보장되지 않으므로 항상 `custom_id`로 일치시켜야 합니다.
* 배치 항목 내에서는 스트리밍이 지원되지 않습니다.

## 예시

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.tokenlab.sh/v1/files?purpose=batch&limit=20" \
    -H "Authorization: Bearer sk-your-api-key"
  ```
</RequestExample>

## 요청 / 응답

정확한 스키마는 위의 대화형 OpenAPI 패널을 참고하세요.

## 운영 팁

* 다운스트림 조정을 멱등적으로 하려면 `custom_id`를 사용하세요.
* 작업자가 배치를 최종화한 뒤에만 `output_file_id`와 `error_file_id`가 생깁니다.
* 배치 가격은 `isBatchRequest=true` 할인 규칙 때문에 동기 가격과 다를 수 있습니다.

## 응답 예시

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "object": "list",
    "data": [{ "id": "file_abc123", "object": "file", "purpose": "batch" }]
  }
  ```
</ResponseExample>

## 중요 필드

<ResponseField name="object" type="string">응답 object type입니다.</ResponseField>
<ResponseField name="data" type="array">이 응답에서 반환되는 목록 또는 payload입니다.</ResponseField>
