AI Model APIChatNative OpenAI Format
⚠️Compliance notice: Use this project only for lawfully authorized API gateway, internal management, and private deployment scenarios. Follow upstream terms of service, platform rules, regulatory requirements, and content safety requirements.
ChatCompletions Format
Creates model responses based on chat history. Supports streaming and non-streaming responses.
Compatible with OpenAI Chat Completions API.
AuthorizationBearer <token>
Authenticate with a Bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
modelstring
Model ID
messages
List of conversation messages
temperature?number
Sampling temperature
Default
1Range
0 <= value <= 2top_p?number
Nucleus sampling parameter
Default
1Range
0 <= value <= 1n?integer
Number of items to generate
Default
1Range
1 <= valuestream?boolean
Whether to stream the response
Default
falsestream_options?
stop?string|
Stop sequences
max_tokens?integer
Maximum generated tokens
max_completion_tokens?integer
Maximum completion tokens
presence_penalty?number
Default
0Range
-2 <= value <= 2frequency_penalty?number
Default
0Range
-2 <= value <= 2logit_bias?
user?string
tools?
tool_choice?string|
response_format?
seed?integer
reasoning_effort?string
Reasoning effort (for models supporting reasoning)
Value in
"low" | "medium" | "high"modalities?array<string>
audio?
Response Body
application/json
application/json
application/json
curl -X POST "https://api.beeaicloud.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4", "messages": [ { "role": "system", "content": "string" } ] }'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"choices": [
{
"index": 0,
"message": {
"role": "system",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"tool_call_id": "string",
"reasoning_content": "string"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0
}
},
"system_fingerprint": "string"
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}How is this guide?