列出模型
curl --request GET \
--url https://zero.cat/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://zero.cat/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zero.cat/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"created": 123,
"owned_by": "openai"
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}模型
列出模型
获取当前可用的模型列表。
根据请求头自动识别返回格式:
- 包含
x-api-key和anthropic-version头时返回 Anthropic 格式 - 包含
x-goog-api-key头或key查询参数时返回 Gemini 格式 - 其他情况返回 OpenAI 格式
GET
/
v1
/
models
列出模型
curl --request GET \
--url https://zero.cat/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://zero.cat/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zero.cat/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"created": 123,
"owned_by": "openai"
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}授权
ZeroCat API 密钥(sk- 开头),在控制台「API 密钥」页面创建。
格式:Authorization: Bearer sk-xxxxxx
请求头
Anthropic API Key (用于 Claude 格式)
Anthropic API 版本
示例:
"2023-06-01"
Google API Key (用于 Gemini 格式)
查询参数
Google API Key (用于 Gemini 格式)

