POST
/
api
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.bibigpt.co/api/v1/chat/completions \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": [
    {
      "role": "user",
      "content": "https://www.bilibili.com/video/BV1Sk4y1x7r2"
    }
  ],
  "model": "bibigpt",
  "stream": false
}'
{
  "id": "<string>",
  "object": "chat.completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "assistant",
        "content": "<string>"
      },
      "finish_reason": "stop"
    }
  ]
}

Authorizations

Authorization
string
header
required

API Token for authentication. Use format 'Bearer YOUR_API_TOKEN'

Body

application/json
messages
object[]
required
model
string

ID of the model to use. Defaults to 'bibigpt' if not specified. Can be prefixed with 'bibigpt/' for custom models.

stream
boolean
default:false

If set, partial message deltas will be sent as a stream.

Response

200
application/json
Successful response with completion
id
string

Unique identifier for the completion

object
enum<string>
Available options:
chat.completion
created
integer

Unix timestamp of when the completion was created

model
string

The model used for completion

choices
object[]