Skip to main content

Chat Interface

Note: The following examples need to replace the Authorization with the actual Login Code

Streaming Response

curl --location 'https://ai.liaobots.work/v1/chat/completions' \
--header 'Authorization: Bearer <authcode>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-4o",
    "messages": [
        {
            "role": "user",
            "content": "Hi"
        }
    ],
    "temperature": 1,
    "stream": true
}'

Non-Streaming Response

curl --location 'https://ai.liaobots.work/v1/chat/completions' \
--header 'Authorization: Bearer <authcode>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-4o",
    "messages": [
        {
            "role": "user",
            "content": "Hi"
        }
    ],
    "temperature": 1,
    "stream": false
}'