- Base URL:
https://mm-internal-cn.leonecloud.com - endpointPath:
POST https://mm-internal-cn.leonecloud.com/v1/chat/completions - Authentication:
Authorization: Bearer <API_KEY> - Content-Type:
application/json - -:OpenAI Chat Completions, can OpenAI SDK or number SDK, only
base_urlandapi_key.
Qwen OpenAI Chat Completions, Request Body and field and consistent, not OptionalParameterfieldlocalized example text.
Description
- with endpoint use Bearer Token (API Key), in Request:```
- Authorization: Bearer <API_KEY>
- API Key in「API localized example text」create, in create when「Model」Capabilityafter can endpoint.
- use not ModelCapability Key, will return`403`:
```json{
"error": {
"message": "API Key not LLM Capability, in create API Key complete",
"type": "permission_error"
}
}
## supported Model
Request Body in the`model` fieldas「ModelParameter」, can Model.
| Model | ModelParameter (model) |
| ---- | ---- |
| Qwen3.8-Max | qwen3.8-max |
| Qwen3.7-Max | qwen3.7-max |
| Qwen3.7-Plus | qwen3.7-plus |
| Qwen3.6-Plus | qwen3.6-plus |
| Qwen3-Max | qwen3-max |
| Qwen3-VL-Plus | qwen3-vl-plus |
| Qwen3.5-397B-A17B | Qwen3.5-397B-A17B |
> can Model as.Model, and「Modellocalized example text」「localized example text」as, encodedModel.
## Method
Modelendpoint OpenAI, Request Body and field and consistent, not OptionalParameterfield.with OpenAI, Request, API Key, can.
- endpointPath:`POST https://mm-internal-cn.leonecloud.com/v1/chat/completions`
### cURL
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "qwen3.8-max",
"messages": [
{"role": "user", "content": "localized example text."}
]
}'
### Request Body ()```json
{
"model": "qwen3.8-max",
"stream": true,
"messages": [
{
"role": "system",
"content": [
{"type": "text", "text": "localized example text."}
]
},
{
"role": "user",
"content": [
{"type": "text", "text": "localized example text."}
]
}
]
}Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://mm-internal-cn.leonecloud.com/v1",
api_key="<API_KEY>",
)
resp = client.chat.completions.create(
model="qwen3.8-max",
messages=[{"role": "user", "content": "localized example text"}],
stream=True,
)
for chunk in resp:
print(chunk.choices[0].delta.content or "", end="", flush=True)Request Parameters
as Parameter, OpenAI.not OptionalParameter will field.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | ModelParameter, localized example text「supported Model」. |
| messages | array | Yes | list,role (system/user/assistant)andcontent. |
| stream | boolean | No | return, defaultfalse.astrue when SSE. |
| temperature | number | No | localized example text. |
| top_p | number | No | localized example text. |
| max_tokens | int | No | maximum token. |
| stop | string / array | No | localized example text. |
Request Body instream astrue, localized example textServer-Sent Events (SSE), datadata: , afterdata: [DONE] localized example text.
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[{"delta":{"content":"localized example text"},"index":0}]}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[{"delta":{"content":"localized example text"},"index":0}]}
data: [DONE]Billing
- Modeltoken localized example text, Usually input / output, Model with, (thinking), image etc., Model.
- Model and,「localized example text」as.
- token in the
usagefieldas;, and can in「localized example text」「localized example text」, and supported. - Model in in, first ( can「Balance API」query ).
Error CodesDescription
| Status Code | Description | localized example text |
|---|---|---|
| 401 | not / API Key no | localized example textAuthorization and API Key |
| 403 | API Key not ModelCapability | in create and ModelCapability API Key |
| 429 | or | after; Technical Support |
| 666 | Model(Error Codes) | in thecode_reason Technical Support |
| 5xx | localized example text | after or Technical Support |
ModelHTTP Status Code666 return,:```json
{
"code": 9000,
"code_msg": "localized example text",
"code_reason": ", when field provide"
}
Error Format, OpenAI:```json
{
"error": {
"message": "invalid api key",
"type": "invalid_request_error",
"code": "401"
}
}