Junoa-Hub-API
Junoa Hub
  1. OpenAI Text
  • Gateway Discovery
    • List authorized models
      GET
    • Get available credits
      GET
    • List effective model pricing
      GET
  • OpenAI Text
    • Create chat completion
      POST
    • Create model response
      POST
  • Anthropic Messages
    • Create Claude message
      POST
  • Media Generation
    • Generate image
      POST
    • Create video job
      POST
    • Get video job
      GET
  • Embeddings
    • Create embedding
      POST
  • OCR
    • Create OCR result
      POST
  • Legacy VolcEngine
    • Create legacy content task
      POST
    • Get legacy content task
      GET
  1. OpenAI Text

Create chat completion

全球加速 BaseURL
https://api.junoa.ai
全球加速 BaseURL
https://api.junoa.ai
POST
https://api.junoa.ai
/v1/chat/completions
最后修改时间:2026-07-29 05:54:40
OpenAI-compatible chat completion. Set stream=true to select the text/event-stream response.

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数application/json必填

示例

返回响应

🟢200成功
application/json
Chat completion or SSE stream selected by request stream=true.
Body

🟠400请求有误
🟠401没有权限
🟠404记录不存在
🟠429
🔴502网关错误
🔴504网关超时
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api.junoa.ai/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "glm-5.2",
    "messages": [
        {
            "role": "user",
            "content": "Hello"
        }
    ],
    "stream": false
}'
响应示例响应示例
200 - 示例 1
{
    "id": "string",
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "string",
                "refusal": "string",
                "tool_calls": [
                    {
                        "id": "string",
                        "type": "function",
                        "function": {
                            "name": "string",
                            "arguments": "string"
                        }
                    }
                ],
                "annotations": [
                    {
                        "type": "url_citation",
                        "url_citation": {
                            "end_index": 0,
                            "start_index": 0,
                            "url": "http://example.com",
                            "title": "string"
                        }
                    }
                ],
                "role": "assistant",
                "function_call": {
                    "arguments": "string",
                    "name": "string"
                },
                "audio": {
                    "id": "string",
                    "expires_at": 0,
                    "data": "string",
                    "transcript": "string"
                }
            },
            "logprobs": {
                "content": [
                    {
                        "token": "string",
                        "logprob": 0,
                        "bytes": [
                            0
                        ],
                        "top_logprobs": [
                            {
                                "token": "string",
                                "logprob": 0,
                                "bytes": [
                                    0
                                ]
                            }
                        ]
                    }
                ],
                "refusal": [
                    {
                        "token": "string",
                        "logprob": 0,
                        "bytes": [
                            0
                        ],
                        "top_logprobs": [
                            {
                                "token": "string",
                                "logprob": 0,
                                "bytes": [
                                    0
                                ]
                            }
                        ]
                    }
                ]
            }
        }
    ],
    "created": 0,
    "model": "string",
    "service_tier": "auto",
    "system_fingerprint": "string",
    "object": "chat.completion",
    "usage": {
        "completion_tokens": 0,
        "prompt_tokens": 0,
        "total_tokens": 0,
        "completion_tokens_details": {
            "accepted_prediction_tokens": 0,
            "audio_tokens": 0,
            "reasoning_tokens": 0,
            "rejected_prediction_tokens": 0
        },
        "prompt_tokens_details": {
            "audio_tokens": 0,
            "cached_tokens": 0,
            "cache_write_tokens": 0
        }
    },
    "moderation": {
        "input": {
            "type": "moderation_results",
            "model": "string",
            "results": [
                {
                    "type": "moderation_result",
                    "model": "string",
                    "flagged": true,
                    "categories": {
                        "property1": true,
                        "property2": true
                    },
                    "category_scores": {
                        "property1": 0,
                        "property2": 0
                    },
                    "category_applied_input_types": {
                        "property1": [
                            "text"
                        ],
                        "property2": [
                            "text"
                        ]
                    }
                }
            ]
        },
        "output": {
            "type": "moderation_results",
            "model": "string",
            "results": [
                {
                    "type": "moderation_result",
                    "model": "string",
                    "flagged": true,
                    "categories": {
                        "property1": true,
                        "property2": true
                    },
                    "category_scores": {
                        "property1": 0,
                        "property2": 0
                    },
                    "category_applied_input_types": {
                        "property1": [
                            "text"
                        ],
                        "property2": [
                            "text"
                        ]
                    }
                }
            ]
        }
    },
    "property1": "string",
    "property2": "string"
}
上一页
List effective model pricing
下一页
Create model response
Built with