AiinakDocs

Command Palette

Search for a command to run...

Drive for Agents (API)

New

Connect AI agents and scripts to Smart Drive with personal API keys — search, read, upload and share files over REST or the MCP server.

Give your agent a drive

Smart Drive exposes a public REST API so AI agents, scripts and integrations can use your drive the way you do: search files by meaning, read document contents as text, save new files and share them. Everything an agent creates appears instantly in your Drive UI, where you can open it, edit it in aiinak Docs or Sheets, and share it.

Personal API keys

Created in Drive → API Keys. Scoped, revocable, and shown exactly once at creation.

Content, not just bytes

Read documents, spreadsheets and PDFs as extracted text — what agents actually need.

MCP server

One config block connects Claude Desktop, Claude Code or Cursor via @aiinak/workspace-mcp.

Activity log

Every API call is listed in Drive → API Keys, so you always know what your agents did.

API keys and scopes

Create keys in the Drive app under API Keys in the sidebar. Give the key a name, pick its scopes, and copy the key when it is shown — it is stored hashed and can never be displayed again. A key acts as you: it sees the files you can see, and its uploads count against your storage quota. Revoke a key at any time; revocation is immediate.

ScopeAllows
files:readSearch, list, read file content, get download URLs
files:writeUpload files, create folders
files:deleteMove files to trash (restorable in the app)
shareCreate share links and send share notifications

Authentication

The base URL is https://drive.aiinak.com/api/v1. Send your key as a Bearer token on every request.

Your first requestbash
curl https://drive.aiinak.com/api/v1/me \
  -H "Authorization: Bearer adk_your_key"

Requests without a valid key return 401; a valid key used outside its scopes returns 403 with insufficient_scope. All responses share one JSON shape: { success: true, data: … } on success, { success: false, error, message } on failure.

Endpoints

EndpointScopeDescription
GET /meanyAccount, key scopes, storage used vs quota
GET /filesfiles:readList folders and files (?folderId= for a subfolder)
GET /files/search?q=files:readSemantic + keyword search over names and contents, including files shared with you
GET /files/{id}files:readFile metadata
GET /files/{id}/contentfiles:readExtracted text (?maxChars=, default 20000)
GET /files/{id}/downloadfiles:readShort-lived presigned URL for raw bytes (?expiresIn=, default 600s)
POST /filesfiles:writeCreate a file from contentText or contentBase64 (max 25 MB)
POST /foldersfiles:writeCreate a folder (idempotent per name and parent)
POST /files/{id}/shareshareShare with an email; sends a notification and returns the link
DELETE /files/{id}files:deleteMove a file to trash
Search, read, writebash
# Search by meaning
curl "https://drive.aiinak.com/api/v1/files/search?q=q3%20sales%20report" \
  -H "Authorization: Bearer $KEY"

# Read a document as text
curl "https://drive.aiinak.com/api/v1/files/FILE_ID/content" \
  -H "Authorization: Bearer $KEY"

# Save a file the user will see in their Drive
curl -X POST https://drive.aiinak.com/api/v1/files \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"filename":"report.md","contentText":"# Q3 Report…"}'

# Share it
curl -X POST https://drive.aiinak.com/api/v1/files/FILE_ID/share \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"shareWithEmail":"[email protected]","accessLevel":"view"}'

Limits and errors

LimitValueOn exceeding
Rate limit120 requests / minute per key429 rate_limited; retry after the window
Upload size25 MB per file via API413 — use the Drive app for larger files
StorageYour plan's quota (50 GB free)413 quota exceeded — upgrade in Drive settings

MCP server for Claude and Cursor

The @aiinak/workspace-mcp package (npm) exposes your drive to any MCP client as eight tools: drive_search, drive_list_files, drive_read_file, drive_upload_file, drive_create_folder, drive_share_file, drive_get_download_url and drive_usage.

Claude Desktop / Cursor configjson
{
  "mcpServers": {
    "aiinak-drive": {
      "command": "npx",
      "args": ["-y", "@aiinak/workspace-mcp"],
      "env": { "AIINAK_DRIVE_API_KEY": "adk_your_key" }
    }
  }
}
Claude Codebash
claude mcp add aiinak-drive -e AIINAK_DRIVE_API_KEY=adk_your_key -- npx -y @aiinak/workspace-mcp