Domains & Authentication
Note: The following examples need to replace the Authorization with the actual Login Code
Primary domain:
Backup domains:
Keep the same path suffix when switching domains, such as
https://ai.liaobots.workBackup domains:
https://ai.liaobots1.work, https://ai.liaobots2.work, https://ai.liaobots3.workKeep the same path suffix when switching domains, such as
/v1 or /v1betaCheck Balance
Query remaining credits for your auth code.Curl
curl 'https://ai.liaobots.work/api/v1/credits' \
-H 'Authorization: Bearer <authcode>'
{
"data": {
"balance": 85.5,
"amount": 100.0
}
}
| Field | Description |
|---|---|
balance | Remaining available credits |
amount | Total credits received |
OpenAI Format (Chat Completions)
Streaming Response
curl --location 'https://ai.liaobots.work/v1/chat/completions' \
--header 'Authorization: Bearer <authcode>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.4",
"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-5.4",
"messages": [
{
"role": "user",
"content": "Hi"
}
],
"temperature": 1,
"stream": false
}'
Claude Format (Anthropic Messages)
Streaming Response
curl 'https://ai.liaobots.work/v1/messages' \
-H 'x-api-key: <authcode>' \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"stream": true,
"messages": [
{
"role": "user",
"content": "Hi"
}
]
}'
Non-Streaming Response
curl 'https://ai.liaobots.work/v1/messages' \
-H 'x-api-key: <authcode>' \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hi"
}
]
}'
OpenAI Responses API
Streaming Response
curl 'https://ai.liaobots.work/v1/responses' \
-H 'Authorization: Bearer <authcode>' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-5.4",
"stream": true,
"input": "Hi"
}'
Non-Streaming Response
curl 'https://ai.liaobots.work/v1/responses' \
-H 'Authorization: Bearer <authcode>' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-5.4",
"input": "Hi"
}'
Gemini Format (Gemini Native)
Non-Streaming Response
Curl
curl "https://ai.liaobots.work/v1beta/models/gemini-3-pro-preview(or other models):generateContent" \
-H "x-goog-api-key: <authcode>" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"role": "system",
"parts": [
{
"text": "You are a helpful assistant. Reply in Chinese."
}
]
},
{
"role": "user",
"parts": [
{
"text": "Explain how AI works in a few words"
}
]
}
]
}'
Streaming Response
Curl
curl "https://ai.liaobots.work/v1beta/models/gemini-3-pro-preview(or other models):streamGenerateContent?alt=sse" \
-H "x-goog-api-key: <authcode>" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"role": "system",
"parts": [
{
"text": "You are a helpful assistant. Reply in Chinese."
}
]
},
{
"role": "user",
"parts": [
{
"text": "Explain how AI works in a few words"
}
]
}
]
}'
Gemini Nano Banana 2/Pro
Non-Streaming Response
Curl
curl "https://ai.liaobots.work/v1beta/models/gemini-3-pro-image-preview:generateContent" \
-H "x-goog-api-key: <authcode>" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"parts": [
{
"text": "Generate a visualization of the current weather in Tokyo."
}
]
}
],
"tools": [
{
"googleSearch": {}
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "2K"
},
"responseModalities":
[
"TEXT",
"IMAGE"
]
}
}
Streaming Response
Curl
curl "https://ai.liaobots.work/v1beta/models/gemini-3-pro-image-preview:streamGenerateContent?alt=sse" \
-H "x-goog-api-key: <authcode>" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"parts": [
{
"text": "Generate two dogs in manga style."
}
]
}
],
"generationConfig": {
"imageConfig": {
"aspectRatio": "16:9",
"imageSize": "1K"
},
"responseModalities":
[
"TEXT",
"IMAGE"
]
}
}