Skip to main content
POST
/
api
/
models
/
test-connection
Test Model Connection
curl --request POST \
  --url https://api.example.com/api/models/test-connection \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model_provider": "<string>",
  "model_name": "<string>",
  "api_key": "<string>",
  "base_url": "<string>",
  "category": "llm",
  "temperature": 123,
  "dimension": 123,
  "abilities": [
    "<string>"
  ]
}
'
{
  "model_id": "<string>",
  "status": "<string>",
  "response_time": 123,
  "message": "<string>",
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.xagent.run/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json

Request schema for testing an unsaved model connection

model_provider
string
required
model_name
string
required
api_key
string | null
base_url
string | null
category
string
default:llm
temperature
number | null
dimension
integer | null
abilities
string[] | null

Response

Successful Response

Model test response schema

model_id
string
required
status
string
required
response_time
number | null
required
message
string | null
required
error
string | null
required