# Omnius REST Quick Reference

Start:

```bash
omnius serve
```

Base:

```text
http://127.0.0.1:11435
```

Docs:

```text
GET /docs
GET /api/docs
GET /openapi.json
GET /openapi.yaml
GET /redoc
```

Auth header:

```text
Authorization: Bearer <key>
```

## Health

```bash
curl -s http://127.0.0.1:11435/health
curl -s http://127.0.0.1:11435/health/ready
curl -s http://127.0.0.1:11435/version
```

## Models

```bash
curl -s http://127.0.0.1:11435/v1/models
curl -s -X POST http://127.0.0.1:11435/v1/config/model/check
```

## Chat

```bash
curl -s http://127.0.0.1:11435/v1/chat \
  -H 'content-type: application/json' \
  -d '{"message":"Summarize this repo in one paragraph.","tools":true}'
```

## Realtime Chat

```bash
curl -s http://127.0.0.1:11435/v1/chat \
  -H 'content-type: application/json' \
  -d '{"message":"Keep this short for voice.","realtime":true}'
```

## OpenAI-Compatible Chat

```bash
curl -s http://127.0.0.1:11435/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{"model":"qwen3:4b","messages":[{"role":"user","content":"hello"}]}'
```

## Ollama-Compatible Generate

```bash
curl -s http://127.0.0.1:11435/v1/generate \
  -H 'content-type: application/json' \
  -d '{"model":"qwen3:4b","prompt":"Return one sentence."}'
```

## Agentic Run

```bash
curl -s -X POST http://127.0.0.1:11435/v1/run \
  -H 'content-type: application/json' \
  -d '{"task":"Run tests and report failures.","sandbox":"none"}'
```

## Events

```bash
curl -N http://127.0.0.1:11435/v1/events
curl -N 'http://127.0.0.1:11435/v1/events?type=tool.*'
```

## Skills

```bash
curl -s http://127.0.0.1:11435/v1/skills
curl -s http://127.0.0.1:11435/v1/skills/omnius-rest-docs
```

## Tool Call

```bash
curl -s -X POST http://127.0.0.1:11435/v1/tools/memory_search/call \
  -H 'content-type: application/json' \
  -d '{"args":{"query":"rest api docs"}}'
```

Deterministic bookkeeping without an agent run:

```bash
curl -s -X POST http://127.0.0.1:11435/v1/tools/todo_write/call \
  -H 'content-type: application/json' \
  -H 'x-omnius-session-id: tracking-turn-123' \
  -d '{"profile":"bookkeeping-tracking","args":{"todos":[{"content":"Create report","status":"in_progress"}]}}'
```

## Voice TTS

```bash
curl -s -X POST http://127.0.0.1:11435/v1/voice/tts \
  -H 'content-type: application/json' \
  -d '{"text":"Hello from Omnius.","format":"wav"}' \
  --output speech.wav
```

## Runtime Key Minting

Requires admin scope:

```bash
curl -s -X POST http://127.0.0.1:11435/v1/keys \
  -H 'authorization: Bearer admin-secret' \
  -H 'content-type: application/json' \
  -d '{"scope":"run","owner":"ci","rpm":60,"tpd":100000,"max_jobs":3}'
```
