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.
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
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.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォーム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キーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
bvidstring必須Bilibili Video ID (BVID).
aidstring必須Bilibili AID.
cidstring必須Bilibili CID.
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
| API | 価格 | レスポンス |
|---|---|---|
Bilibili Video Captionsこの API Bilibili | $0.014286 / 回 | JSON |
Bilibili | $0.001 / 回 | JSON |
Bilibili | $0.001 / 回 | JSON |
Bilibili | $0.001 / 回 | JSON |
Bilibili | $0.001 / 回 | JSON |
Bilibili | $0.001 / 回 | JSON |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/bilibili/video-caption に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.014286、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: bvid (string), aid (string) と cid (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Bilibili Video Captions は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Bilibili の API アクセスを別途申請する必要はありません。