---
title: "Creates a summary completion for the given video url in chat message."
method: POST
path: "/api/v1/chat/completions"
---

# Creates a summary completion for the given video url in chat message.

`POST /api/v1/chat/completions`

Support video_url type, or url in text content in chat message, another text content could be custom prompot for summary.. Compatible with OpenAI Chat API format.

## Request body

- object
  - `messages` object[], required
    - `role` 'system' | 'user' | 'assistant', required — The role of the message author
    - `content` union, required
      - string — Text content of the message. If it contains a video URL (e.g., https://www.bilibili.com/video/BV1Sk4y1x7r2), the video will be automatically summarized.
      - object
        - `text` string, required — The text content to process. If it contains a video URL, the video will be automatically summarized. When used with video_url type in the same request, this text will be used as a custom summary prompt.
        - `type` 'text', required — Specifies this is a text content type
      - object
        - `video_url` string, required — The URL of the video to analyze (e.g., https://www.bilibili.com/video/BV1Sk4y1x7r2). Can be combined with a text message to customize the summary prompt.
        - `type` 'video_url', required — Explicitly specifies this is a video URL content type
      - object
        - `image_url` string, required — The URL of the image to analyze
        - `type` 'image_url', required — Specifies this is an image URL content type
  - `model` string — ID of the model to use. Defaults to 'bibigpt' if not specified. Can be prefixed with 'bibigpt/' for custom models.
  - `stream` boolean — If set, partial message deltas will be sent as a stream.

## Response `200`

Successful response with completion

- object
  - `id` string — Unique identifier for the completion
  - `object` 'chat.completion'
  - `created` integer — Unix timestamp of when the completion was created
  - `model` string — The model used for completion
  - `choices` object[]
    - `index` integer
    - `message` object
      - `role` 'assistant'
      - `content` string
    - `finish_reason` 'stop' | 'length' | 'content_filter'

## Other responses

- `400` — Invalid request
- `401` — Unauthorized - Invalid or missing API key
- `429` — Rate limit exceeded or insufficient credits

---

[API](https://skmtc.net/bibigpt/apis/bibigpt-openapi.md) · [All operations](https://skmtc.net/bibigpt/apis/bibigpt-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bibigpt/bibigpt-openapi/versions/6923ed89c442/schema)
