curl --request POST \ --url "https://api.nixflex.com/v1/agents/$(node -p 'encodeURIComponent(process.env.NXF_AGENT_ID)')/knowledge-base/source-measure" \ --header "Authorization: Bearer $NIXFLEX_API_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"Appointments are available Monday to Friday."}'
import Nixflex from 'nixflex';const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});const result = await c.knowledge.measureSource(process.env.NXF_AGENT_ID, {"text":"Appointments are available Monday to Friday."});// Keep knowledge and private results out of logs.
import osfrom nixflex import Nixflexwith Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c: result = c.knowledge.measure_source(os.environ["NXF_AGENT_ID"], { "text": "Appointments are available Monday to Friday." }) # Keep knowledge and private results out of logs.
# Save the JSON below privately as request-69.json.nixflex knowledge measureSource "$env:NXF_AGENT_ID" --body '@request-69.json' --confirm --json --base-url "https://api.nixflex.com"
Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.
POST
/
agents
/
{target}
/
knowledge-base
/
source-measure
curl --request POST \ --url "https://api.nixflex.com/v1/agents/$(node -p 'encodeURIComponent(process.env.NXF_AGENT_ID)')/knowledge-base/source-measure" \ --header "Authorization: Bearer $NIXFLEX_API_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"Appointments are available Monday to Friday."}'
import Nixflex from 'nixflex';const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});const result = await c.knowledge.measureSource(process.env.NXF_AGENT_ID, {"text":"Appointments are available Monday to Friday."});// Keep knowledge and private results out of logs.
import osfrom nixflex import Nixflexwith Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c: result = c.knowledge.measure_source(os.environ["NXF_AGENT_ID"], { "text": "Appointments are available Monday to Friday." }) # Keep knowledge and private results out of logs.
# Save the JSON below privately as request-69.json.nixflex knowledge measureSource "$env:NXF_AGENT_ID" --body '@request-69.json' --confirm --json --base-url "https://api.nixflex.com"
FIXED · agent One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.NOT OFFERED → do this instead · number Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.YOU CAN CHANGE · source Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.SCOPE · agent Review knowledge drafts and publish approved material. Limits per base: sources 50 · kbTokens 100,000 · topics 1,000.Read the compact AI rulesPreview source token usage before an import without storing the source.
Method: POST ·
Success: 200 ·
Scope: Owning account
The important part
Measure the proposed source before importing it.
Measurement does not publish text or reserve quota for a later import.
Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.
Request fields
Field
Type
Required
Default
Limits and meaning
target (path)
string
Yes
None
Owned agent ID. URL-encode it as a path segment.
X-Filename (header)
string
No
Omitted
Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file. Maximum 200 characters.
X-Source-Title (header)
string
No
Omitted
Optional source title, at most 200 characters; defaults to filename. Maximum 200 characters.
X-Review (header)
string
No
Omitted
For imports: exactly true requests review; other/omitted values mean false for API requests.
Send a JSON object.
Field
Type
Required
Default
Limits and meaning
text
string
Yes
None
Text up to 10 MiB of UTF-8 bytes. Empty input returns allowed:false.
This authenticated POST is a read-only calculation and needs no Idempotency-Key. It does not reserve capacity, call a paid model or save a file/base. Import checks totals again.Raw upload: Content-Type application/octet-stream, X-Filename, optional X-Source-Title and X-Review; replacements also require X-Expected-Revision. File maximum 10 MiB; PDF maximum 200 pages. Accept clean UTF-8 text, PDF with selectable text, or DOCX. No raw base64/path input, RTF, executable or active-content documents. Preview scan status is not publication clearance. Without a configured scanner, local_checks_only permits bounded local checks. With a configured scanner, PDF/DOCX need a clean result; clean UTF-8 text can use local checks during an outage. Infected files never bypass. Imports may wait at safety_check/safety_waiting with next_retry_at; after 24 hours scan_expired requires a new upload. Raw files are private and never downloaded; accepted storage retains extracted text.
Response fields
200 OK returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (accepted is not confirmed).
These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in NIXFLEX_API_KEY and the owned path identifiers shown below in environment variables. Submit this calculation deliberately.
request-69.json
{ "text": "Appointments are available Monday to Friday."}
curl --request POST \ --url "https://api.nixflex.com/v1/agents/$(node -p 'encodeURIComponent(process.env.NXF_AGENT_ID)')/knowledge-base/source-measure" \ --header "Authorization: Bearer $NIXFLEX_API_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"Appointments are available Monday to Friday."}'
import Nixflex from 'nixflex';const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});const result = await c.knowledge.measureSource(process.env.NXF_AGENT_ID, {"text":"Appointments are available Monday to Friday."});// Keep knowledge and private results out of logs.
import osfrom nixflex import Nixflexwith Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c: result = c.knowledge.measure_source(os.environ["NXF_AGENT_ID"], { "text": "Appointments are available Monday to Friday." }) # Keep knowledge and private results out of logs.
# Save the JSON below privately as request-69.json.nixflex knowledge measureSource "$env:NXF_AGENT_ID" --body '@request-69.json' --confirm --json --base-url "https://api.nixflex.com"
Failures use error.type, error.code, error.message, error.doc_url and optional error.details. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state failed and error; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.
This is a read or calculation. GET requests may retry transient connection failures once with bounded backoff; respect Retry-After. Do not retry invalid input or ownership errors unchanged. POST calculations are not automatically retried.
KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.
Headers
X-Filename
string
Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file.
Maximum string length: 200
X-Source-Title
string
Optional source title, at most 200 characters; defaults to filename.
Maximum string length: 200
X-Review
string
For imports: exactly true requests review; other/omitted values mean false for API requests.
Path Parameters
target
string
required
Owned agent ID. URL-encode it as a path segment.
Body
application/jsonapplication/octet-stream
text
string
required
Text up to 10 MiB of UTF-8 bytes. Empty input returns allowed:false.
Response
Successful response.
tokens
integer
required
limit
integer
required
used
integer
required
total_limit
integer
required
projected
integer
required
allowed
boolean
required
scan_status
enum<string>
required
Available options:
checked,
local_checks_only,
text_checks_only,
pending,
not_needed
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Nixflex","description":"Build Nixflex voice agents and connect calls, SMS, knowledge, and business workflows with practical guides and the public API reference.","colors":{"primary":"#25D366","light":"#25D366","dark":"#1da851"},"logo":{"light":"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/logo/light.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=7497b7278ff8d360bbdd0c55c90c5f05","dark":"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/logo/dark.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=4581449b087c9ebbede8ed0ee1be1b6e"},"favicon":"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/favicon.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=e087521a364db0044fc82335cc95f3eb","navbar":{"links":[{"href":"mailto:support@nixflex.com","label":"Support"},{"href":"https://dashboard.nixflex.com/login","label":"Dashboard"}],"primary":{"type":"button","label":"Sign up","href":"https://dashboard.nixflex.com/login"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Nixflex","twitter:card":"summary_large_image","canonical":"https://docs.nixflex.com"},"indexing":"all"},"styling":{"codeblocks":"dark","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode","download-spec"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nixflec","hasAudioNarration":false,"actualSubdomain":"nixflec","customDomains":["docs.nixflex.com"],"gitSource":{"type":"github","owner":"nixflex","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10e9a29ffae5051c414bec"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b0c24b93f7540bc94fd0b6c","clientVersion":"0.0.4448","searchFilterCounts":[{"language":"default","tag":"API reference","count":164},{"language":"default","tag":"Developer guide","count":100},{"language":"default","tag":"Business guide","count":72},{"language":"default","tag":"Knowledge","count":51},{"language":"default","tag":"Integrations","count":45},{"language":"default","tag":"Calls","count":28},{"language":"default","tag":"SMS","count":24},{"language":"default","tag":"Account","count":22},{"language":"default","tag":"Agents","count":17},{"language":"default","tag":"Voice campaigns","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":":root{--nxf-green:#25d366;--nxf-green-ink:#0f7a40;--nxf-green-soft:#e8fbf0;--nxf-ink:#0f1720;--nxf-muted:#4b5563;--nxf-line:#e6e8ec;--nxf-soft:#f7f8fa}:root:not(.dark) #navigation-items a.text-primary,:root:not(.dark) #table-of-contents-content a.text-primary,:root:not(.dark) #header .eyebrow{color:var(--nxf-green-ink)}.nxf-audience{margin:1rem 0 1.4rem;font-size:.875rem;line-height:1.6;color:var(--nxf-muted)}.nxf-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.65rem;margin:1.25rem 0 1.5rem}.nxf-facts>div{min-width:0;background:var(--nxf-soft);border:1px solid transparent;border-radius:12px;padding:.8rem .95rem}.nxf-facts small{display:block;color:var(--nxf-muted);font-size:.75rem;line-height:1.5;margin-bottom:.3rem}.nxf-facts strong{display:block;color:var(--nxf-ink);font-size:.94rem;font-weight:600;line-height:1.45;overflow-wrap:anywhere}.nxf-sep{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.nxf-important{border:1px solid #bdefd2;background:var(--nxf-green-soft);color:var(--nxf-ink);border-radius:14px;padding:1rem 1.25rem;margin:1.5rem 0 2rem}.nxf-important>p:first-child{margin-top:0;color:var(--nxf-green-ink);font-size:.9rem}.nxf-important>span:first-child{display:block;color:var(--nxf-green-ink);font-size:.9rem}.nxf-important>span:first-child strong{color:inherit}.nxf-important>p:last-child,.nxf-important>ul:last-child{margin-bottom:0}.nxf-important ul{padding-left:1.25rem;margin-top:.5rem}.nxf-important li{margin:.3rem 0}.nxf-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:.6rem;margin:1.25rem 0}.nxf-flow>div{border:1px solid var(--nxf-line);border-radius:12px;padding:.8rem;font-size:.875rem;line-height:1.55}.nxf-flow strong{display:block;color:var(--nxf-green-ink);margin-bottom:.25rem}.nxf-conversation{background:var(--nxf-soft);border:1px solid var(--nxf-line);border-radius:14px;padding:1rem;margin:1.25rem 0}.nxf-conversation p{margin:.6rem 0;line-height:1.6}.nxf-conversation p:first-child{margin-top:0}.nxf-conversation p:last-child{margin-bottom:0}.dark{--nxf-ink:#eef2f6;--nxf-muted:#bbc4ce;--nxf-line:#34404b;--nxf-soft:#1b222b;--nxf-green-ink:#75eaa2;--nxf-green-soft:#102c20}.dark .nxf-important{border-color:#28583d}.dark .nxf-facts>div{border-color:var(--nxf-line)}@media (max-width:760px){.nxf-facts,.nxf-flow{grid-template-columns:repeat(2,minmax(0,1fr))}.nxf-important{padding:.9rem 1rem}}@media (max-width:380px){.nxf-facts,.nxf-flow{grid-template-columns:minmax(0,1fr)}}"}]}
{"page":{"pagePath":"api-reference/knowledge/post-agents-target-knowledge-base-source-measure","slug":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure","pageMetadata":{"title":"Measure knowledge source","sidebarTitle":"Measure source","description":"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/source-measure","playground":"simple","canonical":"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure","href":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`FIXED · agent`}),` One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`NOT OFFERED → do this instead · number`}),` Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`YOU CAN CHANGE · source`}),` Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`SCOPE · agent`}),` Review knowledge drafts and publish approved material. Limits per base: `,_jsx(_components.code,{children:`sources`}),` 50 · `,_jsx(_components.code,{children:`kbTokens`}),` 100,000 · `,_jsx(_components.code,{children:`topics`}),` 1,000.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://docs.nixflex.com/ai-rules.md#knowledge`,children:`Read the compact AI rules`})}),`\n`,_jsx(_components.p,{children:`Preview source token usage before an import without storing the source.`}),`\n`,_jsxs(`div`,{className:`nxf-facts`,children:[_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Method`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`POST`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Success`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`200`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Scope`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`Owning account`})]})]}),`\n`,_jsxs(`div`,{className:`nxf-important`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`The important part`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Measure the proposed source before importing it.`}),`\n`,_jsx(_components.li,{children:`Measurement does not publish text or reserve quota for a later import.`}),`\n`]})]}),`\n`,_jsx(`div`,{className:`nxf-audience`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/guides/business/knowledge`,children:`Business guide`}),` · `,_jsx(_components.a,{href:`/guides/developer/knowledge`,children:`Developer guide`}),` · `,_jsx(_components.a,{href:`/guides/glossary`,children:`Glossary`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.`}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`target`}),` (path)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Owned agent ID. URL-encode it as a path segment.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Filename`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Source-Title`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Optional source title, at most 200 characters; defaults to filename. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Review`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`For imports: exactly true requests review; other/omitted values mean false for API requests.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Send a JSON object.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Text up to 10 MiB of UTF-8 bytes. Empty input returns allowed:false.`})]})})]}),`\n`,_jsx(_components.p,{children:`This authenticated POST is a read-only calculation and needs no Idempotency-Key. It does not reserve capacity, call a paid model or save a file/base. Import checks totals again.`}),`\n`,_jsx(_components.p,{children:`Raw upload: Content-Type application/octet-stream, X-Filename, optional X-Source-Title and X-Review; replacements also require X-Expected-Revision. File maximum 10 MiB; PDF maximum 200 pages. Accept clean UTF-8 text, PDF with selectable text, or DOCX. No raw base64/path input, RTF, executable or active-content documents. Preview scan status is not publication clearance. Without a configured scanner, local_checks_only permits bounded local checks. With a configured scanner, PDF/DOCX need a clean result; clean UTF-8 text can use local checks during an outage. Infected files never bypass. Imports may wait at safety_check/safety_waiting with next_retry_at; after 24 hours scan_expired requires a new upload. Raw files are private and never downloaded; accepted storage retains extracted text.`}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (`,_jsx(_components.a,{href:`/guides/glossary#saved-accepted-and-confirmed`,children:`accepted is not confirmed`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`limit`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`Value: `,_jsx(_components.code,{children:`20000`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`used`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_limit`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`Value: `,_jsx(_components.code,{children:`100000`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`projected`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`allowed`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scan_status`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Allowed: `,_jsx(_components.code,{children:`\"checked\"`}),`, `,_jsx(_components.code,{children:`\"local_checks_only\"`}),`, `,_jsx(_components.code,{children:`\"text_checks_only\"`}),`, `,_jsx(_components.code,{children:`\"pending\"`}),`, `,_jsx(_components.code,{children:`\"not_needed\"`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(_components.p,{children:[`These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in `,_jsx(_components.code,{children:`NIXFLEX_API_KEY`}),` and the owned path identifiers shown below in environment variables. Submit this calculation deliberately.`]}),`\n`,_jsx(CodeBlock,{filename:`request-69.json`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday to Friday.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,`\n`,_jsx(_components.p,{children:`MCP has 97 registered tools, including 19 Knowledge tools. This example uses a registered tool; configure its credentials and permissions separately.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example response`}),`\n`,_jsx(_components.p,{children:`Illustrative response; identifiers are placeholders and optional fields can be absent.`}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Failures use `,_jsx(_components.code,{children:`error.type`}),`, `,_jsx(_components.code,{children:`error.code`}),`, `,_jsx(_components.code,{children:`error.message`}),`, `,_jsx(_components.code,{children:`error.doc_url`}),` and optional `,_jsx(_components.code,{children:`error.details`}),`. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state `,_jsx(_components.code,{children:`failed`}),` and `,_jsx(_components.code,{children:`error`}),`; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.`]}),`\n`,_jsx(`div`,{className:`agent-error-table`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_input`,children:_jsx(_components.code,{children:`invalid_input`})})}),_jsx(_components.td,{children:`Check the information and try again.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#not_found`,children:_jsx(_components.code,{children:`not_found`})})}),_jsx(_components.td,{children:`That topic is not available.`}),_jsx(_components.td,{children:`Check the owned identifier and feature availability.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#deleting`,children:_jsx(_components.code,{children:`deleting`})})}),_jsx(_components.td,{children:`This knowledge base is being deleted.`}),_jsx(_components.td,{children:`Read current state and resolve the conflict before sending a new request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unavailable`,children:_jsx(_components.code,{children:`unavailable`})})}),_jsx(_components.td,{children:`Knowledge is unavailable right now. Your saved information is safe. Try again.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_unconfigured`,children:_jsx(_components.code,{children:`knowledge_unconfigured`})})}),_jsx(_components.td,{children:`Knowledge is not available yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_not_released`,children:_jsx(_components.code,{children:`knowledge_not_released`})})}),_jsx(_components.td,{children:`Knowledge is not released yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#permission_denied`,children:_jsx(_components.code,{children:`permission_denied`})})}),_jsx(_components.td,{children:`Your personal role does not allow this action.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#membership_revoked`,children:_jsx(_components.code,{children:`membership_revoked`})})}),_jsx(_components.td,{children:`Your membership has ended.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unauthorized`,children:_jsx(_components.code,{children:`unauthorized`})})}),_jsx(_components.td,{children:`The credential is missing or invalid.`}),_jsx(_components.td,{children:`Check the full account credential.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#rate_limit_exceeded`,children:_jsx(_components.code,{children:`rate_limit_exceeded`})})}),_jsx(_components.td,{children:`The account request limit was reached.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#measure_busy`,children:_jsx(_components.code,{children:`measure_busy`})})}),_jsx(_components.td,{children:`Other files are being checked. Please try again in a moment.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#measure_unavailable`,children:_jsx(_components.code,{children:`measure_unavailable`})})}),_jsx(_components.td,{children:`Counting took too long. Try a smaller source or try again.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#source_limit`,children:_jsx(_components.code,{children:`source_limit`})})}),_jsx(_components.td,{children:`This source contains too much text. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body could not be read.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#wrong_type`,children:_jsx(_components.code,{children:`wrong_type`})})}),_jsx(_components.td,{children:`The file contents do not match its type. Use a genuine PDF, DOCX or plain UTF-8 text file.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsupported_file`,children:_jsx(_components.code,{children:`unsupported_file`})})}),_jsx(_components.td,{children:`Use PDF, DOCX or plain UTF-8 text. Rich text and executable files are not accepted.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#empty_file`,children:_jsx(_components.code,{children:`empty_file`})})}),_jsx(_components.td,{children:`This file is empty. Choose a file containing text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#file_limit`,children:_jsx(_components.code,{children:`file_limit`})})}),_jsx(_components.td,{children:`This file is too big. Choose a file up to 10 MiB.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unclean_text`,children:_jsx(_components.code,{children:`unclean_text`})})}),_jsx(_components.td,{children:`This file is not clean UTF-8 text. Save it as UTF-8 without binary data or hidden control characters.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_file`,children:_jsx(_components.code,{children:`unsafe_file`})})}),_jsx(_components.td,{children:`This file failed the virus safety check. Use a clean copy or paste clean text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_pdf`,children:_jsx(_components.code,{children:`unsafe_pdf`})})}),_jsx(_components.td,{children:`This PDF contains scripts, actions or embedded files. Export a clean text-only PDF or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#password_pdf`,children:_jsx(_components.code,{children:`password_pdf`})})}),_jsx(_components.td,{children:`This PDF is password protected. Remove the password from a copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scanned_pdf`,children:_jsx(_components.code,{children:`scanned_pdf`})})}),_jsx(_components.td,{children:`This PDF has a page with no readable text. Use a text PDF, convert the scanned pages to text, or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#page_limit`,children:_jsx(_components.code,{children:`page_limit`})})}),_jsx(_components.td,{children:`This PDF has more than 200 pages. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#archive_limit`,children:_jsx(_components.code,{children:`archive_limit`})})}),_jsx(_components.td,{children:`This Word document expands beyond the safe size limit. Save a smaller DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unreadable`,children:_jsx(_components.code,{children:`unreadable`})})}),_jsx(_components.td,{children:`This file is damaged or could not be read safely. Save a new copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#parse_timeout`,children:_jsx(_components.code,{children:`parse_timeout`})})}),_jsx(_components.td,{children:`Reading this file took too long. Try a smaller document or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scan_unavailable`,children:_jsx(_components.code,{children:`scan_unavailable`})})}),_jsx(_components.td,{children:`Safety check in progress. We will retry automatically.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Use a clean DOCX or paste clean text.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body is too large.`}),_jsx(_components.td,{children:`Keep the transport body within 10 MiB.`})]})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`retry-and-idempotency`,children:`Retry and idempotency`}),`\n`,_jsx(_components.p,{children:`This is a read or calculation. GET requests may retry transient connection failures once with bounded backoff; respect Retry-After. Do not retry invalid input or ownership errors unchanged. POST calculations are not automatically retried.`}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-capabilities`,children:`Get knowledge capabilities`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-targets`,children:`List knowledge agents`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/errors#error-envelope`,children:`Errors and recovery`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Measure knowledge source","sidebarTitle":"Measure source","description":"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/source-measure","playground":"simple","canonical":"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure","href":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,RequestExample,ResponseExample,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`FIXED · agent`}),` One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`NOT OFFERED → do this instead · number`}),` Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`YOU CAN CHANGE · source`}),` Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`SCOPE · agent`}),` Review knowledge drafts and publish approved material. Limits per base: `,_jsx(_components.code,{children:`sources`}),` 50 · `,_jsx(_components.code,{children:`kbTokens`}),` 100,000 · `,_jsx(_components.code,{children:`topics`}),` 1,000.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://docs.nixflex.com/ai-rules.md#knowledge`,children:`Read the compact AI rules`})}),`\n`,_jsx(_components.p,{children:`Preview source token usage before an import without storing the source.`}),`\n`,_jsxs(`div`,{className:`nxf-facts`,children:[_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Method`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`POST`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Success`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`200`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Scope`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`Owning account`})]})]}),`\n`,_jsxs(`div`,{className:`nxf-important`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`The important part`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Measure the proposed source before importing it.`}),`\n`,_jsx(_components.li,{children:`Measurement does not publish text or reserve quota for a later import.`}),`\n`]})]}),`\n`,_jsx(`div`,{className:`nxf-audience`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/guides/business/knowledge`,children:`Business guide`}),` · `,_jsx(_components.a,{href:`/guides/developer/knowledge`,children:`Developer guide`}),` · `,_jsx(_components.a,{href:`/guides/glossary`,children:`Glossary`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.`}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`target`}),` (path)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Owned agent ID. URL-encode it as a path segment.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Filename`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Source-Title`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Optional source title, at most 200 characters; defaults to filename. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Review`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`For imports: exactly true requests review; other/omitted values mean false for API requests.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Send a JSON object.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Text up to 10 MiB of UTF-8 bytes. Empty input returns allowed:false.`})]})})]}),`\n`,_jsx(_components.p,{children:`This authenticated POST is a read-only calculation and needs no Idempotency-Key. It does not reserve capacity, call a paid model or save a file/base. Import checks totals again.`}),`\n`,_jsx(_components.p,{children:`Raw upload: Content-Type application/octet-stream, X-Filename, optional X-Source-Title and X-Review; replacements also require X-Expected-Revision. File maximum 10 MiB; PDF maximum 200 pages. Accept clean UTF-8 text, PDF with selectable text, or DOCX. No raw base64/path input, RTF, executable or active-content documents. Preview scan status is not publication clearance. Without a configured scanner, local_checks_only permits bounded local checks. With a configured scanner, PDF/DOCX need a clean result; clean UTF-8 text can use local checks during an outage. Infected files never bypass. Imports may wait at safety_check/safety_waiting with next_retry_at; after 24 hours scan_expired requires a new upload. Raw files are private and never downloaded; accepted storage retains extracted text.`}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (`,_jsx(_components.a,{href:`/guides/glossary#saved-accepted-and-confirmed`,children:`accepted is not confirmed`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`limit`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`Value: `,_jsx(_components.code,{children:`20000`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`used`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_limit`})}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`Value: `,_jsx(_components.code,{children:`100000`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`projected`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`allowed`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scan_status`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Allowed: `,_jsx(_components.code,{children:`\"checked\"`}),`, `,_jsx(_components.code,{children:`\"local_checks_only\"`}),`, `,_jsx(_components.code,{children:`\"text_checks_only\"`}),`, `,_jsx(_components.code,{children:`\"pending\"`}),`, `,_jsx(_components.code,{children:`\"not_needed\"`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(_components.p,{children:[`These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in `,_jsx(_components.code,{children:`NIXFLEX_API_KEY`}),` and the owned path identifiers shown below in environment variables. Submit this calculation deliberately.`]}),`\n`,_jsx(CodeBlock,{filename:`request-69.json`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday to Friday.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL (Bash)`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.nixflex.com/v1/agents/$(`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'encodeURIComponent(process.env.NXF_AGENT_ID)')/knowledge-base/source-measure\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NIXFLEX_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"text\":\"Appointments are available Monday to Friday.\"}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node`,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` Nixflex`}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'nixflex'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` c`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` Nixflex`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`({`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`NIXFLEX_API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`baseUrl:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'https://api.nixflex.com'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`maxRetries:`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` c`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`knowledge`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`measureSource`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`NXF_AGENT_ID`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday to Friday.\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`// Keep knowledge and private results out of logs.`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` nixflex `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Nixflex`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Nixflex(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"NIXFLEX_API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`base_url`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.nixflex.com\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`max_retries`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` c:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` result = c.knowledge.measure_source(os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"NXF_AGENT_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`], {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday to Friday.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # Keep knowledge and private results out of logs.`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`CLI (PowerShell)`,numberOfLines:`2`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Save the JSON below privately as request-69.json.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`nixflex knowledge measureSource `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:NXF_AGENT_ID`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` --body `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'@request-69.json'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` --confirm --json --base-url `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.nixflex.com\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`MCP`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"measure_knowledge_source\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"arguments\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"target/example\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Example source text.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`MCP has 97 registered tools, including 19 Knowledge tools. This example uses a registered tool; configure its credentials and permissions separately.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example response`}),`\n`,_jsx(_components.p,{children:`Illustrative response; identifiers are placeholders and optional fields can be absent.`}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"tokens\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"limit\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`20000`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"used\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_limit\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`100000`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"projected\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"allowed\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"scan_status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"checked\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Failures use `,_jsx(_components.code,{children:`error.type`}),`, `,_jsx(_components.code,{children:`error.code`}),`, `,_jsx(_components.code,{children:`error.message`}),`, `,_jsx(_components.code,{children:`error.doc_url`}),` and optional `,_jsx(_components.code,{children:`error.details`}),`. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state `,_jsx(_components.code,{children:`failed`}),` and `,_jsx(_components.code,{children:`error`}),`; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.`]}),`\n`,_jsx(`div`,{className:`agent-error-table`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_input`,children:_jsx(_components.code,{children:`invalid_input`})})}),_jsx(_components.td,{children:`Check the information and try again.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#not_found`,children:_jsx(_components.code,{children:`not_found`})})}),_jsx(_components.td,{children:`That topic is not available.`}),_jsx(_components.td,{children:`Check the owned identifier and feature availability.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#deleting`,children:_jsx(_components.code,{children:`deleting`})})}),_jsx(_components.td,{children:`This knowledge base is being deleted.`}),_jsx(_components.td,{children:`Read current state and resolve the conflict before sending a new request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unavailable`,children:_jsx(_components.code,{children:`unavailable`})})}),_jsx(_components.td,{children:`Knowledge is unavailable right now. Your saved information is safe. Try again.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_unconfigured`,children:_jsx(_components.code,{children:`knowledge_unconfigured`})})}),_jsx(_components.td,{children:`Knowledge is not available yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_not_released`,children:_jsx(_components.code,{children:`knowledge_not_released`})})}),_jsx(_components.td,{children:`Knowledge is not released yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#permission_denied`,children:_jsx(_components.code,{children:`permission_denied`})})}),_jsx(_components.td,{children:`Your personal role does not allow this action.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#membership_revoked`,children:_jsx(_components.code,{children:`membership_revoked`})})}),_jsx(_components.td,{children:`Your membership has ended.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unauthorized`,children:_jsx(_components.code,{children:`unauthorized`})})}),_jsx(_components.td,{children:`The credential is missing or invalid.`}),_jsx(_components.td,{children:`Check the full account credential.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#rate_limit_exceeded`,children:_jsx(_components.code,{children:`rate_limit_exceeded`})})}),_jsx(_components.td,{children:`The account request limit was reached.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#measure_busy`,children:_jsx(_components.code,{children:`measure_busy`})})}),_jsx(_components.td,{children:`Other files are being checked. Please try again in a moment.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#measure_unavailable`,children:_jsx(_components.code,{children:`measure_unavailable`})})}),_jsx(_components.td,{children:`Counting took too long. Try a smaller source or try again.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#source_limit`,children:_jsx(_components.code,{children:`source_limit`})})}),_jsx(_components.td,{children:`This source contains too much text. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body could not be read.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#wrong_type`,children:_jsx(_components.code,{children:`wrong_type`})})}),_jsx(_components.td,{children:`The file contents do not match its type. Use a genuine PDF, DOCX or plain UTF-8 text file.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsupported_file`,children:_jsx(_components.code,{children:`unsupported_file`})})}),_jsx(_components.td,{children:`Use PDF, DOCX or plain UTF-8 text. Rich text and executable files are not accepted.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#empty_file`,children:_jsx(_components.code,{children:`empty_file`})})}),_jsx(_components.td,{children:`This file is empty. Choose a file containing text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#file_limit`,children:_jsx(_components.code,{children:`file_limit`})})}),_jsx(_components.td,{children:`This file is too big. Choose a file up to 10 MiB.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unclean_text`,children:_jsx(_components.code,{children:`unclean_text`})})}),_jsx(_components.td,{children:`This file is not clean UTF-8 text. Save it as UTF-8 without binary data or hidden control characters.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_file`,children:_jsx(_components.code,{children:`unsafe_file`})})}),_jsx(_components.td,{children:`This file failed the virus safety check. Use a clean copy or paste clean text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_pdf`,children:_jsx(_components.code,{children:`unsafe_pdf`})})}),_jsx(_components.td,{children:`This PDF contains scripts, actions or embedded files. Export a clean text-only PDF or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#password_pdf`,children:_jsx(_components.code,{children:`password_pdf`})})}),_jsx(_components.td,{children:`This PDF is password protected. Remove the password from a copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scanned_pdf`,children:_jsx(_components.code,{children:`scanned_pdf`})})}),_jsx(_components.td,{children:`This PDF has a page with no readable text. Use a text PDF, convert the scanned pages to text, or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#page_limit`,children:_jsx(_components.code,{children:`page_limit`})})}),_jsx(_components.td,{children:`This PDF has more than 200 pages. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#archive_limit`,children:_jsx(_components.code,{children:`archive_limit`})})}),_jsx(_components.td,{children:`This Word document expands beyond the safe size limit. Save a smaller DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unreadable`,children:_jsx(_components.code,{children:`unreadable`})})}),_jsx(_components.td,{children:`This file is damaged or could not be read safely. Save a new copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#parse_timeout`,children:_jsx(_components.code,{children:`parse_timeout`})})}),_jsx(_components.td,{children:`Reading this file took too long. Try a smaller document or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scan_unavailable`,children:_jsx(_components.code,{children:`scan_unavailable`})})}),_jsx(_components.td,{children:`Safety check in progress. We will retry automatically.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Use a clean DOCX or paste clean text.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body is too large.`}),_jsx(_components.td,{children:`Keep the transport body within 10 MiB.`})]})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`retry-and-idempotency`,children:`Retry and idempotency`}),`\n`,_jsx(_components.p,{children:`This is a read or calculation. GET requests may retry transient connection failures once with bounded backoff; respect Retry-After. Do not retry invalid input or ownership errors unchanged. POST calculations are not automatically retried.`}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-capabilities`,children:`Get knowledge capabilities`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-targets`,children:`List knowledge agents`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/errors#error-envelope`,children:`Errors and recovery`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Measure knowledge source","sidebarTitle":"Measure source","description":"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/source-measure","playground":"simple","canonical":"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure","href":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Request fields","slug":"request-fields","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Example response","slug":"example-response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Retry and idempotency","slug":"retry-and-idempotency","depth":2,"children":[]},{"title":"Related endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL (Bash)","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"https://api.nixflex.com/v1/agents/$(\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">node\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -p\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'encodeURIComponent(process.env.NXF_AGENT_ID)')/knowledge-base/source-measure\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$NIXFLEX_API_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --data\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> '{\"text\":\"Appointments are available Monday to Friday.\"}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> Nixflex\u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\"> from\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'nixflex'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> c\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">new\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\"> Nixflex\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">({\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">apiKey:process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">NIXFLEX_API_KEY\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">baseUrl:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'https://api.nixflex.com'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">maxRetries:\u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> result\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> c\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">knowledge\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">measureSource\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">NXF_AGENT_ID\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Appointments are available Monday to Friday.\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\">// Keep knowledge and private results out of logs.\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> nixflex \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> Nixflex\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">with\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> Nixflex(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">api_key\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"NIXFLEX_API_KEY\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">], \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">base_url\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"https://api.nixflex.com\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">max_retries\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">as\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> c:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> result = c.knowledge.measure_source(os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"NXF_AGENT_ID\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">], {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"text\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Appointments are available Monday to Friday.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\"> # Keep knowledge and private results out of logs.\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"CLI (PowerShell)","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"powershell\">\u003ccode language=\"powershell\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\"># Save the JSON below privately as request-69.json.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">nixflex knowledge measureSource \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$env:NXF_AGENT_ID\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> --body \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'@request-69.json'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> --confirm --json --base-url \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"https://api.nixflex.com\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"MCP","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"measure_knowledge_source\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"arguments\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"target\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"target/example\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"text\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Example source text.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"tokens\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"limit\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">20000\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"used\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"total_limit\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">100000\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"projected\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"allowed\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"scan_status\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"checked\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"post_agents_target_knowledge_base_source_measure","tags":["Knowledge"],"summary":"Measure knowledge source","description":"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.","parameters":["54cf89e6-198f-45f7-bfa5-b2f7f4675275","76dab1a1-2ff1-4b47-8705-f788f6561f5a","2bf63aca-b487-483b-9a71-527161a81ca2","1efc45ee-1e4f-4123-99a1-36605c258e51"],"security":["1ae8df15-64ea-4e60-b95b-3d507a0e3461"],"responses":{"200":"05d4b4f1-9d7f-40b5-9da3-03058deae0ea","400":"e7464d1d-cbfd-494c-845a-63eea0f13e7d","401":"e38c318e-0d23-4b56-920e-edd2bd69b530","403":"fb73a042-50e1-48bd-8894-58a26779519a","404":"b87a2d92-428d-4606-b10c-e83aba0afaf5","409":"34595347-42c3-4c1b-b1b7-cfb037b83edd","413":"f3267040-eba7-477b-a52c-71fcd4421148","415":"8a14b8d7-c36b-4a30-8a5f-986ca8658317","422":"0ec7c833-cc75-4170-81ca-5ed020e1d66c","429":"f148e4ef-6f21-49dc-9658-65bdb7db45b4","503":"736a0219-a48a-4b52-a040-9cb6978326f4"},"requestBody":"3480c468-e133-490c-aa6a-c6dec0edebf4","method":"post","type":"path","servers":["d8abe753-3be9-4c16-ad49-2cb82cc9e683"],"path":"/agents/{target}/knowledge-base/source-measure","baseUrlOptions":["https://api.nixflex.com/v1"],"title":"Measure knowledge source","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"5","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --request"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" POST"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --url"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"https://api.nixflex.com/v1/agents/$("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"node"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" -p"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'encodeURIComponent(process.env.NXF_AGENT_ID)')/knowledge-base/source-measure\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$NIXFLEX_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Content-Type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --data"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" '{\"text\":\"Appointments are available Monday to Friday.\"}'"}}]}},"\n"]}}}},"filename":"cURL (Bash)"},{"dropdown":false,"language":"javascript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"javascript","children":{"type":"code","key":null,"ref":null,"props":{"language":"javascript","numberOfLines":"4","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" Nixflex"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":" from"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'nixflex'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":" c"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"new"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":" Nixflex"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"({"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"apiKey:process"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":"NIXFLEX_API_KEY"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"baseUrl:"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'https://api.nixflex.com'"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"maxRetries:"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"});"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":" result"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" c"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"knowledge"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"measureSource"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"process"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":"NXF_AGENT_ID"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", {"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"text\""}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"Appointments are available Monday to Friday.\""}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"});"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":"// Keep knowledge and private results out of logs."}}}},"\n"]}}}},"filename":"Node"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"8","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" os"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" nixflex "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" Nixflex"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"with"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" Nixflex("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"api_key"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"=os.environ["}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"NIXFLEX_API_KEY\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"], "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"base_url"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"https://api.nixflex.com\""}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"max_retries"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":") "}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"as"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" c:"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" result = c.knowledge.measure_source(os.environ["}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"NXF_AGENT_ID\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"], {"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"text\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"Appointments are available Monday to Friday.\""}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" })"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":" # Keep knowledge and private results out of logs."}}}},"\n"]}}}},"filename":"Python"},{"dropdown":false,"language":"powershell","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"powershell","children":{"type":"code","key":null,"ref":null,"props":{"language":"powershell","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":"# Save the JSON below privately as request-69.json."}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"nixflex knowledge measureSource "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$env:NXF_AGENT_ID"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" --body "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'@request-69.json'"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" --confirm --json --base-url "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"https://api.nixflex.com\""}}]}},"\n"]}}}},"filename":"CLI (PowerShell)"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"7","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"name\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"measure_knowledge_source\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"arguments\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"target\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"target/example\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"text\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"Example source text.\""}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"MCP"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"9","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"tokens\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"limit\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"20000"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"used\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"total_limit\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"100000"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"projected\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"allowed\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"scan_status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"checked\""}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"Response"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"54cf89e6-198f-45f7-bfa5-b2f7f4675275":{"name":"target","in":"path","required":true,"schema":{"type":"string","description":"Owned agent ID. URL-encode it as a path segment.","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"76dab1a1-2ff1-4b47-8705-f788f6561f5a":{"name":"X-Filename","in":"header","required":false,"schema":{"type":"string","description":"Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file.","maxLength":200,"isRequired":false,"uniqueKey":"","typeLabel":"string"}},"2bf63aca-b487-483b-9a71-527161a81ca2":{"name":"X-Source-Title","in":"header","required":false,"schema":{"type":"string","description":"Optional source title, at most 200 characters; defaults to filename.","maxLength":200,"isRequired":false,"uniqueKey":"","typeLabel":"string"}},"1efc45ee-1e4f-4123-99a1-36605c258e51":{"name":"X-Review","in":"header","required":false,"schema":{"type":"string","description":"For imports: exactly true requests review; other/omitted values mean false for API requests.","isRequired":false,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text up to 10 MiB of UTF-8 bytes. Empty input returns allowed:false.","isRequired":true,"uniqueKey":"text","typeLabel":"string"}},"required":["text"],"additionalProperties":true,"description":"","uniqueKey":"","typeLabel":"object"},"example":{"text":"Appointments are available Monday to Friday."},"examples":{"Example":{"title":"Example","value":{"text":"Appointments are available Monday to Friday."}}},"exampleType":"examples"},"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"Raw PDF, DOCX or UTF-8 text, at most 10 MiB. Supply X-Filename. Replacement also requires X-Expected-Revision.","uniqueKey":"","typeLabel":"file"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"}},"exampleType":"examples"},"responses":{"05d4b4f1-9d7f-40b5-9da3-03058deae0ea":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"integer","description":"","isRequired":true,"uniqueKey":"tokens","typeLabel":"integer"},"limit":{"type":"integer","description":"","const":20000,"isRequired":true,"uniqueKey":"limit","typeLabel":"integer"},"used":{"type":"integer","description":"","isRequired":true,"uniqueKey":"used","typeLabel":"integer"},"total_limit":{"type":"integer","description":"","const":100000,"isRequired":true,"uniqueKey":"total_limit","typeLabel":"integer"},"projected":{"type":"integer","description":"","isRequired":true,"uniqueKey":"projected","typeLabel":"integer"},"allowed":{"type":"boolean","description":"","isRequired":true,"uniqueKey":"allowed","typeLabel":"boolean"},"scan_status":{"type":"string","description":"","enum":["checked","local_checks_only","text_checks_only","pending","not_needed"],"isRequired":true,"uniqueKey":"scan_status","typeLabel":"enum\u003cstring>"}},"required":["tokens","limit","used","total_limit","projected","allowed","scan_status"],"additionalProperties":true,"description":"","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"tokens":123,"limit":20000,"used":123,"total_limit":100000,"projected":123,"allowed":true,"scan_status":"checked"}}},"exampleType":"generated"}},"exampleType":"generated"},"e7464d1d-cbfd-494c-845a-63eea0f13e7d":{"description":"invalid_input: Check the information and try again. invalid_body: The request body could not be read.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e38c318e-0d23-4b56-920e-edd2bd69b530":{"description":"unauthorized: The credential is missing or invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"fb73a042-50e1-48bd-8894-58a26779519a":{"description":"permission_denied: Your personal role does not allow this action. membership_revoked: Your membership has ended.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"b87a2d92-428d-4606-b10c-e83aba0afaf5":{"description":"not_found: That topic is not available.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"34595347-42c3-4c1b-b1b7-cfb037b83edd":{"description":"deleting: This knowledge base is being deleted.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"f3267040-eba7-477b-a52c-71fcd4421148":{"description":"source_limit: This source contains too much text. Split it into smaller documents. file_limit: This file is too big. Choose a file up to 10 MiB. invalid_body: The request body is too large.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"8a14b8d7-c36b-4a30-8a5f-986ca8658317":{"description":"wrong_type: The file contents do not match its type. Use a genuine PDF, DOCX or plain UTF-8 text file. unsupported_file: Use PDF, DOCX or plain UTF-8 text. Rich text and executable files are not accepted. unsafe_word: This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"0ec7c833-cc75-4170-81ca-5ed020e1d66c":{"description":"empty_file: This file is empty. Choose a file containing text. unclean_text: This file is not clean UTF-8 text. Save it as UTF-8 without binary data or hidden control characters. unsafe_file: This file failed the virus safety check. Use a clean copy or paste clean text. unsafe_pdf: This PDF contains scripts, actions or embedded files. Export a clean text-only PDF or paste the text. unsafe_word: This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text. password_pdf: This PDF is password protected. Remove the password from a copy or paste the text. scanned_pdf: This PDF has a page with no readable text. Use a text PDF, convert the scanned pages to text, or paste the text. page_limit: This PDF has more than 200 pages. Split it into smaller documents. archive_limit: This Word document expands beyond the safe size limit. Save a smaller DOCX or paste the text. unreadable: This file is damaged or could not be read safely. Save a new copy or paste the text. parse_timeout: Reading this file took too long. Try a smaller document or paste the text.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"f148e4ef-6f21-49dc-9658-65bdb7db45b4":{"description":"rate_limit_exceeded: The account request limit was reached. measure_busy: Other files are being checked. Please try again in a moment.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"736a0219-a48a-4b52-a040-9cb6978326f4":{"description":"unavailable: Knowledge is unavailable right now. Your saved information is safe. Try again. knowledge_unconfigured: Knowledge is not available yet. knowledge_not_released: Knowledge is not released yet. measure_unavailable: Counting took too long. Try a smaller source or try again. scan_unavailable: Safety check in progress. We will retry automatically.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1ae8df15-64ea-4e60-b95b-3d507a0e3461":{"bearerAuth":{"type":"http","scheme":"bearer","description":"KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"d8abe753-3be9-4c16-ad49-2cb82cc9e683":{"url":"https://api.nixflex.com/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/public.openapi.json"},"subdomain":"nixflec","siteName":"Nixflex","title":"Measure knowledge source - Nixflex","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-29T12:06:41.550Z","originalFileLocation":"api-reference/knowledge/post-agents-target-knowledge-base-source-measure.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nixflex\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Measure knowledge source - Nixflex\">\u003cmeta data-mint-head property=\"og:description\" content=\"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nixflex\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nixflec.mintlify.site/_mintlify/api/og/v2?division=Knowledge\u0026amp;title=Measure+knowledge+source\u0026amp;description=Measure+source+token+usage+before+import+without+storing+or+publishing+the+source.+The+preview+does+not+reserve+later+quota.\u0026amp;theme=69858b6ae084feb3ced79b7e\u0026amp;signature=d644f869345320349e55dfa1eba47bf725877696daa6615ee4802860819a69b1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Measure knowledge source - Nixflex\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nixflec.mintlify.site/_mintlify/api/og/v2?division=Knowledge\u0026amp;title=Measure+knowledge+source\u0026amp;description=Measure+source+token+usage+before+import+without+storing+or+publishing+the+source.+The+preview+does+not+reserve+later+quota.\u0026amp;theme=69858b6ae084feb3ced79b7e\u0026amp;signature=d644f869345320349e55dfa1eba47bf725877696daa6615ee4802860819a69b1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nixflex\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#25D366\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nixflex.com/#organization\",\"name\":\"Nixflex\",\"url\":\"https://docs.nixflex.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/logo/light.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=7497b7278ff8d360bbdd0c55c90c5f05\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nixflex.com#website\",\"name\":\"Nixflex\",\"url\":\"https://docs.nixflex.com\",\"publisher\":{\"@id\":\"https://docs.nixflex.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure#webpage\",\"url\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure\",\"name\":\"Measure knowledge source\",\"description\":\"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.\",\"dateModified\":\"2026-11-29T12:06:41.550Z\",\"isPartOf\":{\"@id\":\"https://docs.nixflex.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge\",\"item\":\"https://docs.nixflex.com/api-reference/knowledge/get-knowledge-capabilities\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Measure knowledge source\",\"item\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure#apireference\",\"headline\":\"Measure knowledge source\",\"name\":\"Measure knowledge source\",\"description\":\"Measure source token usage before import without storing or publishing the source. The preview does not reserve later quota.\",\"url\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-agents-target-knowledge-base-source-measure#webpage\"},\"dateModified\":\"2026-11-29T12:06:41.550Z\",\"publisher\":{\"@id\":\"https://docs.nixflex.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nixflex.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nixflex\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Nixflex\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure.md","siteName":"Nixflex","nav":{"global":null,"tabs":[{"tab":"Business guide","pages":[{"title":"Business guide","href":""}]},{"tab":"Developer guide","pages":[{"title":"Developer guide","href":"/guides"}]},{"tab":"API reference","icon":"code","groups":[{"group":"API basics","expanded":true,"pages":[{"title":"Use the Nixflex API","sidebarTitle":"API overview","href":"/api-reference/introduction"},{"title":"Authenticate API requests","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Handle API errors","sidebarTitle":"Errors","href":"/api-reference/errors"},{"title":"Page through API results","sidebarTitle":"Pagination","href":"/api-reference/pagination"},{"title":"Handle API rate limits","sidebarTitle":"Rate limits","href":"/api-reference/rate-limits"},{"title":"Reuse supported operation identities","sidebarTitle":"Operation identities","href":"/api-reference/idempotency"},{"title":"Retry failed API requests","sidebarTitle":"Retry rules","href":"/api-reference/retries"},{"title":"Track API versions and compatibility","sidebarTitle":"Versions","href":"/api-reference/versioning"}]},{"group":"Webhooks","expanded":true,"pages":[{"title":"Receive and verify webhook events","sidebarTitle":"Webhook events","href":"/api-reference/webhooks"},{"title":"Receive booking results: call.bookings","sidebarTitle":"Booking results event","href":"/api-reference/call-bookings"}]},{"group":"Agents","expanded":true,"pages":[{"title":"Understand agent settings and defaults","sidebarTitle":"Settings and defaults","href":"/api-reference/agents/contract"},{"title":"Create an agent","sidebarTitle":"Create agent","openapi":"api-reference/public.openapi.json POST /agents","playground":"simple","href":"/api-reference/agents/create"},{"title":"List agents","openapi":"api-reference/public.openapi.json GET /agents","playground":"simple","sidebarTitle":"List agents","href":"/api-reference/agents/list"},{"title":"Get an agent","openapi":"api-reference/public.openapi.json GET /agents/{id}","playground":"simple","sidebarTitle":"Get agent","href":"/api-reference/agents/get"},{"title":"Update an agent","sidebarTitle":"Update agent","openapi":"api-reference/public.openapi.json PUT /agents/{id}","playground":"simple","href":"/api-reference/agents/update"},{"title":"Disable an agent","openapi":"api-reference/public.openapi.json DELETE /agents/{id}","playground":"simple","sidebarTitle":"Disable agent","href":"/api-reference/agents/delete"}]},{"group":"Phone numbers","expanded":true,"pages":[{"title":"List phone numbers","openapi":"api-reference/public.openapi.json GET /phone-numbers","playground":"simple","sidebarTitle":"List phone numbers","href":"/api-reference/phone-numbers/list"},{"title":"Get a phone number","openapi":"api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}","playground":"simple","sidebarTitle":"Get phone number","href":"/api-reference/phone-numbers/get"},{"title":"Import a phone number","sidebarTitle":"Import a phone number","openapi":"api-reference/public.openapi.json POST /phone-numbers","playground":"simple","href":"/api-reference/phone-numbers/import"},{"title":"Update a phone number","sidebarTitle":"Update phone number","openapi":"api-reference/public.openapi.json PATCH /phone-numbers/{phoneNumber}","playground":"simple","href":"/api-reference/phone-numbers/update"},{"title":"Get number usage","openapi":"api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}/usage","playground":"simple","sidebarTitle":"Get number usage","href":"/api-reference/phone-numbers/usage"},{"title":"Update phone number credentials","openapi":"api-reference/public.openapi.json POST /phone-numbers/{phoneNumber}/credentials","playground":"simple","sidebarTitle":"Update phone number credentials","href":"/api-reference/phone-numbers/credentials"},{"title":"Remove a phone number","sidebarTitle":"Remove phone number","openapi":"api-reference/public.openapi.json DELETE /phone-numbers/{phoneNumber}","playground":"simple","href":"/api-reference/phone-numbers/delete"}]},{"group":"Calls","expanded":true,"pages":[{"title":"List calls","sidebarTitle":"List calls","openapi":"api-reference/public.openapi.json GET /calls","playground":"simple","href":"/api-reference/calls/list"},{"title":"Get call history","sidebarTitle":"Get call history","openapi":"api-reference/public.openapi.json GET /calls/history","playground":"simple","href":"/api-reference/calls/get-calls-history"},{"title":"Get a call","sidebarTitle":"Get call","openapi":"api-reference/public.openapi.json GET /calls/{id}","playground":"simple","href":"/api-reference/calls/get"},{"title":"Read call booking results","openapi":"api-reference/public.openapi.json GET /calls/{id}/bookings","playground":"simple","sidebarTitle":"Read call booking results","href":"/api-reference/calls/get-bookings"},{"title":"Get a call recording","sidebarTitle":"Get call recording","openapi":"api-reference/public.openapi.json GET /calls/{id}/recording","playground":"simple","href":"/api-reference/calls/get-calls-id-recording"},{"title":"Create an outbound call","sidebarTitle":"Create outbound call","openapi":"api-reference/public.openapi.json POST /calls/outbound","playground":"simple","href":"/api-reference/calls/create-outbound"},{"title":"Read an outbound call request","openapi":"api-reference/public.openapi.json GET /calls/outbound/requests/{request_id}","playground":"simple","sidebarTitle":"Read outbound call request","href":"/api-reference/calls/get-outbound-request"},{"title":"Handle call outcomes and safe retries","sidebarTitle":"Outcomes and retries","href":"/api-reference/calls/client-safety"},{"title":"Delete a call","sidebarTitle":"Delete call","openapi":"api-reference/public.openapi.json DELETE /calls/{id}","playground":"simple","href":"/api-reference/calls/delete"},{"title":"Delete all calls","openapi":"api-reference/public.openapi.json DELETE /calls","playground":"simple","sidebarTitle":"Delete all calls","href":"/api-reference/calls/delete-all"}]},{"group":"Voice campaigns","expanded":true,"pages":[{"title":"List voice campaigns","sidebarTitle":"List voice campaigns","openapi":"api-reference/public.openapi.json GET /campaigns","playground":"simple","href":"/api-reference/voice-campaigns/get-campaigns"},{"title":"Get a voice campaign","sidebarTitle":"Get voice campaign","openapi":"api-reference/public.openapi.json GET /campaigns/{id}","playground":"simple","href":"/api-reference/voice-campaigns/get"},{"title":"Create a voice campaign","sidebarTitle":"Create voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch","playground":"simple","href":"/api-reference/calls/batch-create"},{"title":"Launch a voice campaign","sidebarTitle":"Launch a voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/launch","playground":"simple","href":"/api-reference/calls/batch-launch"},{"title":"Cancel voice campaign","sidebarTitle":"Cancel voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/cancel","playground":"simple","href":"/api-reference/voice-campaigns/post-calls-batch-id-cancel"},{"title":"Resume voice campaign","sidebarTitle":"Resume voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/resume","playground":"simple","href":"/api-reference/voice-campaigns/post-calls-batch-id-resume"},{"title":"Record voice consent","sidebarTitle":"Record voice consent","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/consent","playground":"simple","href":"/api-reference/voice-campaigns/post-calls-batch-id-consent"},{"title":"Delete a voice campaign","sidebarTitle":"Delete voice campaign","openapi":"api-reference/public.openapi.json DELETE /calls/batch/{id}","playground":"simple","href":"/api-reference/voice-campaigns/delete"}]},{"group":"SMS","expanded":true,"pages":[{"title":"Send an SMS","sidebarTitle":"Send an SMS","openapi":"api-reference/public.openapi.json POST /sms","playground":"simple","href":"/api-reference/sms/send"},{"group":"SMS campaigns","expanded":true,"pages":[{"title":"List SMS campaigns","sidebarTitle":"List SMS campaigns","openapi":"api-reference/public.openapi.json GET /sms/campaigns","playground":"simple","href":"/api-reference/sms/campaigns-list"},{"title":"Create an SMS campaign","sidebarTitle":"Create SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns","playground":"simple","href":"/api-reference/sms/campaigns-create"},{"title":"Get an SMS campaign","sidebarTitle":"Get SMS campaign","openapi":"api-reference/public.openapi.json GET /sms/campaigns/{id}","playground":"simple","href":"/api-reference/sms/campaigns-get"},{"title":"Update SMS reply settings","sidebarTitle":"Update SMS reply settings","openapi":"api-reference/public.openapi.json PATCH /sms/campaigns/{id}","playground":"simple","href":"/api-reference/sms-campaigns/patch-sms-campaigns-id"},{"title":"Launch an SMS campaign","sidebarTitle":"Launch an SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/launch","playground":"simple","href":"/api-reference/sms/campaigns-launch"},{"title":"Cancel SMS campaign","sidebarTitle":"Cancel SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/cancel","playground":"simple","href":"/api-reference/sms-campaigns/post-sms-campaigns-id-cancel"},{"title":"Resume SMS campaign","sidebarTitle":"Resume SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/resume","playground":"simple","href":"/api-reference/sms-campaigns/post-sms-campaigns-id-resume"},{"title":"Record SMS consent","sidebarTitle":"Record SMS consent","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/consent","playground":"simple","href":"/api-reference/sms-campaigns/post-sms-campaigns-id-consent"},{"title":"Delete an SMS campaign","sidebarTitle":"Delete SMS campaign","openapi":"api-reference/public.openapi.json DELETE /sms/campaigns/{id}","playground":"simple","href":"/api-reference/sms/campaigns-delete"}]}]},{"group":"Knowledge","expanded":true,"pages":[{"title":"Get knowledge capabilities","sidebarTitle":"Get capabilities","openapi":"api-reference/public.openapi.json GET /knowledge/capabilities","playground":"simple","href":"/api-reference/knowledge/get-knowledge-capabilities"},{"title":"List knowledge agents","sidebarTitle":"List agents","openapi":"api-reference/public.openapi.json GET /knowledge/targets","playground":"simple","href":"/api-reference/knowledge/get-knowledge-targets"},{"title":"Get agent knowledge","sidebarTitle":"Get agent knowledge","openapi":"api-reference/public.openapi.json GET /agents/{target}/knowledge-base","playground":"simple","href":"/api-reference/knowledge/get-agents-target-knowledge-base"},{"title":"Set agent knowledge","sidebarTitle":"Set agent knowledge","openapi":"api-reference/public.openapi.json PUT /agents/{target}/knowledge-base","playground":"simple","href":"/api-reference/knowledge/put-agents-target-knowledge-base"},{"title":"Get knowledge base","sidebarTitle":"Get base","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb"},{"title":"Get knowledge overview","sidebarTitle":"Get overview","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/overview","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-overview"},{"title":"Read automatic keyterms","sidebarTitle":"Read automatic keyterms","openapi":"api-reference/public.openapi.json GET /agents/{target}/knowledge-keyterms","playground":"simple","href":"/api-reference/knowledge/get-agents-target-knowledge-keyterms"},{"title":"Get knowledge usage","sidebarTitle":"Get usage","openapi":"api-reference/public.openapi.json GET /knowledge/usage","playground":"simple","href":"/api-reference/knowledge/get-knowledge-usage"},{"title":"Read knowledge events","sidebarTitle":"Read events","description":"Read ordered knowledge events for the owning account. Keep the documented paging and filters while reconciling changes.","openapi":"api-reference/public.openapi.json GET /knowledge/events","playground":"simple","href":"/api-reference/knowledge/get-knowledge-events"},{"title":"Measure knowledge source","sidebarTitle":"Measure source","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/source-measure","playground":"simple","href":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure"},{"title":"Import knowledge source","sidebarTitle":"Import source","description":"Import pasted text or a supported raw file and track preparation. Review flags can require approval before publication.","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources"},{"title":"List knowledge sources","sidebarTitle":"List sources","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/sources","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-sources"},{"title":"Rename knowledge source","sidebarTitle":"Rename source","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/sources/{id}","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-sources-id"},{"title":"Replace knowledge source","sidebarTitle":"Replace source","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/{id}/replacements","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements"},{"title":"Refresh website sources","sidebarTitle":"Refresh website sources","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/refresh","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-refresh"},{"title":"Delete knowledge source","sidebarTitle":"Delete source","openapi":"api-reference/public.openapi.json DELETE /knowledge-bases/{kb}/sources/{id}","playground":"simple","href":"/api-reference/knowledge/delete-knowledge-bases-kb-sources-id"},{"title":"Discover website pages","sidebarTitle":"Discover website pages","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/website-discoveries","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-website-discoveries"},{"title":"Import selected pages","sidebarTitle":"Import selected pages","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/website-imports","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-website-imports"},{"title":"Get knowledge draft","sidebarTitle":"Get draft","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/drafts/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-drafts-id"},{"title":"Edit knowledge draft","sidebarTitle":"Edit draft","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/drafts/{id}","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-drafts-id"},{"title":"Accept knowledge draft","sidebarTitle":"Accept draft","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/drafts/{id}/accept","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-drafts-id-accept"},{"title":"Discard knowledge draft","sidebarTitle":"Discard draft","openapi":"api-reference/public.openapi.json DELETE /knowledge-bases/{kb}/drafts/{id}","playground":"simple","href":"/api-reference/knowledge/delete-knowledge-bases-kb-drafts-id"},{"title":"List knowledge topics","sidebarTitle":"List topics","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/topics","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-topics"},{"title":"Get knowledge topic","sidebarTitle":"Get topic","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/topics/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-topics-id"},{"title":"Create knowledge topic","sidebarTitle":"Create topic","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/topics","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-topics"},{"title":"Update knowledge topic","sidebarTitle":"Update topic","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/topics/{id}","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-topics-id"},{"title":"Delete knowledge topic","sidebarTitle":"Delete topic","openapi":"api-reference/public.openapi.json DELETE /knowledge-bases/{kb}/topics/{id}","playground":"simple","href":"/api-reference/knowledge/delete-knowledge-bases-kb-topics-id"},{"title":"Search knowledge topics","sidebarTitle":"Search topics","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/topic-search","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-topic-search"},{"title":"List unanswered questions","sidebarTitle":"List unanswered questions","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/unanswered","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-unanswered"},{"title":"Update knowledge settings","sidebarTitle":"Update settings","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/settings","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-settings"},{"title":"Start knowledge test","sidebarTitle":"Start test","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/test-sessions","playground":"simple","href":"/api-reference/knowledge/post-agents-target-knowledge-base-test-sessions"},{"title":"Get knowledge test session","sidebarTitle":"Get test session","openapi":"api-reference/public.openapi.json GET /knowledge/test-sessions/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-test-sessions-id"},{"title":"Ask a knowledge test question","sidebarTitle":"Ask a test question","openapi":"api-reference/public.openapi.json POST /knowledge/test-sessions/{id}/messages","playground":"simple","href":"/api-reference/knowledge/post-knowledge-test-sessions-id-messages"},{"title":"Cancel knowledge test","sidebarTitle":"Cancel test","openapi":"api-reference/public.openapi.json POST /knowledge/test-sessions/{id}/cancel","playground":"simple","href":"/api-reference/knowledge/post-knowledge-test-sessions-id-cancel"},{"title":"Get knowledge job","sidebarTitle":"Get job","openapi":"api-reference/public.openapi.json GET /knowledge/jobs/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-jobs-id"},{"title":"Retry knowledge job","sidebarTitle":"Retry job","openapi":"api-reference/public.openapi.json POST /knowledge/jobs/{id}/retry","playground":"simple","href":"/api-reference/knowledge/post-knowledge-jobs-id-retry"},{"title":"Cancel knowledge job","sidebarTitle":"Cancel job","openapi":"api-reference/public.openapi.json POST /knowledge/jobs/{id}/cancel","playground":"simple","href":"/api-reference/knowledge/post-knowledge-jobs-id-cancel"},{"title":"Create knowledge export","sidebarTitle":"Create export","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/exports","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-exports"},{"title":"Download knowledge export","sidebarTitle":"Download export","openapi":"api-reference/public.openapi.json GET /knowledge/exports/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-exports-id"},{"title":"Delete agent knowledge","sidebarTitle":"Delete agent knowledge","openapi":"api-reference/public.openapi.json DELETE /agents/{target}/knowledge-base","playground":"simple","href":"/api-reference/knowledge/delete-agents-target-knowledge-base"}]},{"group":"Web agent","expanded":true,"pages":[{"title":"Read web agent settings","sidebarTitle":"Read web agent settings","openapi":"api-reference/public.openapi.json GET /agent-web/{number}","playground":"simple","href":"/api-reference/web-agent/get-agent-web-number"},{"title":"Update web agent settings","sidebarTitle":"Update web agent settings","openapi":"api-reference/public.openapi.json PATCH /agent-web/{number}","playground":"simple","href":"/api-reference/web-agent/patch-agent-web-number"}]},{"group":"Inbox","expanded":true,"pages":[{"title":"Check inbox availability","sidebarTitle":"Check inbox availability","openapi":"api-reference/public.openapi.json GET /agent-inbox/features","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-features"},{"title":"List inbox numbers","sidebarTitle":"List inbox numbers","openapi":"api-reference/public.openapi.json GET /agent-inbox/numbers","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-numbers"},{"title":"List inbox conversations","sidebarTitle":"List inbox conversations","openapi":"api-reference/public.openapi.json GET /agent-inbox/{channel}/{number}","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-channel-number"},{"title":"Read an inbox thread","sidebarTitle":"Read inbox thread","openapi":"api-reference/public.openapi.json GET /agent-inbox/{channel}/{number}/thread/{thread}","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-channel-number-thread-thread"},{"title":"Update an inbox thread","sidebarTitle":"Update inbox thread","openapi":"api-reference/public.openapi.json PATCH /agent-inbox/{channel}/{number}/thread/{thread}","playground":"simple","href":"/api-reference/agent-inbox/patch-agent-inbox-channel-number-thread-thread"},{"title":"Read inbox retention","sidebarTitle":"Read inbox retention","openapi":"api-reference/public.openapi.json GET /agent-inbox/retention","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-retention"}]},{"group":"Contacts","expanded":true,"pages":[{"title":"Delete caller context","sidebarTitle":"Delete caller context","openapi":"api-reference/public.openapi.json DELETE /phone-numbers/{phoneNumber}/callers/{callerNumber}","playground":"simple","href":"/api-reference/caller-context/delete"},{"title":"Get caller context","openapi":"api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}/callers/{callerNumber}","playground":"simple","sidebarTitle":"Get caller context","href":"/api-reference/caller-context/get"},{"title":"Set caller context","openapi":"api-reference/public.openapi.json PUT /phone-numbers/{phoneNumber}/callers/{callerNumber}","playground":"simple","sidebarTitle":"Set caller context","href":"/api-reference/caller-context/set"},{"title":"Import caller context","sidebarTitle":"Import caller context","openapi":"api-reference/public.openapi.json POST /phone-numbers/{phoneNumber}/callers/import","playground":"simple","href":"/api-reference/caller-context/import"},{"title":"Preview contact hours","sidebarTitle":"Preview contact hours","openapi":"api-reference/public.openapi.json POST /contact-hours/preview","playground":"simple","href":"/api-reference/contact-controls/post-contact-hours-preview"},{"title":"List contact suppressions","sidebarTitle":"List contact suppressions","openapi":"api-reference/public.openapi.json GET /contact-suppressions","playground":"simple","href":"/api-reference/contact-controls/get-contact-suppressions"},{"title":"Add contact suppressions","sidebarTitle":"Add contact suppressions","openapi":"api-reference/public.openapi.json POST /contact-suppressions","playground":"simple","href":"/api-reference/contact-controls/post-contact-suppressions"},{"title":"Remove a contact suppression","sidebarTitle":"Remove contact suppression","openapi":"api-reference/public.openapi.json DELETE /contact-suppressions","playground":"simple","href":"/api-reference/contact-controls/delete-contact-suppressions"}]},{"group":"Integrations","expanded":true,"pages":[{"group":"Cal.com","expanded":true,"pages":[{"title":"Get Cal.com settings","sidebarTitle":"Get Cal.com settings","openapi":"api-reference/public.openapi.json GET /integrations/calcom/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-calcom-number-phoneNumber"},{"title":"Set Cal.com settings","sidebarTitle":"Set Cal.com settings","openapi":"api-reference/public.openapi.json PUT /integrations/calcom/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-calcom-number-phoneNumber"},{"title":"Delete Cal.com settings","sidebarTitle":"Delete Cal.com settings","openapi":"api-reference/public.openapi.json DELETE /integrations/calcom/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-calcom-number-phoneNumber"}]},{"group":"Google Calendar","expanded":true,"pages":[{"title":"Connect Google Calendar","openapi":"api-reference/public.openapi.json POST /integrations/google-calendar/number/{phoneNumber}/connect","playground":"simple","sidebarTitle":"Connect Google Calendar","href":"/api-reference/integration-settings/google-calendar"},{"title":"Get Google Calendar status","openapi":"api-reference/public.openapi.json GET /integrations/google-calendar/number/{phoneNumber}","playground":"simple","sidebarTitle":"Get Google Calendar status","href":"/api-reference/integration-settings/google-calendar-status"},{"title":"Disconnect Google Calendar","openapi":"api-reference/public.openapi.json DELETE /integrations/google-calendar/number/{phoneNumber}","playground":"simple","sidebarTitle":"Disconnect Google Calendar","href":"/api-reference/integration-settings/google-calendar-disconnect"},{"title":"Update Google Calendar settings","openapi":"api-reference/public.openapi.json PATCH /integrations/google-calendar/number/{phoneNumber}","playground":"simple","sidebarTitle":"Update Google Calendar settings","href":"/api-reference/integration-settings/google-calendar-settings"}]},{"group":"Slack","expanded":true,"pages":[{"title":"Get Slack settings","sidebarTitle":"Get Slack settings","openapi":"api-reference/public.openapi.json GET /integrations/slack/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-slack-number-phoneNumber"},{"title":"Set Slack settings","sidebarTitle":"Set Slack settings","openapi":"api-reference/public.openapi.json PUT /integrations/slack/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-slack-number-phoneNumber"},{"title":"Delete Slack settings","sidebarTitle":"Delete Slack settings","openapi":"api-reference/public.openapi.json DELETE /integrations/slack/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-slack-number-phoneNumber"}]},{"group":"Zapier","expanded":true,"pages":[{"title":"Get Zapier settings","sidebarTitle":"Get Zapier settings","openapi":"api-reference/public.openapi.json GET /integrations/zapier/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-zapier-number-phoneNumber"},{"title":"Set Zapier settings","sidebarTitle":"Set Zapier settings","openapi":"api-reference/public.openapi.json PUT /integrations/zapier/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-zapier-number-phoneNumber"},{"title":"Delete Zapier settings","sidebarTitle":"Delete Zapier settings","openapi":"api-reference/public.openapi.json DELETE /integrations/zapier/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-zapier-number-phoneNumber"}]},{"group":"Make","expanded":true,"pages":[{"title":"Get Make settings","sidebarTitle":"Get Make settings","openapi":"api-reference/public.openapi.json GET /integrations/make/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-make-number-phoneNumber"},{"title":"Set Make settings","sidebarTitle":"Set Make settings","openapi":"api-reference/public.openapi.json PUT /integrations/make/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-make-number-phoneNumber"},{"title":"Delete Make settings","sidebarTitle":"Delete Make settings","openapi":"api-reference/public.openapi.json DELETE /integrations/make/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-make-number-phoneNumber"}]},{"group":"GoHighLevel","expanded":true,"pages":[{"title":"Get GoHighLevel settings","sidebarTitle":"Get GoHighLevel settings","openapi":"api-reference/public.openapi.json GET /integrations/gohighlevel/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-gohighlevel-number-phoneNumber"},{"title":"Set GoHighLevel settings","sidebarTitle":"Set GoHighLevel settings","openapi":"api-reference/public.openapi.json PUT /integrations/gohighlevel/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-gohighlevel-number-phoneNumber"},{"title":"Delete GoHighLevel settings","sidebarTitle":"Delete GoHighLevel settings","openapi":"api-reference/public.openapi.json DELETE /integrations/gohighlevel/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-gohighlevel-number-phoneNumber"}]},{"group":"Pre-call","expanded":true,"pages":[{"title":"Get pre-call gate for number","sidebarTitle":"Get number pre-call hook","openapi":"api-reference/public.openapi.json GET /integrations/precall/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-precall-number-phoneNumber"},{"title":"Get pre-call gate for agent","sidebarTitle":"Get agent pre-call hook","openapi":"api-reference/public.openapi.json GET /integrations/precall/agent/{agentId}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-precall-agent-agentId"},{"title":"Set pre-call gate for number","sidebarTitle":"Set number pre-call hook","openapi":"api-reference/public.openapi.json PUT /integrations/precall/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-precall-number-phoneNumber"},{"title":"Set pre-call gate for agent","sidebarTitle":"Set agent pre-call hook","openapi":"api-reference/public.openapi.json PUT /integrations/precall/agent/{agentId}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-precall-agent-agentId"},{"title":"Clear pre-call gate for number","sidebarTitle":"Clear number pre-call hook","openapi":"api-reference/public.openapi.json DELETE /integrations/precall/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-precall-number-phoneNumber"},{"title":"Clear pre-call gate for agent","sidebarTitle":"Clear agent pre-call hook","openapi":"api-reference/public.openapi.json DELETE /integrations/precall/agent/{agentId}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-precall-agent-agentId"}]},{"group":"Custom functions","expanded":true,"pages":[{"title":"List custom functions","sidebarTitle":"List custom functions","openapi":"api-reference/public.openapi.json GET /integrations/custom-functions/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-custom-functions-number-phoneNumber"},{"title":"Create a custom function","sidebarTitle":"Create custom function","openapi":"api-reference/public.openapi.json POST /integrations/custom-functions/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/post-integrations-custom-functions-number-phoneNumber"},{"title":"Update a custom function","sidebarTitle":"Update custom function","openapi":"api-reference/public.openapi.json PATCH /integrations/custom-functions/number/{phoneNumber}/{id}","playground":"simple","href":"/api-reference/integration-settings/patch-integrations-custom-functions-number-phoneNumber-id"},{"title":"Delete a custom function","sidebarTitle":"Delete custom function","openapi":"api-reference/public.openapi.json DELETE /integrations/custom-functions/number/{phoneNumber}/{id}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-custom-functions-number-phoneNumber-id"}]},{"group":"Webhooks","expanded":true,"pages":[{"title":"Get first webhook","sidebarTitle":"Get first webhook","openapi":"api-reference/public.openapi.json GET /integrations/webhook/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-webhook-number-phoneNumber"},{"title":"Get second webhook","sidebarTitle":"Get second webhook","openapi":"api-reference/public.openapi.json GET /integrations/webhook2/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-webhook2-number-phoneNumber"},{"title":"Set first webhook","sidebarTitle":"Set first webhook","openapi":"api-reference/public.openapi.json PUT /integrations/webhook/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-webhook-number-phoneNumber"},{"title":"Set second webhook","sidebarTitle":"Set second webhook","openapi":"api-reference/public.openapi.json PUT /integrations/webhook2/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-webhook2-number-phoneNumber"},{"title":"Clear first webhook","sidebarTitle":"Clear first webhook","openapi":"api-reference/public.openapi.json DELETE /integrations/webhook/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-webhook-number-phoneNumber"},{"title":"Clear second webhook","sidebarTitle":"Clear second webhook","openapi":"api-reference/public.openapi.json DELETE /integrations/webhook2/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-webhook2-number-phoneNumber"}]},{"group":"Web calls","expanded":true,"pages":[{"title":"Get web calls","sidebarTitle":"Get web calls","openapi":"api-reference/public.openapi.json GET /integrations/web-calls/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-web-calls-number-phoneNumber"},{"title":"Set web calls","sidebarTitle":"Set web calls","openapi":"api-reference/public.openapi.json PUT /integrations/web-calls/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-web-calls-number-phoneNumber"},{"title":"Clear web calls","sidebarTitle":"Clear web calls","openapi":"api-reference/public.openapi.json DELETE /integrations/web-calls/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-web-calls-number-phoneNumber"}]}]},{"group":"Organisation","expanded":true,"pages":[{"title":"Check organisation roles and permissions","sidebarTitle":"Roles and permissions","href":"/api-reference/organisation/roles"},{"title":"Get organisation context","sidebarTitle":"Get context","openapi":"api-reference/public.openapi.json GET /organisation","playground":"simple","href":"/api-reference/organisation/get-organisation"},{"title":"List organisation members","sidebarTitle":"List members","openapi":"api-reference/public.openapi.json GET /organisation/members","playground":"simple","href":"/api-reference/organisation/get-organisation-members"},{"title":"List organisation activity","sidebarTitle":"List activity","openapi":"api-reference/public.openapi.json GET /organisation/activity","playground":"simple","href":"/api-reference/organisation/get-organisation-activity"},{"title":"Request an owner claim","sidebarTitle":"Request an owner claim","openapi":"api-reference/public.openapi.json POST /organisation/claim-invite","playground":"simple","href":"/api-reference/organisation/post-organisation-claim-invite"},{"title":"Invite a teammate","sidebarTitle":"Invite a teammate","openapi":"api-reference/public.openapi.json POST /organisation/invites","playground":"simple","href":"/api-reference/organisation/post-organisation-invites"},{"title":"Resend a team invitation","sidebarTitle":"Resend a team invitation","openapi":"api-reference/public.openapi.json POST /organisation/invites/{id}/resend","playground":"simple","href":"/api-reference/organisation/post-organisation-invites-id-resend"},{"title":"Revoke a team invitation","sidebarTitle":"Revoke a team invitation","openapi":"api-reference/public.openapi.json DELETE /organisation/invites/{id}","playground":"simple","href":"/api-reference/organisation/delete-organisation-invites-id"},{"title":"Change an organisation role","sidebarTitle":"Change member role","openapi":"api-reference/public.openapi.json PATCH /organisation/members/{id}","playground":"simple","href":"/api-reference/organisation/patch-organisation-members-id"},{"title":"Remove an organisation member","sidebarTitle":"Remove member","openapi":"api-reference/public.openapi.json DELETE /organisation/members/{id}","playground":"simple","href":"/api-reference/organisation/delete-organisation-members-id"},{"title":"Rename an organisation","sidebarTitle":"Rename an organisation","openapi":"api-reference/public.openapi.json PATCH /organisation/name","playground":"simple","href":"/api-reference/organisation/patch-organisation-name"},{"title":"Get the signing secret","sidebarTitle":"Get the signing secret","openapi":"api-reference/public.openapi.json GET /organisation/signing-secret","playground":"none","href":"/api-reference/organisation/get-organisation-signing-secret"}]},{"group":"Account and usage","expanded":true,"pages":[{"title":"Create an API account","sidebarTitle":"Create API account","openapi":"api-reference/public.openapi.json POST /keys","playground":"simple","href":"/api-reference/account/create-key"},{"title":"Rotate the API key","sidebarTitle":"Rotate API key","openapi":"api-reference/public.openapi.json POST /keys/rotate","playground":"simple","href":"/api-reference/account/rotate-key"},{"title":"Get account usage","sidebarTitle":"Get account usage","openapi":"api-reference/public.openapi.json GET /usage","playground":"simple","href":"/api-reference/account/usage"},{"title":"Get account retention","sidebarTitle":"Get account retention","openapi":"api-reference/public.openapi.json GET /account/retention","playground":"simple","href":"/api-reference/account-and-keys/get-account-retention"},{"title":"Get key activity","sidebarTitle":"Get key activity","openapi":"api-reference/public.openapi.json GET /keys/activity","playground":"simple","href":"/api-reference/account-and-keys/get-keys-activity"}]},{"group":"Voices","expanded":true,"pages":[{"title":"List voices","sidebarTitle":"List voices","openapi":"api-reference/public.openapi.json GET /voices","playground":"simple","href":"/api-reference/voices/get-voices"},{"title":"Get a voice","sidebarTitle":"Get voice","openapi":"api-reference/public.openapi.json GET /voices/{voice_key}","playground":"simple","href":"/api-reference/voices/get-voices-voice_key"}]}]},{"tab":"SDKs \u0026 CLI","icon":"terminal","pages":[{"title":"SDKs \u0026 CLI","href":"/sdks/ecosystem"}]},{"tab":"Build with AI","icon":"diagram-project","pages":[{"title":"Build with AI","href":"/guides/developer/build-with-ai"}]}]},"basePath":"","title":"Measure knowledge source - Nixflex","deploymentId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","buildId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BD9G1WMi.js","snippetPresets-Bcqr8I2u.js","utils-BrYn4XiY.js","style-to-object-BY3JEAdk.js","utils-CYrCnchl.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CNFO66BS.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BneVo7uA.js","_Uint8Array-n4RvRzp3.js","isObject-FP1Yky1u.js","ApiExamples-C1YMsTjy.js","usePlaygroundInputsStore-DayW4kZ9.js","shallow-DDCzdKmR.js","isEqual-CBVoazy8.js","CodeSnippets-CWandYY5.js","CodeSnippet-grFP6YU_.js","use-playground-group-access-BBqHUxQK.js","Page-DBPN_x5x.js","api-description-markdown-1J-AA_Kv.js","DynamicMarkdown-Dgh_e4rL.js","SectionHeading-BP6Np9Uh.js","MethodPill-4k_Ty_Xv.js","getPastedJson-CWUNKLcr.js","Check2Icon-Cs4FQb2J.js","axios-CsQoIw0U.js","Markdown-CR8c2fXT.js","AssistantPageLink-BBR7elHb.js","dist-DjFwSv8l.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}