API Reference

GumboMax provides RESTful APIs covering knowledge base retrieval, SKILL Market, AI Workbench file management, and draft storage. This is the complete reference.

⚡ AI Quick Start — Ready in 3 minutes with your Key

  1. Self-check Key: POST /v1/auth/key-status   Header: X-Api-Key returns all subsystem connectivity status (standard entry)
  2. Fallback verify: GET /v1/knowledge?action=agents&key=YOUR_KEY returns the agent list if Key is valid
  3. Browse SKILL Market: GET /v1/skills fetches all available SKILL cards (code, intro, tier)
  4. Get SKILL body: POST /v1/knowledge?action=start&key=KEY   body: {"agent":"03-deep-research","task":"deep-research-report"} returns session + first fragment
  5. Save to Drafts: POST /v1/generator/save-draft   Header: X-Api-Key   body: {"productCode":"...","name":"...","tier":"...","userEmail":""}
  6. Manage files: GET/POST /v1/profile/projects + /v1/profile/projects/{id}/files   Header: X-Api-Key

These steps cover all core read (knowledge/market) and write (drafts/files) scenarios. Full endpoint table below.

Base URL

https://gcs-watchdog-ai.com/v1

All APIs use application/json format.

Authentication (Dual Channel)

Channel 1: URL Query Parameter (read-only)

curl "https://gcs-watchdog-ai.com/v1/knowledge?action=agents&key=YOUR_API_KEY"

Use for: knowledge retrieval, SKILL Market browsing. Append ?key= to the URL.

Channel 2: X-Api-Key Header (read + write)

curl -H "X-Api-Key: YOUR_API_KEY" "https://gcs-watchdog-ai.com/v1/profile/projects"

Use for: knowledge retrieval, SKILL Market, Workbench file management, draft storage. This is the recommended method.

两种方式的区别:
?key= 查询参数仅支持读操作。X-Api-Key 请求头支持全部操作(读 + 写),是推荐方式。把 Key 给你的 AI 时,告诉它用这个请求头即可访问全部权限范围内的功能。
Coming soon: Authorization: Bearer JWT support will be added in a future version.

Get Your API Key

After subscribing, your API Key will be sent to your registered email. Self-service Key management in the AI Workbench is coming soon. You can create multiple Keys for different AIs under one subscription — all Keys share the same plan permissions.

Permissions

PlanKnowledge Base AccessSKILL Market VisibilityWorkbench Features
Free (7-day trial)Full knowledge base (7 days)All SKILL card intros + Free/Base full codesFile management + Drafts
AiEA BaseBase knowledge domainAll SKILL card intros + Base full codesFile management + Drafts
AiCOO ProBase + Pro knowledge domainsAll SKILL card intros + Pro and below full codesFile management + Drafts
AiCOO UltraAll knowledge domainsAll SKILL card full codesFile management + Drafts (admin can use Generator)
SKILL Code Visibility: SKILL cards are visible to everyone (name, intro, scenarios). However, the product code is only shown in full for SKILLs within your plan tier. Codes beyond your tier display as ****@v?. This is server-side filtering, not frontend hiding.

Rate Limits

EndpointRate LimitNotes
Knowledge API60 req/minKnowledge retrieval, per-key
Profile / Files API60 req/minWorkbench file management
Generator API30 req/minDraft saves
Contact API10 req/minContact form, no auth required

Exceeding limits returns 429 Too Many Requests with a Retry-After header.

Response Format

Success response:

{"ok": true, /* ...业务数据 */}

Error response:

{"ok": false, "error": "ERROR_CODE"}

Error Codes

HTTPCodeDescription
400INVALID_PARAMSMissing or invalid parameters
400invalid_actionknowledge action not in valid list (response lists available values)
400product_code requiredsearch/execute missing product_code parameter
400agent and task requiredstart session missing agent or task (note: must use POST + JSON body)
401UNAUTHORIZEDMissing or invalid API Key
402subscription_requiredActive subscription required
403FORBIDDENValid Key but insufficient permissions
404NOT_FOUNDResource not found
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORInternal server error

All Endpoints

☁️ Knowledge Base

MethodEndpointAuthDescription
GET/v1/knowledge?action=agents&key=?key=List available Agents
POST/v1/knowledge?action=start&key=?key=Start knowledge session. Body: {"agent":"03","task":"name"}, returns session + fragment content + totalSteps. AI can directly read and execute.
POST/v1/knowledge?action=next&key=?key=Get next fragment. Body: {"session":"uuid"}
POST/v1/knowledge?action=search&key=?key=Search SKILL. Body: {"product_code":"AICOO:..."} Parameter name is product_code, not code
POST/v1/knowledge?action=execute&key=?key=Step-by-step execution gateway. Body: {"product_code":"...","step":0} → each call returns 1 instruction only, returns done:true when complete
start / next / search / execute 四个 action 都必须用 POST + JSON body! GET 请求会报 agent and task required
agents 可以用 GET。
Search endpoint note: may return found:false even if the SKILL is live. If search fails, use GET /v1/skills for the complete catalog. We are working on expanding search index coverage.

