Copy of the legacy ~/.pi/agent/docs tree rebuilt as the command-center knowledge base: concept files promoted to path identity, index listings stripped of frontmatter, all wikilinks/relative links resolved, every checkable claim verified against the live fleet (Dankserver = Ryzen 7 7700X + RTX 3090; Strix Halo is Dankclaw), unverifiable claims tagged. kb-lint exits 0.
74 lines
1.5 KiB
Markdown
74 lines
1.5 KiB
Markdown
---
|
|
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 `<think>...</think>` 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
|