# Batch Get Disks Source: https://docs.skilldiscs.com/api-reference/batch POST /api/v1/disks/batch Retrieve up to 10 owned Disks in a single round-trip. Reduces the latency overhead of fanning out parallel requests to `/disks/{id}`. Current production batch retrieval is **owned-only**. Saved-from-others Disks are returned in `not_found`. ## Request Array of Disk UUIDs or `public_id`s. **Max 10 per call.** ### Example ```bash theme={null} curl -X POST https://skilldiscs.com/api/v1/disks/batch \ -H "Authorization: Bearer sk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"ids": ["abc123", "def456", "ghi789"]}' ``` ## Response Owned Disk objects with `public_id`, `title`, `summary`, `text`, `category`, `word_count`, `tags`, `sections`, and `created_at`. Batch responses do not include `related_disks`, `source`, or `source_url`. IDs from the request that did not match any Disk you own. ```json theme={null} { "disks": [ { "public_id": "abc123", "title": "Feynman on Quantum Mechanics", "summary": "...", "text": "...", "category": "science", "word_count": 4231, "tags": ["physics"], "sections": [ { "index": 0, "text": "...", "word_count": 612, "key_points": ["..."] } ], "created_at": "2026-04-12T08:14:09.000Z" } ], "not_found": ["ghi789"] } ``` ## Errors | Status | Code | Meaning | | ------ | --------------------- | ------------------------------------ | | `400` | `bad_request` | `ids` missing or not an array | | `400` | `batch_too_large` | More than 10 ids — split the request | | `401` | `unauthorized` | Bad / missing API key | | `429` | `rate_limit_exceeded` | >100 req/min | # Get Disk Source: https://docs.skilldiscs.com/api-reference/get-disk GET /api/v1/disks/{id} Read a single Disk including sections, key points, metadata, and related Disks. Accepts either the UUID `id` or the short `public_id`. Owner-private Disks return full source text. Published or saved Disks return a redacted shape: summaries, key points, metadata, related Disks, and no verbatim `text`. ## Path parameters Either the Disk UUID or its `public_id`. ### Example ```bash theme={null} curl https://skilldiscs.com/api/v1/disks/abc123 \ -H "Authorization: Bearer sk_your_key_here" ``` ## Response Full original text. Present only when `redacted` is `false`. Origin URL, when applicable. Current Disk visibility, usually `private` or `published`. `owned` or `saved`. Whether verbatim source text is withheld. Indicates returned summaries/key points are AI-generated artifacts. Section text. Present only when `redacted` is `false`. Up to 5 AI-extracted key points. ```json theme={null} { "public_id": "abc123", "title": "Feynman on Quantum Mechanics", "summary": "Introductory lecture distilled into 7 sections.", "text": "...", "category": "science", "source_url": "https://youtu.be/...", "visibility": "private", "relationship": "owned", "redacted": false, "ai_generated": true, "tags": ["physics", "quantum", "lectures"], "word_count": 4231, "created_at": "2026-04-12T08:14:09.000Z", "sections": [ { "index": 0, "text": "...", "word_count": 612, "key_points": ["Probability amplitudes interfere..."] } ], "related_disks": [ { "public_id": "def456", "title": "Schrödinger's Cat — Explained", "similarity": 0.74 } ] } ``` Redacted responses omit `text` and `sections[].text`: ```json theme={null} { "public_id": "abc123", "title": "Feynman on Quantum Mechanics", "summary": "Introductory lecture distilled into 7 sections.", "category": "science", "source_url": "https://youtu.be/...", "visibility": "published", "relationship": "saved", "redacted": true, "ai_generated": true, "tags": ["physics", "quantum", "lectures"], "word_count": 4231, "created_at": "2026-04-12T08:14:09.000Z", "sections": [ { "index": 0, "word_count": 612, "key_points": ["Probability amplitudes interfere..."] } ], "related_disks": [] } ``` ## Errors | Status | Code | Meaning | | ------ | --------------------- | ------------------------------------------------------------- | | `401` | `unauthorized` | Bad / missing API key | | `404` | `not_found` | No Disk with that id, or the Disk is not readable by this key | | `429` | `rate_limit_exceeded` | >100 req/min | # Introduction Source: https://docs.skilldiscs.com/api-reference/introduction REST and MCP endpoints for searching and retrieving your SkillDiscs library. ## Base URL ``` https://skilldiscs.com/api/v1 ``` ## MCP Endpoint ``` https://skilldiscs.com/api/mcp ``` ## Endpoints REST endpoints below are relative to `https://skilldiscs.com/api/v1`. The MCP endpoint is the absolute production route `https://skilldiscs.com/api/mcp`. | Method | Path | Purpose | | ------ | -------------------------------- | ---------------------------------------------------------- | | `POST` | `/search` | Semantic search across owned Disks | | `GET` | `/disks` | List & filter owned and active-saved Disks | | `GET` | `/disks/{id}` | Read one Disk (UUID or public\_id) | | `POST` | `/disks/batch` | Read up to 10 owned Disks in one call | | `POST` | `https://skilldiscs.com/api/mcp` | MCP Streamable HTTP endpoint for read-only knowledge tools | ## Identifiers Disks have **two** identifiers: * **`id`** — internal UUID (e.g. `f47ac10b-58cc-4372-a567-0e02b2c3d479`). * **`public_id`** — short URL-safe slug (e.g. `abc123`). Endpoints accepting `{id}` accept either form. ## Response shape All responses are JSON. Errors follow this shape: ```json theme={null} { "error": "rate_limit_exceeded", "message": "Optional human description", "retry_after": 42 } ``` ## Redaction policy The API never assumes all visible Disks can return verbatim source text. * Owner reading own private Disk: full `text` and `sections[].text`. * Owner reading own published Disk: `redacted: true`; sections include key points but not full text. * Active-saved Disk: `redacted: true`; metadata and AI-derived fields only. Search hits use the same policy: a hit contains either `section_text` or `snippet`, never both. ## CORS CORS is enabled. Browser clients on any origin can call the API directly — but **never embed your API key in a client-side bundle**. Proxy through your own backend. # List Disks Source: https://docs.skilldiscs.com/api-reference/list-disks GET /api/v1/disks List, search, and filter owned and active-saved Disks. Returns a paginated list of owned and active-saved Disks, optionally narrowed by scope, category, or tag. When `search` is set, current production behavior searches owned Disks only and returns a slimmer result shape. ## Query parameters Natural language search over owned Disks. Combines semantic embedding match with title/summary `ILIKE` fallback. Library scope for non-search lists: `all`, `owned`, `saved`, `private`, or `published`. Filter to one category id (e.g. `technology`, `philosophy`, `spirituality`). Ignored when `search` is set. Filter to Disks containing this exact tag name. Applied after the search/category step. Page size. Capped at `100`. Pagination offset. Ignored when `search` is set. ### Examples ```bash theme={null} # Most recent curl https://skilldiscs.com/api/v1/disks \ -H "Authorization: Bearer sk_your_key_here" # Search curl "https://skilldiscs.com/api/v1/disks?search=machine+learning" \ -H "Authorization: Bearer sk_your_key_here" # Filter curl "https://skilldiscs.com/api/v1/disks?scope=owned&category=spirituality&tag=meditation" \ -H "Authorization: Bearer sk_your_key_here" ``` ## Response `private` or `published` for active rows. Present on non-search list rows. `owned` or `saved`. Owner UUID. Present on non-search list rows. Owner display name when available. Present on non-search list rows. May be omitted on semantic `search` rows. ISO 8601 timestamp for saved Disks. Present on non-search list rows. ISO 8601 timestamp. May be omitted on semantic `search` rows. Only present on `search` responses. The effective scope. Search responses always return `owned`. Total matching count (best-effort; equals `disks.length` for search responses). ```json theme={null} { "disks": [ { "public_id": "abc123", "title": "Feynman on Quantum Mechanics", "summary": "Introductory lecture distilled into 7 sections.", "category": "science", "visibility": "private", "relationship": "owned", "owner_user_id": "8fb1d0c2-08d1-46ef-a2f3-6bf241745e24", "owner_display_name": "Ada", "tags": ["physics", "quantum", "lectures"], "word_count": 4231, "saved_at": null, "created_at": "2026-04-12T08:14:09.000Z" } ], "scope": "all", "total": 124 } ``` # MCP Server Source: https://docs.skilldiscs.com/api-reference/mcp Connect Claude, Claude Code, agent SDKs, and other MCP clients to your SkillDiscs library. SkillDiscs exposes a production Model Context Protocol (MCP) server for read-only access to your API-visible Disks. Use MCP when your agent client already supports remote tools. Use the REST API when you are building your own app, backend job, workflow, or integration. ## Endpoint ```text theme={null} https://skilldiscs.com/api/mcp ``` The endpoint uses Streamable HTTP transport. In MCP client configuration, use `type: "http"` or `transport: "http"` depending on the client. ## Authentication Send your SkillDiscs API key as a bearer token: ```http theme={null} Authorization: Bearer sk_your_key_here ``` Generate keys in [Settings -> API Keys](https://skilldiscs.com/settings). Treat MCP API keys like passwords. Anyone holding the key can query API-visible data from your SkillDiscs library. ## Quick Setup ### Claude Code Claude Code can connect directly to remote HTTP MCP servers. ```bash theme={null} claude mcp add --transport http skilldiscs https://skilldiscs.com/api/mcp \ --header "Authorization: Bearer sk_your_key_here" ``` Then verify the connection inside Claude Code: ```text theme={null} /mcp ``` ### JSON MCP Config Use this shape for clients that read `.mcp.json`, `~/.claude.json`, or a similar MCP config file: ```json theme={null} { "mcpServers": { "skilldiscs": { "type": "http", "url": "https://skilldiscs.com/api/mcp", "headers": { "Authorization": "Bearer ${SKILLDISCS_API_KEY}" } } } } ``` Store the key in your environment instead of committing it: ```bash theme={null} export SKILLDISCS_API_KEY="sk_your_key_here" ``` ### Claude Agent SDK When using an SDK that accepts MCP servers programmatically, pass the same HTTP endpoint and authorization header: ```ts theme={null} const mcpServers = { skilldiscs: { type: "http", url: "https://skilldiscs.com/api/mcp", headers: { Authorization: `Bearer ${process.env.SKILLDISCS_API_KEY}`, }, }, } ``` If your client asks for allowed tool names, SkillDiscs tools follow the standard MCP naming pattern: ```text theme={null} mcp__skilldiscs__list_topics mcp__skilldiscs__browse_topic mcp__skilldiscs__search_knowledge mcp__skilldiscs__get_disk mcp__skilldiscs__list_disks ``` ## Tools | Tool | Purpose | | ------------------ | ----------------------------------------------------------------- | | `list_topics` | Map of the topics in the library, with counts and subtopics | | `browse_topic` | Disks under one plain-language topic, plus neighbouring subtopics | | `search_knowledge` | Semantic search across your owned Disk sections | | `get_disk` | Read one Disk by UUID or `public_id` | | `list_disks` | Flat inventory listing by scope, exact category or exact tag | All tools return MCP `text` content whose `text` value is formatted JSON. ### Discovery ladder An agent with no screen — a voice agent especially — cannot start with `search_knowledge`, because it does not yet know what the library contains. The three discovery tiers are meant to be walked in order: ```text theme={null} "What do you know about?" → list_topics "Tell me about quantum physics" → browse_topic { topic: "quantum physics" } "Why do entangled particles ...?" → search_knowledge / get_disk ``` `list_topics` and `browse_topic` are both plain indexed reads over data that already exists (categories, AI tags, concept labels). Neither makes an AI call. `browse_topic` only pays for an embedding when the topic matches nothing lexically, so the common path stays fast enough for a spoken turn. ## `list_topics` The broad map of the library. Call this before anything else when the user asks what is available. ### Input | Field | Type | Required | Notes | | ---------- | ---- | -------- | ----------------------------------------------------------------------------------------------------------------- | | `language` | enum | No | `en` (default), `de`, `fr`, `es`. Affects topic labels only — subtopics keep the language they were generated in. | ### Output ```json theme={null} { "library_size": 42, "topic_count": 6, "content_languages": ["de", "en"], "topics": [ { "topic": "science", "label": "Science", "disk_count": 11, "subtopics": ["quantum physics", "entanglement", "thermodynamics"], "example_titles": ["Quantum Entanglement Explained", "Entropy From Scratch"] } ], "top_subtopics": [{ "name": "quantum physics", "disk_count": 4 }], "next_step": "Call browse_topic with any topic label or subtopic name to get the Disks in it." } ``` `topic` is the stable category id (use it for `list_disks.category`); `label` is the display string. `subtopics` are the AI tags that occur most often inside that topic — these are the specific names an agent can say out loud. Disks whose original was deleted by their owner are excluded: they are placeholders with no title, category or content. ## `browse_topic` Resolve one plain-language topic name to the Disks about it. Resolution is tiered, and the tier used is reported in `resolved_as`: | `resolved_as` | How it matched | | ------------- | ------------------------------------------------------------------------------------------------------ | | `category` | The term is one of the fixed category labels, in any supported language ("Psychologie" → `psychology`) | | `keyword` | Whole-word match against tags, titles, summaries or extracted concept labels | | `semantic` | Nothing matched lexically, so the term was embedded and matched against section content | | `no_match` | Nothing in the library covers it — `available_topics` is returned instead | ### Input | Field | Type | Required | Notes | | ------- | ------- | -------- | ------------------------------------------------------------ | | `topic` | string | Yes | Topic, category or subtopic name, in any supported language. | | `limit` | integer | No | Defaults to `10`. Maximum `50`. | ### Output ```json theme={null} { "topic": "quantum physics", "resolved_as": "keyword", "total": 2, "truncated": false, "disks": [ { "public_id": "dk_9f2c1a", "title": "Quantum Entanglement Explained", "summary": "How entangled particles behave …", "category": "science", "tags": ["quantum physics", "entanglement"], "relationship": "owned", "word_count": 4200, "matched_on": ["tag:quantum physics", "title"] } ], "related_subtopics": [{ "name": "entanglement", "disk_count": 1 }], "next_step": "Call get_disk with a public_id to read a Disk, or search_knowledge to ask a question about it." } ``` `matched_on` says why each Disk is in the list, so an agent can justify the answer instead of asserting relevance. `related_subtopics` are the sibling tags of the matched set with the query term removed — the next thing to offer when the user wants to narrow down. `browse_topic` returns metadata only. It never returns source text, so it is safe to call on any Disk regardless of visibility. `title` and `summary` are returned as **plain speakable text**: markdown syntax is stripped (link text is kept, the URL dropped) and the hard line breaks that Disk titles carry for card layout are collapsed. Accents and umlauts are left untouched. The same applies to `example_titles` in `list_topics`. A voice agent can read these fields aloud without any cleanup pass. ## `search_knowledge` Semantic search over owned Disk sections. ### Input | Field | Type | Required | Notes | | ------- | ------- | -------- | ----------------------------------------------------------- | | `query` | string | Yes | Search query. The server embeds the first 1,000 characters. | | `limit` | integer | No | Defaults to `5`. Maximum `25`. | ```json theme={null} { "query": "how does spaced repetition work?", "limit": 5 } ``` ### Output The tool returns a JSON array of search hits. ```json theme={null} [ { "disk_public_id": "abc123", "disk_title": "Memory Systems", "section_index": 3, "similarity": 0.91, "key_points": ["Reviews should happen before forgetting"], "redacted": false, "section_text": "..." } ] ``` For redacted hits, use `snippet` instead of `section_text`: ```json theme={null} [ { "disk_public_id": "def456", "disk_title": "Public Learning Notes", "section_index": 2, "similarity": 0.84, "key_points": ["Retrieval strengthens memory"], "redacted": true, "snippet": "..." } ] ``` Search is currently scoped to owned Disks. Saved Disks can be listed with `list_disks` and read with `get_disk`, but semantic search results come from the authenticated user's own indexed sections. ## `get_disk` Read one Disk by UUID or `public_id`. ### Input | Field | Type | Required | Notes | | --------- | ------ | -------- | ----------------------- | | `disk_id` | string | Yes | Disk UUID or public ID. | ```json theme={null} { "disk_id": "abc123" } ``` ### Output The tool returns one Disk object. ```json theme={null} { "public_id": "abc123", "title": "Memory Systems", "summary": "...", "category": "Learning", "word_count": 1240, "visibility": "private", "relationship": "owned", "source_url": "https://example.com/source", "ai_generated": true, "redacted": false, "tags": ["learning", "memory"], "sections": [ { "index": 1, "word_count": 180, "key_points": ["..."], "text": "..." } ], "related_disks": [ { "public_id": "rel789", "title": "Forgetting Curves", "similarity": 0.76 } ], "text": "...", "created_at": "2026-06-06T12:00:00.000Z" } ``` Full `text` and `sections[].text` are conditional: | Access | `redacted` | Source text fields | | ------------------------------------ | ---------- | ------------------------------------------- | | Owner viewing own private Disk | `false` | `text` and `sections[].text` can be present | | Owner viewing own published Disk | `true` | Full source text is omitted | | Active saved Disk from another owner | `true` | Full source text is omitted | If the Disk is not accessible to the API key, the tool returns JSON text like: ```json theme={null} { "error": "not_found", "message": "Disk not found" } ``` ## `list_disks` List Disks available to the authenticated API key. ### Input | Field | Type | Required | Notes | | ---------- | ------- | -------- | ---------------------------------------------------------------------- | | `scope` | string | No | `all`, `owned`, `saved`, `private`, or `published`. Defaults to `all`. | | `category` | string | No | Exact category name. | | `tag` | string | No | Exact tag name. | | `limit` | integer | No | Defaults to `20`. Maximum `100`. | ```json theme={null} { "scope": "all", "limit": 20 } ``` ### Output The tool returns a list response: ```json theme={null} { "scope": "all", "total": 1, "disks": [ { "public_id": "abc123", "title": "Memory Systems", "summary": "...", "category": "Learning", "visibility": "private", "relationship": "owned", "owner_user_id": "8fb1d0c2-08d1-46ef-a2f3-6bf241745e24", "owner_display_name": "SkillDiscs User", "word_count": 1240, "tags": ["learning"], "saved_at": null, "created_at": "2026-06-06T12:00:00.000Z" } ] } ``` Scope behavior: | Scope | Includes | | ----------- | --------------------------------------- | | `all` | Owned Disks plus active saved Disks | | `owned` | Disks created by the authenticated user | | `saved` | Active saved Disks from other owners | | `private` | Owned unpublished Disks | | `published` | Owned published Disks | ## Redaction MCP uses the same redaction policy as the REST API: * Owner-private Disk access can include full source text. * Owner-published and saved Disk access returns redacted, AI-derived fields. * Search hits include either `section_text` or `snippet`. Always check `redacted` before assuming verbatim source text is present. ## Errors Authentication and rate-limit errors are returned by the HTTP endpoint before MCP tool execution. | HTTP status | Error | Meaning | | ----------- | ----------------------- | --------------------------------------- | | `401` | `unauthorized` | Missing or invalid API key | | `403` | `plan_upgrade_required` | MCP access requires Scholar or Pro | | `429` | `rate_limit_exceeded` | Request limit exceeded | | `500` | `internal_error` | Server error or upstream lookup failure | ## Best Practices * Start with `list_topics` when the agent has no idea what the library contains — do not guess a search query. * Use `browse_topic` when the user names a subject; use `search_knowledge` when the user asks a question. * Use `get_disk` when the agent already has a Disk UUID or public ID. * Use `list_disks` for inventory questions (counts, what is still private), not for subject exploration. * For voice agents: `list_topics` → `browse_topic` are the two calls cheap enough to run inside a spoken turn. Defer `search_knowledge` until the user has picked a Disk or asked a real question. * Treat all returned content as user-scoped and private to the API key holder. * Check `redacted` and prefer `section_text ?? snippet` in agent prompts. # Search Knowledge Source: https://docs.skilldiscs.com/api-reference/search POST /api/v1/search Semantic search across every section of every owned Disk. Returns the top-K matching sections ranked by vector similarity over Gemini embeddings. Current production search is scoped to **owned Disks only**. Search responses follow the same redaction policy as Disk reads. Owner-private hits include `section_text`; redacted hits include `snippet`. ## Request Natural language query. Trimmed to the first 1000 characters before embedding. Maximum number of section hits returned. Capped at 25. ### Example ```bash theme={null} curl -X POST https://skilldiscs.com/api/v1/search \ -H "Authorization: Bearer sk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"query": "how does diffusion work in transformers", "limit": 5}' ``` ## Response Each hit references a single section inside one of your Disks. Short URL-safe ID of the parent Disk. Title of the parent Disk. Zero-based section position within the Disk. Full matched section text. Present only when `redacted` is `false`. Bounded excerpt around the match. Present only when `redacted` is `true`. AI-extracted key points for the matched section. Whether verbatim section text was withheld. Cosine similarity score, `0.0`–`1.0`. ```json theme={null} { "results": [ { "disk_public_id": "abc123", "disk_title": "Attention Is All You Need — Annotated", "section_index": 4, "snippet": "Self-attention computes a weighted sum...", "key_points": ["Self-attention lets each token attend to every other token."], "redacted": true, "similarity": 0.91 } ] } ``` For an owner-private Disk, the same hit shape uses `section_text`: ```json theme={null} { "results": [ { "disk_public_id": "abc123", "disk_title": "Private Research Notes", "section_index": 1, "section_text": "Self-attention computes a weighted sum...", "key_points": ["Self-attention combines token representations by learned relevance."], "redacted": false, "similarity": 0.91 } ] } ``` ## Errors | Status | Code | Meaning | | ------ | ---------------------------------- | ----------------------- | | `400` | — | Missing `query` field | | `401` | `unauthorized` | Bad / missing API key | | `429` | `rate_limit_exceeded` | >100 req/min | | `500` | `search_failed` / `internal_error` | Embedding or RPC failed | # Authentication Source: https://docs.skilldiscs.com/authentication Bearer token authentication via API keys. SkillDiscs uses **bearer-token authentication**. Every request must include your API key in the `Authorization` header. ```http theme={null} Authorization: Bearer sk_your_key_here ``` ## Generating keys Keys live under [Settings → API Keys](https://skilldiscs.com/settings). * Click **Generate**, give the key a memorable name. * The full `sk_...` token is shown **once** at creation. * Only the **prefix** (`sk_a3f9...`) is stored after that — you cannot retrieve a lost key. ## Scope A key is bound to the user who created it. Current production behavior: * `POST /search` searches **owned Disks only**. * `GET /disks` can list owned and active-saved Disks with `scope`. * `GET /disks/{id}` can read an owned Disk, or an active-saved Disk when the key owner has saved it. * `POST /disks/batch` is owned-only. Verbatim source text is only returned for owner-private Disks. Published or saved Disks return redacted shapes with summaries, key points, metadata, and short snippets where available. ## Rotation To rotate: 1. Generate a new key. 2. Update your client / agent / `.env` with the new value. 3. Delete the old key from Settings. There is no overlap window enforced — rotate as fast or slow as your deploys allow. ## Errors | Status | `error` code | Cause | | ------ | ----------------------- | --------------------------------------------------------------- | | `401` | `unauthorized` | Missing header, malformed token, deleted key | | `403` | `plan_upgrade_required` | Key belongs to an account without Scholar or Pro API/MCP access | | `429` | `rate_limit_exceeded` | >100 req/min on the same key | | `500` | `internal_error` | Server-side issue — retry with backoff | 429 responses include `retry_after` (seconds) in the JSON body. # Errors Source: https://docs.skilldiscs.com/guides/errors Error codes, meanings, recovery. ## Error envelope All non-2xx responses follow: ```json theme={null} { "error": "machine_readable_code", "message": "Optional human description", "retry_after": 42 } ``` `retry_after` only appears on `429`. ## Codes | HTTP | `error` | When | What to do | | ----- | ----------------------- | -------------------------------------------------- | ---------------------------------------------------- | | `400` | — | Required field missing | Fix request body | | `400` | `bad_request` | Malformed payload | Validate against schema | | `400` | `batch_too_large` | `ids.length > 10` | Split into multiple calls | | `401` | `unauthorized` | No header, malformed token, deleted key | Regenerate key in Settings | | `403` | `plan_upgrade_required` | External API or MCP access requires Scholar or Pro | Upgrade the account or use an eligible key | | `404` | `not_found` | Disk does not exist or is not readable by this key | Confirm `public_id` and library relationship | | `405` | — | Wrong HTTP method | Use the documented verb | | `429` | `rate_limit_exceeded` | >100 req/min | Wait `retry_after` seconds, retry with jitter | | `500` | `internal_error` | Unhandled server error | Retry with exponential backoff; report if persistent | | `500` | `search_failed` | Embedding service or pgvector RPC failed | Retry; report if reproducible | ## Idempotency All four endpoints are **safe to retry**. Reads are idempotent by definition; no endpoint mutates state. # LLM Agent Integration Source: https://docs.skilldiscs.com/guides/llm-agents Wire SkillDiscs into Claude, GPT, or any tool-using agent. SkillDiscs exposes REST endpoints that map cleanly onto LLM tool definitions. This guide shows the minimal tool surface for retrieval-augmented agents. ## Recommended tool surface Three tools cover \~95% of agent use cases: 1. **`search_knowledge`** → `POST /api/v1/search` 2. **`read_disk`** → `GET /api/v1/disks/{id}` 3. **`list_disks`** → `GET /api/v1/disks?scope=…&category=…&tag=…` (browsing) Skip `batch` unless you measure round-trip latency as a bottleneck. ## Anthropic / Claude tool definition ```json theme={null} { "name": "search_knowledge", "description": "Search the user's personal knowledge base (their imported articles, videos, PDFs) by natural-language query. Returns the most relevant section excerpts.", "input_schema": { "type": "object", "properties": { "query": { "type": "string", "description": "Natural-language search query" }, "limit": { "type": "integer", "default": 5, "maximum": 25 } }, "required": ["query"] } } ``` In your tool handler, forward to: ```javascript theme={null} const r = await fetch('https://skilldiscs.com/api/v1/search', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.SKILLDISCS_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify(input), }) return await r.json() ``` When building context for the model, use `section_text` when present and fall back to `snippet`: ```javascript theme={null} const { results } = await r.json() const context = results.map(hit => ({ title: hit.disk_title, text: hit.section_text ?? hit.snippet, key_points: hit.key_points ?? [], redacted: hit.redacted, })) ``` ## OpenAI / GPT function calling Same JSON Schema, register under `tools` with `type: "function"`. Forward to the same endpoint. ## Prompt template ``` You have access to the user's personal knowledge base via three tools: - search_knowledge(query, limit) — semantic search across owned Disks - read_disk(id) — metadata, key points, and conditional text for one Disk - list_disks(scope?, category?, tag?) — browse the library Always cite the Disk title when referencing retrieved content. Prefer search_knowledge over read_disk unless the user names a specific Disk. If a result is redacted, treat snippet/key_points as context and do not imply access to the full source. ``` ## Gotchas * **Never embed the API key in a client-side bundle.** Always proxy through your backend. * Search is **per-user and owned-Disk scoped** in current production. * Check `redacted`. Full source text is only returned for owner-private Disks. * Embeddings are computed at import time; newly imported Disks are searchable within seconds. # Rate Limits Source: https://docs.skilldiscs.com/guides/rate-limits How requests are throttled and how to back off. ## Limits | Limit | Value | | ----------------------- | -------------------------------------- | | Requests / minute / key | **100** | | Batch size | **10 ids** per `/disks/batch` call | | Search query length | First **1000 characters** are embedded | | Search result count | Up to **25** sections | | List page size | Up to **100** disks | ## Detecting throttling A throttled request returns HTTP `429` with body: ```json theme={null} { "error": "rate_limit_exceeded", "retry_after": 42 } ``` `retry_after` is in **seconds**. Wait that long, then retry. ## Backoff strategy ```javascript theme={null} async function fetchWithBackoff(url, opts, attempt = 0) { const r = await fetch(url, opts) if (r.status !== 429) return r const { retry_after = 60 } = await r.json().catch(() => ({})) if (attempt >= 3) throw new Error('rate_limited') const wait = (retry_after + Math.random() * 5) * 1000 await new Promise(res => setTimeout(res, wait)) return fetchWithBackoff(url, opts, attempt + 1) } ``` Add jitter to avoid thundering-herd retries from parallel agents sharing one key. ## Need higher limits? Mention your use case at [skilldiscs.com/settings](https://skilldiscs.com/settings) — limits are per-account and adjustable on request for production agents. # SkillDiscs API Source: https://docs.skilldiscs.com/index Turn your SkillDiscs library into a knowledge base for LLM agents. The SkillDiscs API gives LLM agents and your own tools secure, read-only access to the Disks in your SkillDiscs library — your distilled YouTube videos, PDFs, articles, and notes. Make your first authenticated request in under 2 minutes. Generate keys, scope access, rotate safely. Semantic search across your owned Disks. Connect Claude, Claude Code, and other MCP clients to your SkillDiscs library. Wire SkillDiscs into Claude, GPT, or your custom agent. ## What you can do * **Search** owned Disks with natural language. * **List** owned and active-saved Disks, filter by scope, category, or tag. * **Read** a single Disk including its sections and key points. * **Batch** retrieve up to 10 Disks in a single call. * **Connect MCP clients** to the same read-only knowledge tools at `https://skilldiscs.com/api/mcp`. Verbatim source text is conditional. Owner-private Disks can return full `text` and `sections[].text`; published or saved Disks return redacted, AI-derived fields and short snippets instead. ## Base URL ``` https://skilldiscs.com/api/v1 ``` ## Authentication All endpoints require an API key: ```http theme={null} Authorization: Bearer sk_your_key_here ``` Generate keys in [Settings → API Keys](https://skilldiscs.com/settings). ## Rate limits * **100 requests / minute** per key * **10 IDs max** per batch request # Quickstart Source: https://docs.skilldiscs.com/quickstart First authenticated request in under 2 minutes. ## 1. Generate an API key 1. Open [Settings](https://skilldiscs.com/settings). 2. Scroll to **API Keys**. 3. Name your key (e.g. `claude-agent`) → **Generate**. 4. Copy the `sk_...` value — it is shown **once**. Treat your API key like a password. Anyone holding it can read API-visible data from your SkillDiscs library. Rotate immediately if leaked. ## 2. Make your first request Search your library for "quantum physics": ```bash curl theme={null} curl -X POST https://skilldiscs.com/api/v1/search \ -H "Authorization: Bearer sk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"query": "quantum physics", "limit": 5}' ``` ```javascript node theme={null} const res = await fetch('https://skilldiscs.com/api/v1/search', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.SKILLDISCS_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ query: 'quantum physics', limit: 5 }), }) const { results } = await res.json() console.log(results) ``` ```python python theme={null} import os, requests r = requests.post( "https://skilldiscs.com/api/v1/search", headers={"Authorization": f"Bearer {os.environ['SKILLDISCS_API_KEY']}"}, json={"query": "quantum physics", "limit": 5}, ) print(r.json()) ``` ### Response ```json theme={null} { "results": [ { "disk_public_id": "abc123", "disk_title": "Feynman on Quantum Mechanics", "section_index": 2, "snippet": "...probability amplitudes interfere...", "key_points": ["Probability amplitudes can reinforce or cancel each other."], "redacted": true, "similarity": 0.87 } ] } ``` If `redacted` is `false`, the hit includes `section_text` instead of `snippet`. ## 3. Read a Disk Pass the `disk_public_id` from search to fetch the Disk: ```bash theme={null} curl https://skilldiscs.com/api/v1/disks/abc123 \ -H "Authorization: Bearer sk_your_key_here" ``` Owner-private Disks include full `text` and section text. Published or saved Disks return the same Disk metadata with `redacted: true` and no verbatim source text. ## 4. Next steps Connect to Claude, GPT, or custom agents. Every endpoint, parameter, response.