NestAI Docs
API REFERENCE
NestAI exposes an internal API for managing your server and account. All routes require the x-internal-secret header.
⚠
The NestAI API is an internal management API, not a public API. It's used by the NestAI dashboard. Direct API access for end users is through the Open WebUI API running on your server.
Open WebUI API (on your server)
Your deployed server runs Open WebUI which exposes an OpenAI-compatible API. You can use this to build integrations directly against your private AI:
Base URL
https://yourname.nestai.chirai.dev/api/v1Chat completion (OpenAI-compatible)
curl https://yourname.nestai.chirai.dev/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_WEBUI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.1",
"messages": [{"role": "user", "content": "Hello"}]
}'Get your API key from Open WebUI → Settings → Account → API Keys.
Ollama API (on your server)
Ollama also has its own API on port 11434 of your server (accessible only from the NestAI backend, not publicly exposed):
| Endpoint | Method | Description |
|---|---|---|
| /api/tags | GET | List installed models |
| /api/pull | POST | Pull a model ({"name": "llama3.1"}) |
| /api/delete | DELETE | Delete a model ({"name": "llama3.1"}) |
| /api/generate | POST | Generate text (streaming) |
| /api/chat | POST | Chat completion (streaming) |
NestAI Management API
Used internally by the dashboard. All endpoints are at https://api.nestai.chirai.dev and require x-internal-secret header.
| Endpoint | Method | Description |
|---|---|---|
| /api/deploy/provision | POST | Deploy a new server |
| /api/deploy/cancel | POST | Cancel an in-progress deployment |
| /api/team/invite | POST | Invite a team member |
| /api/team/rename-subdomain | POST | Rename subdomain |
| /api/models/:teamId | GET | List installed models |
| /api/models/pull | POST | Pull a model onto server |
| /api/models/:teamId/:name | DELETE | Delete a model |
| /api/analytics/:teamId | GET | Usage analytics |
| /api/audit/:teamId | GET | Audit log entries |
| /api/knowledge/:teamId | GET | List knowledge docs |
| /api/knowledge/upload | POST | Upload a document |
ℹ
Want API access to build integrations? The Open WebUI API on your server is the right tool — it's fully OpenAI-compatible and your data stays on your server.