大语言模型
检索大模型列表
检索大模型列表。
GET
鉴权
神州问学 API 使用 App-Id 和 Api-Key 进行鉴权,需要在调用接口时将其填入到 HTTP 请求的请求头参数中。可以参考鉴权。
请求
curl --location --request GET '{api_base_url}/opi-maas/v1/chat/models' \
--header 'App-Id: {App-Id}' \
--header 'Api-Key: {Api-Key}' \
--header 'Connection: keep-alive'响应
{
"code": 0,
"data": [
{
"id": 3177,
"model": "openai/glm-4.6",
"model_info": {
"mode": "chat",
"max_tokens": 131072,
"supports_vision": false,
"deprecation_date": "",
"litellm_provider": "tongyi",
"max_input_tokens": 202752,
"max_output_tokens": 16384,
"supported_regions": [
"cn"
],
"supports_reasoning": true,
"supports_web_search": true,
"input_cost_per_token": 1.5e-07,
"supports_audio_input": true,
"output_cost_per_token": 1.5e-06,
"supports_audio_output": false,
"supports_prompt_caching": false,
"supports_response_schema": false,
"supports_system_messages": true,
"supports_function_calling": true,
"input_cost_per_audio_token": 0,
"file_search_cost_per_1k_calls": 0,
"search_context_cost_per_query": {
"search_context_size_low": 0,
"search_context_size_high": 0,
"search_context_size_medium": 0
},
"file_search_cost_per_gb_per_day": 0,
"output_cost_per_reasoning_token": 0,
"vector_store_cost_per_gb_per_day": 0,
"code_interpreter_cost_per_session": 0,
"supports_parallel_function_calling": true,
"computer_use_input_cost_per_1k_tokens": 0,
"computer_use_output_cost_per_1k_tokens": 0
},
"supported_openai_params": [
{
"key": "temperature",
"type": "range",
"label": "温度参数",
"range": {
"max": 1,
"min": 0,
"step": 0.1,
"include_max": true,
"include_min": true
},
"required": false,
"description": "控制输出的随机性,值越高输出越随机",
"default_value": 0.95
},
{
"key": "max_tokens",
"type": "number",
"label": "最大令牌数",
"range": {
"max": 131072,
"min": 1,
"include_max": true,
"include_min": true
},
"required": false,
"description": "控制生成的最大令牌数量",
"default_value": 16384
},
{
"key": "top_p",
"type": "range",
"label": "Top P",
"range": {
"max": 1,
"min": 0,
"step": 0.01,
"include_max": true,
"include_min": true
},
"required": false,
"description": "核采样参数,控制输出的多样性",
"default_value": 0.7
},
{
"key": "stream",
"type": "switch",
"label": "流式输出",
"required": false,
"description": "是否启用流式响应",
"default_value": false
},
{
"key": "stop",
"type": "text",
"label": "停止序列",
"required": false,
"description": "遇到这些序列时停止生成,多个用逗号分隔"
},
{
"key": "thinking",
"type": "object",
"label": "思考功能 (Anthropic)",
"value": null,
"enabled": false,
"required": false,
"properties": {
"type": {
"key": "type",
"type": "select",
"label": "开关",
"options": [
{
"label": "关闭",
"value": "disabled"
},
{
"label": "启用",
"value": "enabled"
}
],
"required": true,
"description": "启用或禁用思考功能",
"default_value": "enabled"
},
"budget_tokens": {
"key": "budget_tokens",
"type": "range",
"label": "思考预算",
"range": {
"max": 10000,
"min": 10,
"step": 10,
"include_max": true,
"include_min": true
},
"value": 1000,
"enabled": false,
"required": false,
"description": "限制思考过程可消耗的最大Token数(仅当启用时生效)",
"default_value": 1000
}
},
"description": "启用模型的思考链功能。启用后可设置思考预算(Token数)。",
"default_value": null
},
{
"key": "response_format",
"type": "json",
"label": "响应格式",
"required": false,
"description": "指定响应格式,如JSON模式"
},
{
"key": "seed",
"type": "number",
"label": "随机种子",
"required": false,
"description": "固定随机种子以获得可重现的结果"
},
{
"key": "tools",
"type": "json",
"label": "工具定义",
"required": false,
"description": "可用的工具函数定义"
},
{
"key": "tool_choice",
"type": "select",
"label": "工具选择",
"options": [
{
"label": "自动",
"value": "auto"
}
],
"required": false,
"default_value": "auto"
},
{
"key": "user",
"type": "text",
"label": "用户标识",
"required": false,
"description": "用于追踪和审查的用户ID"
},
{
"key": "stream_options",
"type": "json",
"label": "流式选项",
"required": false,
"description": "流式响应的额外配置选项"
},
{
"key": "extra_headers",
"type": "json",
"label": "额外请求头",
"required": false,
"description": "自定义HTTP请求头"
}
],
"model_source": 1
}
],
"msg": "success"
}错误信息
{
"success": false,
"error": {
"code": 1003,
"message": "参数错误",
"litellm_message": null,
"type": "business_error"
}
}| 错误代码 | 错误信息 |
|---|---|
| 1000 | 服务器内部错误 |
| 1001 | 数据库错误 |
| 1003 | 参数错误 |
神州问学文档中心