bvidstringจำเป็น
Bilibili Video ID (BVID).
https://api.sandbase.ai/v1/api/bilibili/video-captionGet caption data for a Bilibili video segment identified by BVID, AID, and CID. Use it to obtain subtitles for transcript extraction, accessibility review, or language-focused content analysis.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns the list of caption tracks available for one Bilibili video part. Each track has a language code, a language name, and a URL to the subtitle file. You send bvid, aid, and cid together.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-caption" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"bvid": "BV1GJ411x7h7", "aid": "80433022", "cid": "137649199"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
aid | string | Yes | Bilibili AID. |
bvid | string | Yes | Bilibili Video ID (BVID). |
cid | string | Yes | Bilibili CID. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": [
{
"lan": "zh-CN",
"lan_doc": "中文(中国)",
"subtitle_url": "https://aisubtitle.hdslb.com/bfs/subtitle/662b660a420431045b483f9b560057c262539b…"
}
]
}
| Field | Meaning |
|---|---|
data[] | One caption track per item. The list has one entry for each language available for the video part. |
data[].lan | Language code of the track, such as zh-CN, zh-Hans, or zh-Hant. |
data[].lan_doc | Display name of the language, such as 中文(简体) for Simplified Chinese. |
data[].subtitle_url | URL of the subtitle file for this track. The file is JSON and the URL carries an auth_key query parameter. |
bvid, aid, and cid. They must describe the same video part.aid from a bvid.cid of each part of a video.subtitle_url values include an auth_key, so fetch the subtitle file soon after you receive the response.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-caption" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"aid": "80433022",
"cid": "137649199",
"bvid": "BV1GJ411x7h7"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
bvidstringจำเป็นBilibili Video ID (BVID).
aidstringจำเป็นBilibili AID.
cidstringจำเป็นBilibili CID.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Bilibili Video CaptionsAPI นี้ Bilibili | $0.014286 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/bilibili/video-caption โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.014286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: bvid (string), aid (string) และ cid (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Bilibili Video Captions ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Bilibili API แยกต่างหาก