Opik Ollama API
Ollama provider configuration endpoints with OpenAI-compatible API support.
Ollama provider configuration endpoints with OpenAI-compatible API support.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/opik-ollama-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Opik REST Ollama API
description: The Opik REST API is currently in beta and subject to change.
contact:
name: Github Repository
url: https://github.com/comet-ml/opik
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: http://localhost:5173/api
description: Local server
- url: https://www.comet.com/opik/api
description: Opik Cloud
tags:
- name: Ollama
description: Ollama provider configuration endpoints with OpenAI-compatible API support.
paths:
/v1/private/ollama/models:
post:
tags:
- Ollama
summary: List available Ollama models
description: Fetches the list of models available from the Ollama instance. 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 model discovery. For actual LLM inference, use the URL with /v1 suffix for OpenAI-compatible endpoints.
operationId: listModels
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OllamaInstanceBaseUrlRequest'
required: true
responses:
'200':
description: Models retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OllamaModel'
'422':
description: Unprocessable Content - Invalid URL format
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
'500':
description: Failed to fetch models
'503':
description: Ollama provider is disabled
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/private/ollama/test-connection:
post:
tags:
- Ollama
summary: Test connection to Ollama instance
description: 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.
operationId: testConnection
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OllamaInstanceBaseUrlRequest'
required: true
responses:
'200':
description: Connection test successful
content:
application/json:
schema:
$ref: '#/components/schemas/OllamaConnectionTestResponse'
'422':
description: Unprocessable Content - Invalid URL format
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
'502':
description: Connection test failed - Ollama instance unreachable
content:
application/json:
schema:
$ref: '#/components/schemas/OllamaConnectionTestResponse'
'503':
description: Ollama provider is disabled
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
components:
schemas:
OllamaConnectionTestResponse:
type: object
properties:
connected:
type: boolean
description: Whether the connection was successful
version:
type: string
description: Server version (returned even if connection failed or version is incompatible)
error_message:
type: string
description: Error message if connection failed
description: Response from Ollama connection test.
ErrorMessage:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: string
OllamaInstanceBaseUrlRequest:
required:
- base_url
type: object
properties:
base_url:
minLength: 1
type: string
description: 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.
example: http://localhost:11434/v1
api_key:
type: string
description: Optional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.
description: Request with Ollama instance base URL for connection testing or model discovery.
OllamaModel:
required:
- name
type: object
properties:
name:
minLength: 1
type: string
description: Model name
example: llama2
size:
type: integer
description: Model size in bytes
format: int64
digest:
type: string
description: Model digest/hash
modified_at:
type: string
description: Model modification date
format: date-time
description: Ollama model information