--- type: reference title: llama.cpp Server API Endpoints description: Complete reference for health check, model listing, chat completions, and native completion endpoints. tags: - unverified - ornith - api - llama.cpp - endpoints timestamp: 2026-07-18 verified: 2026-08-28 --- # API Endpoints The llama.cpp server provides these endpoints: ## Health Check ```bash curl http://localhost:8080/health ``` ## List Models ```bash curl http://localhost:8080/v1/models ``` ## Chat Completions (OpenAI-compatible) ```bash curl http://localhost:8080/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "frank-default-local", "messages": [...], "max_tokens": 100 }' ``` ## Native Completion Endpoint ```bash curl http://localhost:8080/completion \ -H "Content-Type: application/json" \ -d '{ "prompt": "Hello, how are you?", "n_predict": 100 }' ``` ## Model Features ### Reasoning/Thinking Blocks Ornith models use `...` blocks for reasoning. The server automatically: - Detects and preserves reasoning content - Returns reasoning in `reasoning_content` field - Supports the `developer` role (or falls back to `system`) ### Chat Template The model uses a specific chat template that supports: - System prompts - User/Assistant roles - Reasoning preservation ## Related * [Pi Configuration](/tools/ornith-llama-cpp-setup/pi-configuration.md) — How pi connects to these endpoints * [Installation](/tools/ornith-llama-cpp-setup/installation.md) — Starting the server