/v1/private/ollama/test-connectionTest connection to Ollama instanceValidates that the provided Ollama URL is reachable. URL may be provided with or without /v1 suffix (e.g., http://localhost:11434 or http://localhost:11434/v1). The /v1 suffix will be automatically removed for connection testing. For inference, use the URL with /v1 suffix.
Request body
requiredapplication/json
Request with Ollama instance base URL for connection testing or model discovery.
api_keystringOptional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.
base_urlstringrequiredBase URL of the Ollama instance. May include /v1 suffix which will be automatically removed for connection testing. For inference, use the URL with /v1 suffix for OpenAI-compatible endpoints.
{
"api_key": "",
"base_url": "http://localhost:11434/v1"
}Responses
Response from Ollama connection test.
connectedbooleanWhether the connection was successful
error_messagestringError message if connection failed
versionstringServer version (returned even if connection failed or version is incompatible)
{
"connected": true,
"error_message": "string",
"version": "string"
}codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}Response from Ollama connection test.
connectedbooleanWhether the connection was successful
error_messagestringError message if connection failed
versionstringServer version (returned even if connection failed or version is incompatible)
{
"connected": true,
"error_message": "string",
"version": "string"
}codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}