🛒 SKILL Market

MethodEndpointAuthDescription
GET/v1/skillsNone (optional X-Api-Key or ?key= for full codes)List all published SKILL cards. Supports ?dept= ?tier= ?q= filters. Codes beyond your tier display as ****@v?
GET/v1/skills/{code}None (optional auth same as above)Get single SKILL detail (name/intro/scenarios/benefits/tier/difficulty)

🧠 AI Workbench · File Management

MethodEndpointAuthDescription
GET/v1/profile/projectsX-Api-Key or JWTList all folders. Returns [{id, title, category, parent_id}]
POST/v1/profile/projectsX-Api-Key or JWTCreate folder. Body: {"title":"name","category":"","parent_id":null}
PUT/v1/profile/projects/{id}X-Api-Key or JWTRename folder
DELETE/v1/profile/projects/{id}X-Api-Key or JWTDelete folder
GET/v1/profile/projects/{id}/filesX-Api-Key or JWTList files in folder
GET/v1/profile/projects/{id}/files/{fid}X-Api-Key or JWTRead file content
POST/v1/profile/projects/{id}/filesX-Api-Key or JWTCreate file. Body: {"filename":"name.md","content":"body"}
PUT/v1/profile/projects/{id}/files/{fid}X-Api-Key or JWTUpdate file content
DELETE/v1/profile/projects/{id}/files/{fid}X-Api-Key or JWTDelete file
数据模型概念映射:
文件夹 = project(API 里叫 project,前端 UI 叫「文件夹」)
文档 = file(API 里叫 file,前端 UI 叫「文档」)
根目录 = parent_id: null
字段注意:写入用 content,读回字段叫 content_text

📝 Drafts & Self-Check

MethodEndpointAuthDescription
POST/v1/auth/key-statusX-Api-KeyKey self-check endpoint. Returns subsystem connectivity (knowledge/skills/profile/generator). AI should call this first after receiving a Key to confirm permissions.
POST/v1/generator/save-draftX-Api-KeySave to Drafts. Body: {"productCode":"...","name":"...","intro":"...","tier":"free","userEmail":""}. All valid subscription Keys can call this.
GET/v1/profile/skills/draftsX-Api-Key or JWTList drafts
DELETE/v1/profile/skills/drafts/{fid}X-Api-Key or JWTDelete draft

👤 Profile & Others

MethodEndpointAuthDescription
GET/v1/profileX-Api-Key or JWTGet profile (plan/storage/subscription status)
GET/v1/gmcooX-Api-KeySystem health check
POST/v1/contactNoneSubmit ticket. Body: {"name":"","email":"","message":""}

Complete Examples

Scenario: AI with Key, full workflow — browse SKILLs → get body → save draft → create folder → write file

# 0. 你的 Key
KEY="YOUR_API_KEY"

# 1. 自检 Key(推荐第一步)
curl -X POST "https://gcs-watchdog-ai.com/v1/auth/key-status" -H "Content-Type: application/json" -H "X-Api-Key: $KEY"

# 2. 浏览经验广场
curl -H "X-Api-Key: $KEY" "https://gcs-watchdog-ai.com/v1/skills"

# 3. 取商品详情
curl "https://gcs-watchdog-ai.com/v1/skills/AICOO%3AMKT-RESEARCH%3Adeep-research-report%40v1"

# 4. 取商品正文(POST + body)
curl -X POST "https://gcs-watchdog-ai.com/v1/knowledge?action=start&key=$KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent":"03-deep-research","task":"deep-research-report"}'

# 5. 存入草稿箱
curl -X POST "https://gcs-watchdog-ai.com/v1/generator/save-draft" \
  -H "Content-Type: application/json" -H "X-Api-Key: $KEY" \
  -d '{"productCode":"AICOO:MKT-RESEARCH:deep-research-report@v1","name":"数据调研","intro":"多源验证","tier":"free","userEmail":""}'

# 6. 创建文件夹
curl -X POST "https://gcs-watchdog-ai.com/v1/profile/projects" \
  -H "Content-Type: application/json" -H "X-Api-Key: $KEY" \
  -d '{"title":"我的项目","category":"","parent_id":null}'

# 7. 写文档
curl -X POST "https://gcs-watchdog-ai.com/v1/profile/projects/123/files" \
  -H "Content-Type: application/json" -H "X-Api-Key: $KEY" \
  -d '{"filename":"笔记.md","content":"# 笔记\n内容..."}'

Versioning

Current API version is v1, identified by the URL path (/v1/). Backward compatibility is maintained within the same major version.

Next Steps