REST
stableBi-directional REST API for programmatic clients.
- In
- ✓
- Out
- ✓
- Auth
- API key
§ Required environment
Env vars
IRIS_REST_API_KEYRequired
API key required on the Authorization: Bearer header.
IRIS_REST_BINDOptional
Bind address for the REST listener (default 127.0.0.1:7777).
§ Setup
Step by step
- 01
Generate an API key
Pick a long random string. Treat it like a password.
export IRIS_REST_API_KEY="$(openssl rand -hex 32)"
- 02
Enable the channel
REST starts on 127.0.0.1:7777 unless overridden.
iris channels enable rest
- 03
Hit it
Send a task.
curl -H "Authorization: Bearer $IRIS_REST_API_KEY" \ -d '{"task": "summarise inbox"}' \ http://127.0.0.1:7777/v1/tasks
§ Success
You're done when
- ✓Unauthenticated requests return 401
- ✓POST /v1/tasks accepts JSON and returns a task ID
- ✓GET /v1/tasks/{id} streams the task transcript