- Base URL:
https://mm-internal-cn.leonecloud.com - Authentication:
Authorization: Bearer <API_KEY> - Content-Type:
application/json
ModelModel:Model OpenAI Chat Completions, Gemini Google Gemini.Request Bodyand, OptionalParameter——with SDKbase_url andapi_key can.
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"
}
}
## endpointlocalized example text| localized example text| Method | Path | localized example text|
| ---- | ---- | ---- | -------- |
| OpenAI Chat Completions | POST | `/v1/chat/completions` | Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen |
| Google Gemini | POST | `/v1/gemini/{version}/models/{model}:{streamMode}` | Gemini, Nano Banana |
(Claude Code / OpenCode / CC Switch etc. )「localized example text」localized example text.
## Quick Example
```bashcurl -X POST "https://mm-internal-cn.leonecloud.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "<ModelParameter, localized example text>",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "localized example text."}
]
}'
Success():```json
{
"id": "chatcmpl-xxxxxxxx",
"object": "chat.completion",
"created": 1730000000,
"model": "<ModelParameter>",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": ", AI, can,."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 18,
"total_tokens": 42
}
}localized example text| localized example text| localized example text| Description | | ---- | ---- | ---- | | Gemini | Google Gemini | Nano Banana image| | Grok | OpenAI Chat Completions | reasoning / fast| | DeepSeek / Kimi / GLM / MiniMax / Qwen | OpenAI Chat Completions | Model|
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"
}
}