公共信息模块

功能说明

接口前缀为:

  1. 主站:https://ai.burncloud.com
  2. 企业站:https://b.burncloud.com

提供无需认证或低权限访问的系统信息,包括模型列表、定价信息、公告内容等。支持多语言显示和动态配置。前端首页和模型广场主要依赖这些接口获取展示数据。

🔐 无需鉴权

获取公告栏内容

💡 请求示例:

const response = await fetch('/api/notice', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json'  
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "message": "",  
  "data": "# 系统公告\n\n欢迎使用New API系统!"  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取公告失败"  
}

🧾 字段说明:

关于页面信息

💡 请求示例:

const response = await fetch('/api/about', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json'  
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "message": "",  
  "data": "# 关于我们\n\nNew API是一个强大的AI网关系统..."  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取关于信息失败"  
}

🧾 字段说明:

首页自定义内容

💡 请求示例:

const response = await fetch('/api/home_page_content', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json'  
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "message": "",  
  "data": "# 欢迎使用New API\n\n这是一个功能强大的AI网关系统..."  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取首页内容失败"  
}

🧾 字段说明:

模型倍率配置

💡 请求示例:

const response = await fetch('/api/ratio_config', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json'  
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "data": {  
    "model_ratio": {  
      "gpt-3.5-turbo": 1.0,  
      "gpt-4": 15.0,  
      "claude-3-sonnet": 3.0  
    },  
    "completion_ratio": {  
      "gpt-3.5-turbo": 1.0,  
      "gpt-4": 1.0  
    },  
    "model_price": {  
      "gpt-3.5-turbo-instruct": 0.002  
    }  
  }  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取倍率配置失败"  
}

🧾 字段说明:

价格与套餐信息

💡 请求示例:

const response = await fetch('/api/pricing', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer your_token', // 可选,登录用户可获得更详细信息
    'New-Api-User': 'Bearer your_user_id' // 可选
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "data": [  
    {  
      "model_name": "gpt-3.5-turbo",  
      "enable_group": ["default", "vip"],  
      "model_ratio": 1.0,  
      "completion_ratio": 1.0,  
      "model_price": 0.002,  
      "quota_type": 1,  
      "description": "GPT-3.5 Turbo模型",  
      "vendor_id": 1,  
      "supported_endpoint_types": [1, 2]  
    }  
  ],  
  "vendors": [  
    {  
      "id": 1,  
      "name": "OpenAI",  
      "description": "OpenAI官方模型",  
      "icon": "openai.png"  
    }  
  ],  
  "group_ratio": {  
    "default": 1.0,  
    "vip": 0.8  
  },  
  "usable_group": {  
    "default": "默认分组",  
    "vip": "VIP分组"  
  },  
  "supported_endpoint": {  
    "1": {"method": "POST", "path": "/v1/chat/completions"},  
    "2": {"method": "POST", "path": "/v1/embeddings"}  
  },  
  "auto_groups": ["default"]  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "获取定价信息失败"  
}

🧾 字段说明:

🔐 用户鉴权

获取前端可用模型列表

💡 请求示例:

const response = await fetch('/api/models', {  
  method: 'GET',  
  headers: {  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer your_user_token',
    'New-Api-User': 'Bearer your_user_id'
  }  
});  
const data = await response.json();

✅ 成功响应示例:

{  
  "success": true,  
  "data": {  
    "1": ["gpt-3.5-turbo", "gpt-4"],  
    "2": ["claude-3-sonnet", "claude-3-haiku"]  
  }  
}

❗ 失败响应示例:

{  
  "success": false,  
  "message": "未授权访问"  
}

🧾 字段说明:


Revision #1
Created 30 October 2025 03:19:55 by Burncloud
Updated 30 October 2025 03:20:18 by Burncloud