API Documentation
OpenAI-compatible REST API for LLM chat, audio transcription, and data extraction.
Authentication
All requests require an API key in the Authorization header:
Authorization: Bearer bsf-sk-a7x9m2p4q8r1w5y3z6v0nModels
GET
/v1/modelsbash
curl https://api-kaidu.kaiduweb.com/v1/models -H "Authorization: Bearer bsf-sk-a7x9m2p4q8r1w5y3z6v0n"LLM Models
| Model | Parameters | Type |
|---|---|---|
qwen3.5:27b-Q4_K_M | 27B | LLM |
qwen3.5:9B-Q4_K_M | 9B | LLM |
qwen3.5:4b-q4_K_M | 4B | LLM |
qwen2.5:0.5b | 0.5B | LLM |
STT Models
| Model | Accuracy | Type |
|---|---|---|
whisper-large-v3 | Best | STT |
whisper-medium | Very Good | STT |
whisper-small | Good | STT |
whisper-tiny | Basic | STT |
Chat Completions
POST
/v1/chat/completionsParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | LLM model ID |
messages | array | Yes | Conversation messages |
stream | boolean | No | Stream response (default: false) |
reasoning_effort | string | No | none, low, medium, high |
temperature | float | No | 0.0 to 1.0 |
Example
bash
curl -X POST https://api-kaidu.kaiduweb.com/v1/chat/completions \
-H "Authorization: Bearer bsf-sk-a7x9m2p4q8r1w5y3z6v0n" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5:4b-q4_K_M",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "none"
}'Audio Transcription
POST
/v1/audio/transcriptionsParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Audio file (wav, mp3, ogg, flac) |
model | string | No | Whisper model (default: whisper-large-v3) |
language | string | No | ISO-639-1 code (en, fr, es) |
response_format | string | No | json, text, verbose_json, srt, vtt |
Example
bash
curl -X POST https://api-kaidu.kaiduweb.com/v1/audio/transcriptions \
-H "Authorization: Bearer bsf-sk-a7x9m2p4q8r1w5y3z6v0n" \
-F "file=@audio.wav" \
-F "model=whisper-large-v3" \
-F "response_format=json"Data Extraction
POST
/v1/extractExample
bash
curl -X POST https://api-kaidu.kaiduweb.com/v1/extract \
-H "Authorization: Bearer bsf-sk-a7x9m2p4q8r1w5y3z6v0n" \
-H "Content-Type: application/json" \
-d '{
"text": "Hi, I am John. Email: john@gmail.com, Phone: 786-360-3264",
"extract": ["name", "email", "phone"]
}'Python SDK
bash
pip install openaiChat
python
from openai import OpenAI
client = OpenAI(
api_key="bsf-sk-a7x9m2p4q8r1w5y3z6v0n",
base_url="https://api-kaidu.kaiduweb.com/v1"
)
response = client.chat.completions.create(
model="qwen3.5:4b-q4_K_M",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Transcription
python
with open("audio.wav", "rb") as f:
result = client.audio.transcriptions.create(
model="whisper-large-v3",
file=f,
response_format="json"
)
print(result.text)Health Check
GET
/healthbash
curl https://api-kaidu.kaiduweb.com/health