Agent API v1

Connect your agent to Thinkly in minutes.

Send notes, links, markdown, and projects into Thinkly with one API key. Use the same API to turn saved context into pages and reusable drafts.

First request
curl https://thinkly.pluglab.ai/api/agent/clips \
  -X POST \
  -H 'Authorization: Bearer tk_your_api_key' \
  -H 'Idempotency-Key: clip-001' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Weekly insight",
    "text": "Save the final answer from today’s research run."
  }'
Clips
POST /api/agent/clips
Ingest
POST /api/agent/ingest
Upload
POST /api/agent/upload
Projects
POST /api/agent/projects

What you can build

Save clips from any agent

Send one note at a time or stream useful answers into Thinkly as clips.

Ingest links, text, and markdown in batches

Group related items into one capture and keep them reusable later.

Create pages and generate drafts

Turn saved context into pages first, then generate a draft when the page is ready.

Create projects from external workflows

Open a project in Thinkly from your agent, then keep organizing work inside the product.

Quickstart

1

Sign in to Thinkly and create a scoped API key in Settings → API keys.

2

Send the key as Bearer auth in every request, and add an Idempotency-Key on write requests.

3

Start with one clip or one ingest batch, then move into pages, draft generation, uploads, and projects.

Authentication

Thinkly Agent API v1 uses personal API keys. You can create scoped keys for specific integrations and keep them server-side as Bearer tokens.

curl https://thinkly.pluglab.ai/api/agent/clips \
  -X POST \
  -H 'Authorization: Bearer tk_your_api_key' \
  -H 'Idempotency-Key: clip-001' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Weekly insight",
    "text": "Save the final answer from today’s research run."
  }'
  • Scoped API keys are supported for clips, ingest, uploads, pages, generation, and projects.
  • Recommended scopes: clips:write, ingest:write, upload:write, pages:read, pages:generate, projects:write.
  • Keys can be created and revoked in Settings → API keys.

Credits and limits

Agent API requests use the same plan limits as the product. Credits are enforced on AI-backed actions instead of a separate agent-only quota.

  • POST /api/agent/ingest uses AI credits per item: text 1, markdown 1, url 2.
  • POST /api/agent/pages/:id/generate uses AI credits: custom 6, template set 15.
  • Project creation still follows the active project limit of your plan.

Idempotent writes

Write endpoints support Idempotency-Key. Re-sending the same request with the same key returns the stored result. Reusing the same key with a different body returns 409.

curl https://thinkly.pluglab.ai/api/agent/projects \
  -X POST \
  -H 'Authorization: Bearer tk_your_api_key' \
  -H 'Idempotency-Key: project-2026-04-launch' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "April launch plan",
    "template": "goal_milestones"
  }'

Core endpoints

POST/api/agent/clips

Create one clip

Use this for a single note, link, or saved answer.

{
  "title": "Saved answer",
  "text": "This is the final summary worth keeping.",
  "tags": ["research", "launch"]
}
POST/api/agent/ingest

Ingest a batch

Send text, URLs, and markdown together and keep them grouped in one capture.

{
  "items": [
    { "type": "url", "url": "https://example.com/article" },
    { "type": "markdown", "title": "Notes", "text": "# Key points\n- One\n- Two" }
  ]
}
POST/api/agent/upload

Upload files through the agent facade

Send multipart uploads through the same Agent API surface when your agent needs to attach files.

curl https://thinkly.pluglab.ai/api/agent/upload \
  -H 'Authorization: Bearer tk_your_api_key' \
  -H 'Idempotency-Key: upload-001' \
  -F 'file=@notes.md'
POST/api/agent/pages/:id/generate

Generate a draft from a page

Use page generation when your saved clips have already been organized into a page.

{
  "mode": "custom",
  "prompt": "Turn this page into a short publishable brief."
}
POST/api/agent/projects

Create a project

Open a new Thinkly project from your agent workflow with a name, template, and status.

{
  "name": "April launch plan",
  "template": "goal_milestones",
  "icon": "🚀"
}
POST/api/agent/projects/:id/items

Add an item to a project stage

Place a clip, page, draft, or published item into a Thinkly project stage from your agent workflow.

{
  "stage": "clip",
  "referenceId": "clip_123"
}

Common response shape

Agent API v1 returns a normalized envelope so your integration can handle success and failure consistently.

{
  "success": true,
  "data": {
    "id": "clip_123",
    "title": "Saved answer"
  },
  "error": null
}

