Skip to main content
Watch: I Built an AI App Without Leaving Databricks

API compatibility - 10 documented limits

Ollama API compatibility

Ollama documents an OpenAI-compatible API at http://localhost:11434/v1/ (chat/completions, completions, responses, embeddings and models). Its Anthropic-compatible base URL, the value for ANTHROPIC_BASE_URL, is http://localhost:11434. The docs list 10 limitations: 6 for the OpenAI-compatible layer and 4 for the Anthropic-compatible layer.

Verified against Ollama's own documentation. Not documented means the docs read that day do not say; it never means No.

Compare every provider in the API compatibility matrix.

OpenAI-compatible API

Supported
Base URL
http://localhost:11434/v1/
Endpoints
  • chat/completions
  • completions
  • responses
  • embeddings
  • models
Auth
Local: API key required by the client but ignored by Ollama (docs use 'ollama'). Cloud: OLLAMA_API_KEY.
Regional and alternate URLs
  • Localhttp://localhost:11434/v1/
  • Cloudhttps://ollama.com/v1
Notes
Ollama supports a subset of the OpenAI API. Responses API (added in v0.13.3) is stateless only. Direct cloud access at https://ollama.com/v1 needs no local install; the cloud API does not support stateful Responses or custom/freeform tool-call replay.

From the docs

Connect OpenAI clients to Ollama. Ollama supports a subset of the OpenAI API.
docs.ollama.com/api/openai-compatibility

Anthropic-compatible API

Supported
ANTHROPIC_BASE_URL
http://localhost:11434
Auth
Local: ANTHROPIC_AUTH_TOKEN=ollama (required but ignored). Cloud: Authorization: Bearer $OLLAMA_API_KEY (x-api-key alone not accepted).
Regional and alternate URLs
  • Localhttp://localhost:11434
  • Cloudhttps://ollama.com
Notes
Ollama supports a subset of the Anthropic Messages API at /v1/messages. The cloud base URL https://ollama.com is derived from the documented request URL https://ollama.com/v1/messages, not stated as a base URL.

From the docs

export ANTHROPIC_AUTH_TOKEN=ollama # required but ignored export ANTHROPIC_BASE_URL=http://localhost:11434
docs.ollama.com/api/anthropic-compatibility

Documented limitations

Parameters, content types and features Ollama's docs say its compatibility layers ignore, reject or change, each with the line it comes from. A layer with nothing listed may still differ in ways the docs do not spell out.

OpenAI-compatible layer6

Anthropic-compatible layer4

Example from Ollama's docs

Copied verbatim from the provider's documentation, placeholders included.

Provider example
from openai import OpenAI

client = OpenAI(
    base_url='http://localhost:11434/v1/',
    api_key='ollama',  # required but ignored
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            'role': 'user',
            'content': 'Say this is a test',
        }
    ],
    model='gpt-oss:20b',
)

More on Ollama

Newsletter

Know when a provider changes its API

One email per week. New models, new endpoints and the compatibility changes that break a base URL, and what they mean for your stack.