Public Information Module
Public information that does not require login, including the model list and Markdown notices from GET /api/notice.
Feature Description
The API prefix is https://api.58api.net
Provides public information accessible without login or by regular users, including model lists, pricing details, announcement content, etc.
🔐 Authentication Not Required
Get Announcement Content
- Interface Name: Get Announcement Content
- HTTP Method: GET
- Path:
/api/notice - Authentication Requirement: Public
- Function Summary: Retrieves system announcement content, supporting Markdown format
💡 Request Example:
const response = await fetch('/api/notice', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();✅ Successful Response Example:
{
"success": true,
"message": "",
"data": "# 系统公告\n\n欢迎使用58API系统!"
}❗ Failure Response Example:
{
"success": false,
"message": "获取公告失败"
}🧾 Field Description:
data (String): Announcement content, supporting Markdown format
About Page Information
- Interface Name: About Page Information
- HTTP Method: GET
- Path:
/api/about - Authentication Requirement: Public
- Function Summary: Retrieves custom content for the About page
💡 Request Example:
const response = await fetch('/api/about', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();✅ Successful Response Example:
{
"success": true,
"message": "",
"data": "# 关于我们\n\n58API 是面向开发者与企业的 AI 模型接口聚合平台..."
}❗ Failure Response Example:
{
"success": false,
"message": "获取关于信息失败"
}🧾 Field Description:
data (String): About page content, supporting Markdown format or URL link
Homepage Custom Content
- Interface Name: Homepage Custom Content
- HTTP Method: GET
- Path:
/api/home_page_content - Authentication Requirement: Public
- Function Summary: Retrieves custom content for the homepage, which can be Markdown text or an iframe URL
💡 Request Example:
const response = await fetch('/api/home_page_content', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();✅ Successful Response Example:
{
"success": true,
"message": "",
"data": "# 欢迎使用58API\n\n一个 API Key 调用多家模型..."
}❗ Failure Response Example:
{
"success": false,
"message": "获取首页内容失败"
}🧾 Field Description:
data (String): Homepage content, which can be Markdown text or a URL link starting with "https://"
Model Ratio Configuration
- Interface Name: Model Ratio Configuration
- HTTP Method: GET
- Path:
/api/ratio_config - Authentication Requirement: Public
- Function Summary: Retrieves public model ratio configuration information
💡 Request Example:
const response = await fetch('/api/ratio_config', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();✅ Successful Response Example:
{
"success": true,
"data": {
"model_ratio": {
"gpt-5.5": 1.0,
"claude-sonnet-5-5": 1.5,
"gemini-3.5-flash": 0.15
},
"completion_ratio": {
"gpt-5.5": 8.0,
"claude-sonnet-5-5": 5.0
},
"model_price": {
"deepseek-v4-flash": 0.002
}
}
}❗ Failure Response Example:
{
"success": false,
"message": "获取倍率配置失败"
}🧾 Field Description:
data (Object): Ratio configuration information
model_ratio(Object): Model ratio mapping, where the key is the model name and the value is the ratio numerical valuecompletion_ratio(Object): Completion ratio mappingmodel_price(Object): Model price mapping, where the key is the model name and the value is the price (USD)
Pricing and Plan Information
- Interface Name: Pricing and Plan Information
- HTTP Method: GET
- Path:
/api/pricing - Authentication Requirement: Anonymous/User
- Function Summary: Retrieves model pricing information, group ratios, and available groups
💡 Request Example:
const response = await fetch('/api/pricing', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token', // Optional, logged-in users get more detailed information
'New-Api-User': 'your_user_id' // Optional
}
});
const data = await response.json();✅ Successful Response Example:
{
"success": true,
"data": [
{
"model_name": "gpt-5.5",
"enable_group": ["default", "vip"],
"model_ratio": 1.0,
"completion_ratio": 1.0,
"model_price": 0.002,
"quota_type": 1,
"description": "GPT-5.5 模型",
"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/responses"}
},
"auto_groups": ["default"]
}❗ Failure Response Example:
{
"success": false,
"message": "获取定价信息失败"
}🧾 Field Description:
data(Array): List of model pricing informationmodel_name(String): Model nameenable_group(Array): Available groups listmodel_ratio(Number): Model ratiocompletion_ratio(Number): Completion ratiomodel_price(Number): Model price (USD)quota_type(Number): Billing type, 0=Ratio billing, 1=Price billingdescription(String): Model descriptionvendor_id(Number): Vendor IDsupported_endpoint_types(Array): Supported endpoint types
vendors(Array): List of vendor informationid(Number): Vendor IDname(String): Vendor namedescription(String): Vendor descriptionicon(String): Vendor icon
group_ratio(Object): Group ratio mappingusable_group(Object): Usable group mappingsupported_endpoint(Object): Supported endpoint informationauto_groups(Array): Automatic group list
🔐 User Authentication Required
Get Available Model List
- Interface Name: Get Available Model List
- HTTP Method: GET
- Path:
/api/models - Authentication Requirement: User
- Function Summary: Retrieves the list of AI models accessible to the current user, which can be used for display on a page
💡 Request Example:
const response = await fetch('/api/models', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_user_token',
'New-Api-User': 'your_user_id'
}
});
const data = await response.json();✅ Successful Response Example:
{
"success": true,
"data": {
"1": ["gpt-5.5", "deepseek-v4-flash"],
"14": ["claude-sonnet-5-5"],
"24": ["gemini-3.5-flash"]
}
}❗ Failure Response Example:
{
"success": false,
"message": "未授权访问"
}🧾 Field Description:
data (Object): Available models grouped by type
- Key (String): Internal type number; clients can ignore it
- Value (Array): List of available model names
OAuth Third-Party Login Module
Third-party sign-in, account linking, and automatic registration for GitHub, OIDC, LinuxDO, WeChat, and Telegram, completed in the browser.
Task Center Module
Page through this account's async tasks, such as video generation, including status, progress, spend, and results via GET /api/task/self.