REST API Overview
REST API Overview
The AgentWiki REST API is hosted on Cloudflare Workers at:
- Base URL:
https://api.agentwiki.cc - Specification: OpenAPI 3.1 (
https://api.agentwiki.cc/openapi.json) - Interactive Playground: Interactive API Docs
Authentication
Pass your API key or JWT access token in the Authorization header:
Authorization: Bearer aw_xxxxxxxxxxxxxxxxxxxxTry it in the sandbox
The sandbox runs the real API handlers against a disposable workspace, so you can call the
API from the Interactive API Docs or curl without an account.
# 1. Get a one-hour token and a seeded workspace (sample folders, documents, tags, graph links)curl -X POST https://api.agentwiki.cc/api/sandbox/token
# 2. Call any supported route through the sandbox prefixcurl https://api.agentwiki.cc/api/sandbox/api/documents \ -H "Authorization: Bearer <sandbox token>"| Sandbox | Value |
|---|---|
| Base URL | https://api.agentwiki.cc/api/sandbox (select the sandbox server in the playground) |
| Token lifetime | 1 hour; 5 tokens per minute per IP |
| Request quota | 30 requests per minute per sandbox workspace, 500 credits per workspace |
| Available routes | Documents, Folders, Tags, Search, Knowledge Graph, Sharing, Reorder, Preferences, Analytics |
| Denied routes (403) | Billing, Secrets, Members, AI settings, API Keys, Uploads, Import, Storage, Static Sites, Auth |
| Background jobs | Not processed (embeddings, summaries, relationship extraction) |
| Retention | Workspaces are deleted 24 hours after creation |
Sandbox tokens are rejected on production routes, and production credentials are rejected in the sandbox.
Global Rate Limits
| Endpoint Group | Limit | Window |
|---|---|---|
| General API | 100 requests | 60 seconds |
| Search | 50 requests | 60 seconds |
| Search (with AI Query Expansion) | 10 requests | 60 seconds |
| AI Generation | 15 requests | 60 seconds |
Error Responses
All error responses adhere to standard JSON error envelopes:
{ "error": "Error message description", "code": "OPTIONAL_ERROR_CODE"}