> ## 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`를 사용해야 합니다.
* `completion_window`는 현재 `24h`입니다.
* 출력 순서는 보장되지 않으므로 항상 `custom_id`로 일치시켜야 합니다.
* 배치 항목 내에서는 스트리밍이 지원되지 않습니다.

## 예시

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.tokenlab.sh/v1/files/file_abc123" \
    -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}
  {
    "id": "file_abc123",
    "object": "file",
    "bytes": 32768,
    "created_at": 1706000000,
    "filename": "batch-input.jsonl",
    "purpose": "batch"
  }
  ```
</ResponseExample>

## 중요 필드

<ResponseField name="id" type="string">관련 API에서 사용하는 file identifier입니다.</ResponseField>
<ResponseField name="filename" type="string">원본 또는 생성된 파일 이름입니다.</ResponseField>
<ResponseField name="purpose" type="string">소유 워크플로에서 사용하는 파일 purpose입니다. 예: `batch`, `batch_output`, `user_data`, `vision`.</ResponseField>
