验证与排错
检查模型目录
$headers = @{
Authorization = "Bearer <替换为你的Sub2_API_Key>"
}
Invoke-RestMethod `
-Uri "https://meilinn.xyz/v1/models" `
-Headers $headers `
-Method Get
返回模型列表,说明地址和鉴权已经连通。
发送最小请求
$headers = @{
Authorization = "Bearer <替换为你的Sub2_API_Key>"
"Content-Type" = "application/json"
}
$body = @{
model = "gpt-5.5"
input = "请回复:Sub2 API 连接正常"
} | ConvertTo-Json -Depth 5
Invoke-RestMethod `
-Uri "https://meilinn.xyz/v1/responses" `
-Headers $headers `
-Method Post `
-Body $body
常见问题
401 Unauthorized
检查 API Key、OPENAI_API_KEY 字段、空格,以及 Key 是否已经撤销。
404 Not Found
检查 base_url 是否已经包含 /v1,避免重复拼接。
模型列表为空
检查 model_catalog_url、api_key_model_discovery 和模型权限。