跳转到主要内容
POST
/
admin
/
setting
/
test-llm
cURL
curl --request POST \
  --url http://127.0.0.1:3000/api/admin/setting/test-llm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "openai",
  "name": "<string>",
  "apiKey": "<string>",
  "baseUrl": "<string>",
  "models": "",
  "modelKey": "<string>",
  "ability": [
    "image"
  ]
}
'
{
  "success": true,
  "response": "<string>",
  "ability": {
    "image": true,
    "pdf": true,
    "webSearch": true
  }
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
type
enum<string>
必填
可用选项:
openai,
anthropic,
google,
azure,
cohere,
mistral,
deepseek,
qwen,
zhipu,
lingyiwanwu,
xai,
togetherai,
ollama,
amazonBedrock,
openRouter,
openaiCompatible
name
string
必填
apiKey
string
必填
baseUrl
string<uri>
必填
models
string
默认值:""
modelKey
string
ability
enum<string>[]
可用选项:
image,
pdf,
webSearch

响应

200 - application/json

Test result

success
boolean
必填
response
string
ability
object
Last modified on December 10, 2025