Skip to main content
BibiGPT’s API is currently in beta. If you have any questions or feedback, please reach out to us at hi@bibigpt.co.Tip: We are optimizing the product experience, and the API service may not be fully consistent with the official website yet. Thank you for your understanding and support! If you have any questions or feedback, please contact us at hi@bibigpt.co.

BibiGPT Open API (beta)

1. Get Exclusive API Token

All API endpoints are authenticated using api_token token in the HTTP header or picked up from the endpoint directly.
curl --request GET \
  --url https://api.bibigpt.co/api/v1/summarize \
  --header 'Authorization: Bearer <api_token>'
After logging in, please check the https://bibigpt.co/user/integration page to get your exclusive API Token. To purchase time credits, please visit the https://bibigpt.co/shop page. Untitled

2. API Call Methods

1. Summarize /api/v1/summarize

GET Request Example Untitled

2. Custom Summary Parameters /api/v1/summarizeWithConfig

The POST method allows setting promptConfig to adjust summary results, and also supports includeDetail to return audio/video content details.

3. Subtitle /api/v1/getSubtitle

Compared to the summary interface, it is much faster because it saves the time of requesting the LLM. Note: By default, the audio language is automatically detected to produce corresponding Chinese or English subtitles. However, sometimes automatic detection may fail (or due to cache). If you find that the subtitles do not match the audio language, you can manually specify the audioLanguage parameter.
https://api.bibigpt.co/api/v1/getSubtitle?url=https://www.youtube.com/watch?v=z5U843Ob8xw&audioLanguage=en
The correspondence for “Audio Language” is (only applicable to the current default speech recognition model):
{
  "Auto": "auto",
  "中文": "zh",
  "English": "en",
  "日本語": "ja",
  "粤语": "yue",
  "한국어": "ko",
  "Deutsch": "de",
  "Français": "fr",
  "Русский": "ru"
}
If you need support for the following languages, please contact Business: pt (Portuguese), ar (Arabic), it (Italian), es (Spanish), hi (Hindi), id (Indonesian), th (Thai), tr (Turkish), uk (Ukrainian), vi (Vietnamese)

4. File URL /api/v1/summarize

BibiGPT API supports custom audio/video file addresses. Just provide the API with a file download link. If it is a local file, you can upload it to OSS first, and remember to confirm that the download link is directly accessible. For example, the following https://a.jimmylv.cn/assets/music.mp3 (note that the URL path ends with .mp3)
💡 Currently supported types include mp3|mp4|m4a|m4s|wav|webm|mpga|aac|ogg|oga|flac|alac|wma|avi|mkv|mov|flv|3gp|mpeg|mpg|ts|ogv|vob. If you find any unsupported formats, please contact me!
Untitled

5. AI Q&A /api/open/[apiToken]/chat (Going offline soon)

interface ChatContentParams {
  url: string
  question: string
  # tuple for each [['Q1', 'A1'], ['Q2', 'A2']]
  history?: [string, string][]
  language?: string
}
Untitled In addition to answer, you can also set the includeDetail parameter to choose whether to return sourceDocuments related to the answer. Untitled If you need to ask continuous questions, remember to use the previous QA question and answer as history context to improve the accuracy and coherence of the next answer (of course, the token duration consumed will also double). Untitled

6. AI Article Rewrite /api/v1/express

Automatically fetches video subtitles and rewrites them into a structured article. Supports custom output language and model.
curl --request GET \
  --url 'https://api.bibigpt.co/api/v1/express?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \
  --header 'Authorization: Bearer <api_token>'
Response format:
{
  "success": true,
  "id": "dQw4w9WgXcQ",
  "service": "youtube",
  "sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "htmlUrl": "https://bibigpt.co/...",
  "title": "Video Title",
  "article": "Full rewritten Markdown article...",
  "fromCache": false,
  "costDuration": 600,
  "remainingTime": 3000
}
Optional parameters:
  • outputLanguage: Output language code (e.g., zh-CN, en-US)
  • model: AI model to use
  • includeDetail: Whether to include audio/video details in the response

7. AI Subtitle Polish /api/v1/getPolishedText

Automatically fetches video subtitles, polishes them by chapter or fixed-length segments, and returns all polished segments at once. Supports keywords parameter for improved professional terminology accuracy.
curl --request GET \
  --url 'https://api.bibigpt.co/api/v1/getPolishedText?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&keywords=AI,GPT' \
  --header 'Authorization: Bearer <api_token>'
