파일 및 배치
파일 검색
업로드된 단일 파일의 메타데이터를 검색합니다.
파일의 이름, 크기, 용도 및 생성 시간을 반환합니다. Anthropic 헤더가 없는 경우, 이 엔드포인트는 배치(batch) 및 이미지 참조 파일을 다룹니다. Anthropic Files 헤더가 있는 경우, Anthropic 형식의 파일을 다룹니다.
요청
curl -X GET "https://api.tokenlab.sh/v1/files/file_abc123" \
-H "Authorization: Bearer sk-your-api-key"이미지 참조 파일
이 엔드포인트는 TokenLab에서 생성한 이미지 참조 파일에 대한 메타데이터도 반환할 수 있습니다. status 필드는 선택 사항이며, 이를 제공하지 않는 파일 제품군에서는 생략될 수 있습니다.
응답
{
"id": "file_abc123",
"object": "file",
"bytes": 32768,
"created_at": 1706000000,
"filename": "batch-input.jsonl",
"purpose": "batch"
}주요 필드
idstring
파일 ID입니다.
filenamestring
원본 또는 생성된 파일 이름입니다.
purposestring
batch, batch_output, user_data 또는 vision과 같은 파일 용도입니다.인증
BearerAuth AuthorizationBearer <token>
API 키 인증입니다. Dashboard > API > API Keys에서 API 키를 생성하거나 관리하십시오.
위치: header
경로 매개변수
file_id*string
헤더
anthropic-beta?string
Anthropic Files API 모드를 사용하려면 files-api-2025-04-14를 포함하십시오.
응답
application/json
application/json