Ollama

Test connection to Ollama instance

Validates 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.

post/v1/private/ollama/test-connection

Request

  • Base URL
    http://localhost:5173/api
  • URL
    http://localhost:5173/api/v1/private/ollama/test-connection
  • Auth
    none declared

Request body

base_urlstring required

Base 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_keystring

Optional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.

Example request

{
  "base_url": "http://localhost:11434/v1"
}

Response

Connection test successful

connectedboolean

Whether the connection was successful

versionstring

Server version (returned even if connection failed or version is incompatible)

error_messagestring

Error message if connection failed

Changes

No recorded changes to this operation across all 82 revisions of this API.