Built for OpenClaw, Hermes, and custom agents

If you already use OpenClaw, start there first. If you are wiring Hermes or your own agent, use clips and ingest first, then add pages, generation, and projects.

Choose the right integration path

Start with OpenClaw if you want the fastest setup

Use the ready-made OpenClaw flow if you want commands, setup steps, and a working integration without writing your own API client first.

Open OpenClaw guide

Use the API if you want a custom workflow

Use Thinkly Agent API v1 when Hermes or your own agent should save clips, ingest batches, create pages, and open projects directly.

See landing overview

Endpoint reference examples

Open each endpoint to see a request body, response example, and integration notes.

POST/api/agent/clipsCreate one clip
Request body
{
  "title": "Saved answer",
  "text": "This is the final summary worth keeping.",
  "tags": ["research", "launch"]
}
Response
{
  "success": true,
  "data": {
    "id": "clip_123",
    "title": "Saved answer",
    "text": "This is the final summary worth keeping."
  },
  "error": null
}
Notes
  • Good first endpoint for Hermes or custom agents.
  • Works well for one final answer at a time.
POST/api/agent/ingestIngest a batch
Request body
{
  "items": [
    { "type": "url", "url": "https://example.com/article" },
    { "type": "markdown", "title": "Notes", "text": "# Key points\n- One\n- Two" }
  ]
}
Response
{
  "success": true,
  "data": {
    "captureBatchId": "batch_123",
    "created": [
      { "id": "clip_1", "title": "https://example.com/article", "url": "https://example.com/article" },
      { "id": "clip_2", "title": "Notes", "url": null }
    ],
    "failed": []
  },
  "error": null
}
Notes
  • Best starting point when an agent sends multiple items at once.
  • Text, url, and markdown are all supported in one request.
  • This route charges AI credits per item and returns item-level failures when credits run out.
POST/api/agent/uploadUpload files through the agent facade
Request body
curl https://thinkly.pluglab.ai/api/agent/upload \
  -H 'Authorization: Bearer tk_your_api_key' \
  -H 'Idempotency-Key: upload-001' \
  -F 'file=@notes.md'
Response
{
  "success": true,
  "data": {
    "id": "clip_upload_123",
    "title": "notes.md"
  },
  "error": null
}
Notes
  • Use this when your agent sends real files instead of plain JSON.
  • Scoped keys and idempotency also work on uploads.
  • This is the public agent facade over Thinkly file upload, not the internal web route.
POST/api/agent/pages/:id/generateGenerate a draft from a page
Request body
{
  "mode": "custom",
  "prompt": "Turn this page into a short publishable brief."
}
Response
{
  "success": true,
  "data": {
    "jobId": "draft_123",
    "type": "page_generation",
    "status": "completed",
    "result": {
      "draftId": "draft_123"
    }
  },
  "error": null
}
Notes
  • The current v1 job wrapper returns a completed generation envelope.
  • Use this after clips are already organized into a page.
  • Generation consumes the same AI credits as the in-app draft flow.
POST/api/agent/projectsCreate a project
Request body
{
  "name": "April launch plan",
  "template": "goal_milestones",
  "icon": "🚀"
}
Response
{
  "success": true,
  "data": {
    "id": "project_123",
    "name": "April launch plan",
    "template": "goal_milestones"
  },
  "error": null
}
Notes
  • Use this when the agent needs a long-lived workspace, not just one clip.
  • Projects are best for milestone or board-style workflows.
  • Project creation follows the same plan-based active project limits as the main app.
POST/api/agent/projects/:id/itemsAdd an item to a project stage
Request body
{
  "stage": "clip",
  "referenceId": "clip_123"
}
Response
{
  "success": true,
  "data": {
    "id": "project_item_123",
    "stage": "clip",
    "referenceId": "clip_123"
  },
  "error": null
}
Notes
  • If columnId is omitted, Thinkly resolves the first workflow column for that stage.
  • Use this right after creating a clip or page when the agent is building a project workflow.

Current v1 scope

  • Private Agent API for early integrations, not a fully versioned public platform yet.
  • Scoped API keys, idempotency keys, and upload facade are now included in v1.
  • Generation jobs currently use a lightweight job wrapper around existing Thinkly draft generation.

Start with one useful request, then make it reusable.

The best first integration is simple: save one useful answer, one link, or one markdown note. Once that works, turn it into pages and drafts inside Thinkly.

See first requestOpen OpenClaw guide