> ## 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 헤더가 없으면 이 라우트는 배치 파일 내용을 다운로드합니다. 제공업체가 파일 내용 조회를 지원하면 바인딩된 이미지/참조 파일 내용도 프록시합니다.

## 참고 사항

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

## 예시

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.tokenlab.sh/v1/files/file_abc123/content" \
    -H "Authorization: Bearer sk-your-api-key" \
    --output batch-output.jsonl
  ```
</RequestExample>

## 요청 / 응답

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

## 운영 팁

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

## 응답 예시

<ResponseExample>
  ```jsonl 200 OK theme={null}
  {"custom_id":"request-1","response":{"status_code":200,"body":{"id":"chatcmpl_abc123"}}}
  {"custom_id":"request-2","error":{"code":"invalid_request_error","message":"Invalid model"}}
  ```
</ResponseExample>

## 중요 필드

<ResponseField name="body" type="binary|string">원본 response body입니다. JSON으로 파싱하지 말고 그대로 저장하세요.</ResponseField>
<ResponseField name="custom_id" type="string">후속 호출과 지원 조사에 사용하는 식별자입니다.</ResponseField>
