TokenLab

파일 및 배치

파일 콘텐츠 검색

파일 콘텐츠를 다운로드합니다.

GET
/v1/files/{file_id}/content

배치 입력, 출력 또는 오류 파일을 다운로드합니다. Anthropic Files 헤더를 사용하면 동일한 API를 통해 현재 워크스페이스의 Anthropic 형식 파일을 다운로드할 수 있습니다.

예시

요청

cURL
curl -X GET "https://api.tokenlab.sh/v1/files/file_abc123/content" \
  -H "Authorization: Bearer sk-your-api-key" \
  --output batch-output.jsonl

콘텐츠 유형

배치 파일은 JSONL 또는 일반 텍스트로 반환됩니다. 이미지 참조 파일은 바이너리 콘텐츠로 반환됩니다.

응답 예시

응답

200 OK
{"custom_id":"request-1","response":{"status_code":200,"body":{"id":"chatcmpl_abc123"}}}
{"custom_id":"request-2","error":{"code":"invalid_request_error","message":"Invalid model"}}

주요 필드

bodybinary|string
파일 콘텐츠입니다. Content-Type에 따라 저장하거나 파싱하십시오. JSONL은 한 줄씩 파싱해야 합니다.
custom_idstring
배치 입력 항목을 결과와 매칭하는 ID입니다.

인증

BearerAuth
AuthorizationBearer <token>

API 키 인증입니다. Dashboard > API > API Keys에서 API 키를 생성하거나 관리하십시오.

위치: header

경로 매개변수

file_id*string

응답

text/plain

application/json