{"openapi":"3.0.3","info":{"title":"APICK 유튜브 다운로드 화질 조회","version":"1.0.0","description":"유튜브 공개 영상에서 받을 수 있는 화질·코덱·용량과 오디오 형식, 화질별 예상 다운로드 요금을 조회합니다."},"servers":[{"url":"https://apick.app"}],"paths":{"/rest/youtube_formats":{"post":{"summary":"유튜브 다운로드 화질 조회","description":"유튜브 공개 영상에서 받을 수 있는 화질·코덱·용량과 오디오 형식, 화질별 예상 다운로드 요금을 조회합니다.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"서비스별 성공·처리 상태 응답","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"video_id":{"type":"string","description":"11자리 영상 ID"},"title":{"type":"string","description":"영상 제목"},"duration":{"type":"integer","description":"영상 길이(초)"},"live_status":{"type":"string","description":"라이브 상태(not_live·is_live·was_live 등)"},"downloadable":{"type":"boolean","description":"다운로드 가능 여부. 진행 중·예정 라이브는 false"},"video_formats":{"type":"array","items":{"type":"object","properties":{"quality":{"type":"string","description":"화질 이름 (예: 1080p)"},"width":{"type":"integer","description":"가로 픽셀"},"height":{"type":"integer","description":"세로 픽셀"},"fps":{"type":"integer","description":"초당 프레임 수"},"codec":{"type":"string","description":"영상 코덱 (H.264·VP9·AV1 등)"},"hdr":{"type":"boolean","description":"HDR 여부"},"has_audio":{"type":"boolean","description":"소리가 함께 들어 있는 형식인지 여부"},"bitrate_kbps":{"type":"integer","description":"평균 비트레이트(kbps)"},"filesize":{"type":"integer","description":"용량(바이트). 모르면 null","nullable":true},"filesize_estimated":{"type":"boolean","description":"용량이 추정값인지 여부"}}},"description":"영상 형식 목록 (높은 화질 순)"},"audio_formats":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string","description":"오디오 코덱 (AAC·Opus 등)"},"bitrate_kbps":{"type":"integer","description":"비트레이트(kbps)"},"sample_rate":{"type":"integer","description":"샘플레이트(Hz)"},"channels":{"type":"integer","description":"채널 수"},"language":{"type":"string","description":"음성 언어 코드. 모르면 null","nullable":true},"filesize":{"type":"integer","description":"용량(바이트)"},"filesize_estimated":{"type":"boolean","description":"용량이 추정값인지 여부"}}},"description":"오디오 형식 목록 (높은 비트레이트 순)"},"download_options":{"type":"object","properties":{"video":{"type":"array","items":{"type":"object","properties":{"quality":{"type":"string"},"estimated_size":{"type":"integer"},"estimated_cost":{"type":"integer"}}},"description":"화질별 {quality, estimated_size, estimated_cost}. quality 값을 그대로 유튜브 동영상 다운로드의 quality 로 쓸 수 있습니다."},"audio":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string"},"bitrate":{"type":"integer","nullable":true},"estimated_size":{"type":"integer"},"estimated_cost":{"type":"integer"}}},"description":"오디오 {format, bitrate, estimated_size, estimated_cost}"}},"description":"다운로드 API로 받을 때의 예상 용량·요금(선불 기준)"},"success":{"type":"integer","description":"과금 여부0: 실패1: 성공"}},"description":"조회 데이터"},"api":{"type":"object","properties":{"success":{"type":"boolean","description":"API 서버 정상 응답 여부"},"cost":{"type":"integer","description":"API 호출 요금"},"pl_id":{"type":"integer","description":"API 결제 로그 ID"},"ms":{"type":"integer","description":"API 응답 시간"}},"description":"API 호출 공통 데이터"}}}}}},"default":{"description":"HTTP 상태 및 서비스 오류코드 확인","content":{"application/json":{"schema":{"type":"object"}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"유튜브 영상 URL 또는 11자리 영상 ID (string)","example":"https://youtu.be/9bZkp7q19f0"}},"required":["url"]}}}}}}},"x-code-tables":[{"title":"HTTP 상태 코드","columns":["HTTP","상황","설명"],"rows":[["400","입력 오류","유튜브 영상 주소 또는 영상 ID가 아닙니다."],["404","영상 없음","삭제·비공개 영상이거나 잘못된 주소입니다."],["408","시간 초과","처리 시간이 초과됐습니다. 과금하지 않습니다."],["424","조회 불가","연령 제한·회원 전용 영상이거나 일시적으로 조회하지 못했습니다. 실패한 호출은 과금하지 않습니다."]]}],"x-service-errors":[],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}