Ollama API Console

Create an API key and use gemma3, llava and qwen2.5 from your own apps.

Self-signup is disabled on this server. Ask the admin for a key.
Your API key

Save it now. For security it can't be shown again.

Example:


    
New API key (the old one no longer works)

Save it now. It can't be shown again.

Create key

New API key

Copy it now. It can't be shown again.

All keys

Authentication

Send your key in a header on every request. Keys in URLs (?key=...) are deliberately not supported because URLs get logged.

Authorization: Bearer sk-ol-xxxxxxxx
# or
x-api-key: sk-ol-xxxxxxxx

Endpoints

MethodURLAuthPurpose
GET/healthnoneService status
POST/v1/keys/signupnoneCreate your own API key (if enabled)
GET/v1/modelskeyList models you can use
POST/v1/chat/completionskeyOpenAI-compatible chat (streaming, vision)
POST/v1/chatkeyNative chat (NDJSON streaming)
POST/v1/generatekeySingle-prompt completion
POST/v1/embeddingskeyText embeddings
GET/v1/usagekeyTokens used and remaining this month
GET/v1/keys/mekeyYour key's settings and expiry
POST/v1/keys/rotatekeyGet a new secret; old one stops working
DELETE/v1/keys/mekeyRevoke your key

cURL

curl {{BASE}}/v1/chat/completions \
  -H "Authorization: Bearer sk-ol-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemma3:4b","messages":[{"role":"user","content":"Hello!"}]}'

Python (official OpenAI SDK)

from openai import OpenAI
client = OpenAI(base_url="{{BASE}}/v1", api_key="sk-ol-xxxxxxxx")
r = client.chat.completions.create(
    model="qwen2.5:7b",
    messages=[{"role": "user", "content": "Explain APIs simply"}],
)
print(r.choices[0].message.content)

JavaScript

const r = await fetch("{{BASE}}/v1/chat/completions", {
  method: "POST",
  headers: { "Authorization": "Bearer sk-ol-xxxxxxxx", "Content-Type": "application/json" },
  body: JSON.stringify({ model: "gemma3:4b", messages: [{ role: "user", content: "Hi" }] }),
});
console.log((await r.json()).choices[0].message.content);

Image input (llava)

{"model": "llava:latest", "messages": [{"role": "user", "content": [
  {"type": "text", "text": "What is in this image?"},
  {"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBORw0..."}}
]}]}

Only base64 data: images are accepted. The server never downloads remote URLs.

Errors

401 invalid/expired/revoked key · 403 model or IP not allowed · 413 request too large · 422 invalid input · 429 rate limit or quota (see Retry-After) · 502/503 model backend unavailable or busy.