Response format:
{
  "success": true,
  "id": "dQw4w9WgXcQ",
  "service": "youtube",
  "sourceUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Video Title",
  "segments": [
    {
      "startTime": 0,
      "endTime": 120,
      "chapterTitle": "Chapter title (if available)",
      "polishedText": "Polished Markdown text...",
      "fromCache": false
    }
  ],
  "costDuration": 600,
  "remainingTime": 3000
}
Optional parameters:
  • keywords: Keywords (comma-separated) to improve professional terminology recognition accuracy
  • includeDetail: Whether to include audio/video details in the response

3. API Interface Parameters (Currently only supports “Summarize” API)

3.1 Optional Configuration Parameters promptConfig

1. promptConfig only supports POST requests, as a body parameter

Untitled

2. Default parameters when promptConfig is empty, can be modified as needed

Untitled
{
  "showEmoji": true,
  "showTimestamp": false,
  "outlineLevel": 1,
  "sentenceNumber": 5,
  "detailLevel": 700,
  "outputLanguage": "zh-CN"
}
Note: detailLevel corresponds to “sentence length”, and the relationship is 50, i.e., 700/50=14 (value displayed on the Web page). In addition, the correspondence for “Output Language” is:
{
  English: 'en-US',
  中文: 'zh-CN',
  繁體中文: 'zh-TW',
  日本語: 'ja-JP',
  русский: 'ru-RU',
  Italiano: 'it-IT',
  Deutsch: 'de-DE',
  Español: 'es-ES',
  Français: 'fr-FR',
  Nederlands: 'nl-NL',
  Português: 'pt-PT',
  한국어: 'ko-KR',
  ភាសាខមែរ: 'km-KH',
  हिंदी: 'hi-IN',
  ภาษาไทย: 'th-TH',
}

3. promptConfig has a special parameter: isRefresh. It ignores cache only when it has a value and is true

Example: This is a promptConfig for “Do not output emoji, show timestamp, outline level 2, sentence number 3, sentence length 10, output language English, and force refresh cache”:
{
  "showEmoji": false,
  "showTimestamp": true,
  "outlineLevel": 2,
  "sentenceNumber": 3,
  "detailLevel": 500,
  "outputLanguage": "en-US",
  "isRefresh": true
}

3.2 Custom Summary

Untitled
{
  "url": "https://www.bilibili.com/video/BV1Aj411a7HN",
  "promptConfig": {
    "customPrompt": "Summarize as 3 jokes",
    "isRefresh": true
  }
}
By adding customPrompt to promptConfig, you can customize your own summary prompt. Note that if the video has been summarized, you need isRefresh: true to skip the cached result for the customPrompt custom summary to take effect.

3.3 Limitation Conditions

As the limitation field of the API, you can set maxDuration. If the backend detects that the audio/video duration corresponding to the url exceeds maxDuration, it returns a 422 error status code.
{
  "url": "https://www.bilibili.com/video/BV1Sk4y1x7r2",
  "includeDetail": true,
  "limitation": {
    "maxDuration": 600
  }
}
Untitled

4. Use Cases

4.1 WeChat Assistant

ChatGPT AI helps one-click audio/video summary, successfully linking to WeKe Creator Cloud! https://github.com/zhayujie/chatgpt-on-wechat/issues/1417 【Watch? Buy?】There are so many videos related to today’s Apple event, and they are boring. _bilibili

4.2 Mobile iOS Shortcuts

【AI Video Note】BibiGPT Open API & IFTTT Unlimited Imagination 【AI Video Note】Apple Notes: One-click summary of Bilibili videos, linking with Shortcuts 丨 BibiGPT Open API & IFTTT Unlimited Imagination _bilibili

4.3 Browser Extension

【BibiGPT】Browser Extension: Supports one-click transcription & summary of audio/video content on any web page _bilibili

4.4 Linking Note Apps

Voice Input → Roam Research → AI Rewrite → AI Review Send voice via telegroam, then use BibiGPT’s API to summarize into text, and save to Roam Research with one click Untitled Untitled Untitled
Detailed documentation (In progress): https://docs.bibigpt.co/api-reference