The current AI detection API creates an async task and returns a task ID. Poll the task endpoint until it reaches STAGE_SUCCESS or STAGE_FAILED.
Use the Bulk API when you need to analyze many texts as one asynchronous job.Use GET /models to discover the selectors available to your API key. The REST API temporarily accepts an omitted model for backward compatibility and resolves it to "default". New integrations should always send a selector explicitly.
The analyzed text returned by the model. Pangram 4 may normalize the submitted text before inference; window offsets refer to this returned value. Present on success.
Success ResponseThis example shows a Pangram 4 result. Pangram 4 returns version: "4.0", uses "AI-Assisted" instead of lightly or moderately assisted window labels, and keeps confidence as "Low", "Medium", or "High".
{ "stage": "STAGE_FAILED", "text": "", "version": "", "headline": "preprocessing: Input text contains no valid text after preprocessing", "prediction": "", "prediction_short": "", "fraction_ai": 0.0, "fraction_ai_assisted": 0.0, "fraction_human": 0.0, "num_ai_segments": 0, "num_ai_assisted_segments": 0, "num_human_segments": 0, "windows": []}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Pangram Labs","colors":{"primary":"#FF6106","light":"#FF6106","dark":"#FECAB9"},"logo":{"light":"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/logo/light.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=8b5e8d04b0d2aeb0cb557c7688a29f65","dark":"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/logo/dark.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=a489902ce76f8470eae174894764d62f"},"favicon":"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/favicon.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=e0b196e83db26d8d2b13d6812d3acfab","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python"]},"mdx":{"auth":{"method":"key","name":"x-api-key"}}},"navbar":{"links":[{"href":"mailto:support@pangram.com","label":"Support"}]},"footer":{"socials":{}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pangram","hasAudioNarration":false,"actualSubdomain":"pangram","customDomains":["docs.pangram.com"],"gitSource":{"type":"github","owner":"pangramlabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a6a28f411a80bbe482e79d9","collectionId":"0ae424ed-93fa-449d-bdaf-cb1459f3ff6d","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a6a28f411a80bbe482e79d9"},"entitlements":{},"buildId":"6a6a28f411a80bbe482e79d9:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"REST API","count":13},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Deprecated","count":1},{"language":"default","tag":"Python SDK","count":1},{"language":"default","tag":"Reference","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"editor-v7-file-tree","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/ai-detection","slug":"/api-reference/ai-detection","pageMetadata":{"title":"AI Detection","description":"Detect AI-generated and AI-assisted text using the async inference API","api":"POST https://text.external-api.pangram.com/task","href":"/api-reference/ai-detection"},"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: \"Detect AI-generated and AI-assisted text using the async inference API\"\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`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Badge,CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseField,Table,Tooltip,Update}=_components;if(!Badge)_missingMdxReference(`Badge`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tooltip)_missingMdxReference(`Tooltip`,true);if(!Update)_missingMdxReference(`Update`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`For more information on billing units and pricing, check our `,_jsx(_components.a,{href:`https://www.pangram.com/pricing?category=developers`,children:`pricing page for developers`}),`.`]}),`\n`,_jsx(Badge,{color:`green`,children:`Current`}),`\n`,_jsx(Update,{label:`Async inference API`,description:`Current version`,id:`async-inference-api`,children:_jsxs(_components.p,{children:[`The current AI detection API creates an async task and returns a task ID. Poll the task endpoint until it reaches `,_jsx(_components.code,{children:`STAGE_SUCCESS`}),` or `,_jsx(_components.code,{children:`STAGE_FAILED`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Use the `,_jsx(_components.a,{href:`/api-reference/bulk-api`,children:`Bulk API`}),` when you need to analyze many texts as one asynchronous job.`]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.a,{href:`/api-reference/models`,children:_jsx(_components.code,{children:`GET /models`})}),` to discover the selectors available to your API key. The REST API temporarily accepts an omitted `,_jsx(_components.code,{children:`model`}),` for backward compatibility and resolves it to `,_jsx(_components.code,{children:`\"default\"`}),`. New integrations should always send a selector explicitly.`]}),`\n`,_jsx(Heading,{level:`2`,id:`post-/task`,children:`POST /task`}),`\n`,_jsx(_components.p,{children:`Create an async AI detection task.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://text.external-api.pangram.com/task`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`request`,children:`Request`}),`\n`,_jsx(ParamField,{body:`text`,type:`string`,required:true,id:`param-text`,children:_jsx(_components.p,{children:`The input text to analyze.`})}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,default:`default`,id:`param-model`,children:_jsxs(_components.p,{children:[`A model selector returned by `,_jsx(_components.a,{href:`/api-reference/models`,children:_jsx(_components.code,{children:`GET /models`})}),`.`]})}),`\n`,_jsx(ParamField,{body:`public_dashboard_link`,type:`boolean`,default:`false`,id:`param-public-dashboard-link`,children:_jsx(_components.p,{children:`Whether to include a public dashboard link in the completed response.`})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`task_id`,type:`string`,id:`param-task-id`,children:_jsx(_components.p,{children:`The ID of the async inference task.`})}),`\n`,_jsx(Heading,{level:`3`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://text.external-api.pangram.com/task`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: your_api_key_here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\": \"AI-assisted passage. Human passage.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"pangram-4\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"public_dashboard_link\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python SDK`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pangram `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Pangram`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pangram_client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Pangram()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pangram_client.predict(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"AI-assisted passage. Human passage.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pangram-4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example Response`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`model-selection-errors`,children:`Model selection errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`403 Forbidden`})}),_jsx(_components.td,{children:`The requested model is not enabled for the API key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`422 Unprocessable Entity`})}),_jsx(_components.td,{children:`The model selector is malformed or unknown.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`503 Service Unavailable`})}),_jsx(_components.td,{children:`The requested model is temporarily unavailable.`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`get-/task/`,children:`GET /task/`}),`\n`,_jsx(_components.p,{children:`Fetch the current status or completed result for an AI detection task.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET https://text.external-api.pangram.com/task/{task_id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`request-2`,children:`Request`}),`\n`,_jsx(ParamField,{path:`task_id`,type:`string`,required:true,id:`param-task-id-1`,children:_jsxs(_components.p,{children:[`The task ID returned by `,_jsx(_components.code,{children:`POST /task`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response-2`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`task_id`,type:`string`,id:`param-task-id-2`,children:_jsx(_components.p,{children:`The ID of the async inference task. Present while the task is in progress.`})}),`\n`,_jsx(ResponseField,{name:`stage`,type:`string`,id:`param-stage`,children:_jsxs(_components.p,{children:[`Current task stage. Terminal stages are `,_jsx(_components.code,{children:`STAGE_SUCCESS`}),` and `,_jsx(_components.code,{children:`STAGE_FAILED`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`text`,type:`string`,id:`param-text-1`,children:_jsx(_components.p,{children:`The analyzed text returned by the model. Pangram 4 may normalize the submitted text before inference; window offsets refer to this returned value. Present on success.`})}),`\n`,_jsx(ResponseField,{name:`version`,type:`string`,id:`param-version`,children:_jsxs(_components.p,{children:[`The API version identifier (e.g., `,_jsx(_components.code,{children:`\"4.0\"`}),` for Pangram 4). Present on success.`]})}),`\n`,_jsx(ResponseField,{name:`headline`,type:`string`,id:`param-headline`,children:_jsx(_components.p,{children:`Classification headline summarizing the result. Present on success.`})}),`\n`,_jsx(ResponseField,{name:`prediction`,type:`string`,id:`param-prediction`,children:_jsx(_components.p,{children:`Long-form prediction string describing the classification. Present on success.`})}),`\n`,_jsx(ResponseField,{name:`prediction_short`,type:`string`,id:`param-prediction-short`,children:_jsxs(_components.p,{children:[`Short-form prediction string. Pangram 4 returns `,_jsx(_components.code,{children:`\"AI\"`}),`, `,_jsx(_components.code,{children:`\"Human\"`}),`, or `,_jsx(_components.code,{children:`\"Mixed\"`}),`. Present on success.`]})}),`\n`,_jsx(ResponseField,{name:`fraction_ai`,type:`float`,id:`param-fraction-ai`,children:_jsx(_components.p,{children:`Fraction of text classified as AI-written (0.0–1.0). Present on success.`})}),`\n`,_jsx(ResponseField,{name:`fraction_ai_assisted`,type:`float`,id:`param-fraction-ai-assisted`,children:_jsx(_components.p,{children:`Fraction of text classified as AI-assisted (0.0–1.0). Present on success.`})}),`\n`,_jsx(ResponseField,{name:`fraction_human`,type:`float`,id:`param-fraction-human`,children:_jsx(_components.p,{children:`Fraction of text classified as human-written (0.0–1.0). Present on success.`})}),`\n`,_jsx(ResponseField,{name:`num_ai_segments`,type:`integer`,id:`param-num-ai-segments`,children:_jsx(_components.p,{children:`Number of text segments classified as AI. Present on success.`})}),`\n`,_jsx(ResponseField,{name:`num_ai_assisted_segments`,type:`integer`,id:`param-num-ai-assisted-segments`,children:_jsx(_components.p,{children:`Number of text segments classified as AI-assisted. Present on success.`})}),`\n`,_jsx(ResponseField,{name:`num_human_segments`,type:`integer`,id:`param-num-human-segments`,children:_jsx(_components.p,{children:`Number of text segments classified as human. Present on success.`})}),`\n`,_jsx(ResponseField,{name:`dashboard_link`,type:`string`,id:`param-dashboard-link`,children:_jsxs(_components.p,{children:[`A link to the dashboard page containing the full classification result. Present on success when `,_jsx(_components.code,{children:`public_dashboard_link`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsxs(ResponseField,{name:`windows`,type:`array`,id:`param-windows`,children:[_jsxs(_components.p,{children:[`List of text segments (`,_jsx(Tooltip,{tip:`The text is divided into overlapping segments (windows) that are each classified independently, enabling granular detection across long documents.`,children:`windows`}),`) analyzed individually. Present on success.`]}),_jsxs(Expandable,{title:`Window object properties`,children:[_jsx(ResponseField,{name:`text`,type:`string`,id:`param-text-2`,children:_jsx(_components.p,{children:`The window text.`})}),_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label`,children:_jsxs(_components.p,{children:[`Descriptive classification label. Pangram 4 returns `,_jsx(_components.code,{children:`\"AI-Generated\"`}),`, `,_jsx(_components.code,{children:`\"AI-Assisted\"`}),`, or `,_jsx(_components.code,{children:`\"Human Written\"`}),`.`]})}),_jsx(ResponseField,{name:`ai_assistance_score`,type:`float`,id:`param-ai-assistance-score`,children:_jsxs(_components.p,{children:[_jsx(Tooltip,{tip:`A continuous score from 0 to 1, where 0 means entirely human-written and 1 means fully AI-generated. Values in between indicate varying degrees of AI assistance.`,children:`AI assistance score`}),` detailing the level of AI assistance (0.0–1.0).`]})}),_jsx(ResponseField,{name:`confidence`,type:`string`,id:`param-confidence`,children:_jsxs(_components.p,{children:[_jsx(Tooltip,{tip:`High = strong signal, the model is very sure. Medium = moderate signal. Low = weak signal, treat with caution.`,children:`Confidence level`}),` for the classification (`,_jsx(_components.code,{children:`\"High\"`}),`, `,_jsx(_components.code,{children:`\"Medium\"`}),`, `,_jsx(_components.code,{children:`\"Low\"`}),`).`]})}),_jsx(ResponseField,{name:`start_index`,type:`integer`,id:`param-start-index`,children:_jsxs(_components.p,{children:[`Starting character index in the returned top-level `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ResponseField,{name:`end_index`,type:`integer`,id:`param-end-index`,children:_jsxs(_components.p,{children:[`End-exclusive character index in the returned top-level `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ResponseField,{name:`word_count`,type:`integer`,id:`param-word-count`,children:_jsx(_components.p,{children:`Number of words in the window.`})}),_jsx(ResponseField,{name:`token_length`,type:`integer`,id:`param-token-length`,children:_jsx(_components.p,{children:`Token length of the window.`})}),_jsx(ResponseField,{name:`is_humanized`,type:`boolean`,id:`param-is-humanized`,children:_jsx(_components.p,{children:`Whether Pangram 4’s humanizer head classified the window as humanized. Present on every Pangram 4 window.`})}),_jsx(ResponseField,{name:`humanizer_score`,type:`float`,id:`param-humanizer-score`,children:_jsx(_components.p,{children:`Pangram 4 humanizer-head score from 0.0–1.0. Present on every Pangram 4 window.`})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`example-2`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://text.external-api.pangram.com/task/123e4567-e89b-12d3-a456-426614174000`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: your_api_key_here\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`In-Progress Response`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STAGE_PREPROCESSING\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Success Response`})}),`\n`,_jsxs(_components.p,{children:[`This example shows a Pangram 4 result. Pangram 4 returns `,_jsx(_components.code,{children:`version: \"4.0\"`}),`, uses `,_jsx(_components.code,{children:`\"AI-Assisted\"`}),` instead of lightly or moderately assisted window labels, and keeps `,_jsx(_components.code,{children:`confidence`}),` as `,_jsx(_components.code,{children:`\"Low\"`}),`, `,_jsx(_components.code,{children:`\"Medium\"`}),`, or `,_jsx(_components.code,{children:`\"High\"`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`40`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`40`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STAGE_SUCCESS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI-assisted passage. Human passage.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"4.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"headline\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI Assisted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prediction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"We believe that this text is a mix of AI-assisted and human-written content.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prediction_short\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mixed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fraction_ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fraction_ai_assisted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fraction_human\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"num_ai_segments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"num_ai_assisted_segments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"num_human_segments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"windows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI-assisted passage. \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI-Assisted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ai_assistance_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.55`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"confidence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"High\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"start_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"end_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`21`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"word_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token_length\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_humanized\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"humanizer_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.91`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Human passage.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Human Written\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ai_assistance_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.02`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"confidence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"start_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`21`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"end_index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`35`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"word_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token_length\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_humanized\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"humanizer_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Failed Response`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STAGE_FAILED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"headline\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"preprocessing: Input text contains no valid text after preprocessing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prediction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prediction_short\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fraction_ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fraction_ai_assisted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fraction_human\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"num_ai_segments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"num_ai_assisted_segments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"num_human_segments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"windows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\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":{"config":{},"pageMetadata":{"title":"AI Detection","description":"Detect AI-generated and AI-assisted text using the async inference API","api":"POST https://text.external-api.pangram.com/task","href":"/api-reference/ai-detection"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Async inference API","slug":"async-inference-api","depth":1,"children":[]},{"title":"POST /task","slug":"post-/task","depth":2,"children":[{"title":"Request","slug":"request","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Example","slug":"example","depth":3,"children":[]},{"title":"Model selection errors","slug":"model-selection-errors","depth":3,"children":[]}]},{"title":"GET /task/","slug":"get-/task/","depth":2,"children":[{"title":"Request","slug":"request-2","depth":3,"children":[]},{"title":"Response","slug":"response-2","depth":3,"children":[]},{"title":"Example","slug":"example-2","depth":3,"children":[]}]}],"codeExamples":{},"endpoint":{"title":"AI Detection","path":"/task","servers":[{"url":"https://text.external-api.pangram.com"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"task_id":{"schema":[{"type":"string","description":"The task ID returned by `POST /task` .","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"text":[{"type":"string","description":"The input text to analyze.","required":true}],"model":[{"type":"string","description":"A model selector returned by `GET /models` ."}],"public_dashboard_link":[{"type":"boolean","description":"Whether to include a public dashboard link in the completed response."}]}}],"examples":{"example":{"value":{"text":"\u003cstring>","model":"\u003cstring>","public_dashboard_link":true}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"task_id":[{"type":"string","description":"The ID of the async inference task. Present while the task is in progress."}],"stage":[{"type":"string","description":"Current task stage. Terminal stages are `STAGE_SUCCESS` and `STAGE_FAILED` ."}],"text":[{"type":"string","description":"The analyzed text returned by the model. Pangram 4 may normalize the submitted text before inference; window offsets refer to this returned value. Present on success."}],"version":[{"type":"string","description":"The API version identifier (e.g., `\"4.0\"` for Pangram 4). Present on success."}],"headline":[{"type":"string","description":"Classification headline summarizing the result. Present on success."}],"prediction":[{"type":"string","description":"Long-form prediction string describing the classification. Present on success."}],"prediction_short":[{"type":"string","description":"Short-form prediction string. Pangram 4 returns `\"AI\"` , `\"Human\"` , or `\"Mixed\"` . Present on success."}],"fraction_ai":[{"type":"number","description":"Fraction of text classified as AI-written (0.0–1.0). Present on success."}],"fraction_ai_assisted":[{"type":"number","description":"Fraction of text classified as AI-assisted (0.0–1.0). Present on success."}],"fraction_human":[{"type":"number","description":"Fraction of text classified as human-written (0.0–1.0). Present on success."}],"num_ai_segments":[{"type":"integer","description":"Number of text segments classified as AI. Present on success."}],"num_ai_assisted_segments":[{"type":"integer","description":"Number of text segments classified as AI-assisted. Present on success."}],"num_human_segments":[{"type":"integer","description":"Number of text segments classified as human. Present on success."}],"dashboard_link":[{"type":"string","description":"A link to the dashboard page containing the full classification result. Present on success when `public_dashboard_link` is `true` ."}],"windows":[{"type":"array","items":[{"type":"object","properties":{"text":[{"type":"string","description":"The window text."}],"label":[{"type":"string","description":"Descriptive classification label. Pangram 4 returns `\"AI-Generated\"` , `\"AI-Assisted\"` , or `\"Human Written\"` ."}],"ai_assistance_score":[{"type":"number","description":"detailing the level of AI assistance (0.0–1.0)."}],"confidence":[{"type":"string","description":"for the classification ( `\"High\"` , `\"Medium\"` , `\"Low\"` )."}],"start_index":[{"type":"integer","description":"Starting character index in the returned top-level `text` ."}],"end_index":[{"type":"integer","description":"End-exclusive character index in the returned top-level `text` ."}],"word_count":[{"type":"integer","description":"Number of words in the window."}],"token_length":[{"type":"integer","description":"Token length of the window."}],"is_humanized":[{"type":"boolean","description":"Whether Pangram 4’s humanizer head classified the window as humanized. Present on every Pangram 4 window."}],"humanizer_score":[{"type":"number","description":"Pangram 4 humanizer-head score from 0.0–1.0. Present on every Pangram 4 window."}]}}],"description":"List of text segments ( ) analyzed individually. Present on success."}]}}],"examples":{"example":{"value":{"task_id":"\u003cstring>","stage":"\u003cstring>","text":"\u003cstring>","version":"\u003cstring>","headline":"\u003cstring>","prediction":"\u003cstring>","prediction_short":"\u003cstring>","fraction_ai":123,"fraction_ai_assisted":123,"fraction_human":123,"num_ai_segments":123,"num_ai_assisted_segments":123,"num_human_segments":123,"dashboard_link":"\u003cstring>","windows":[{"text":"\u003cstring>","label":"\u003cstring>","ai_assistance_score":123,"confidence":"\u003cstring>","start_index":123,"end_index":123,"word_count":123,"token_length":123,"is_humanized":true,"humanizer_score":123}]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"pangram","siteName":"Pangram Labs","title":"AI Detection - Pangram Labs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-29T16:23:32.650Z","originalFileLocation":"api-reference/ai-detection.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=\"Detect AI-generated and AI-assisted text using the async inference API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pangram Labs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"AI Detection - Pangram Labs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Detect AI-generated and AI-assisted text using the async inference API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pangram Labs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pangram.com/api-reference/ai-detection\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pangram.mintlify.app/_mintlify/api/og/v2?division=REST+API\u0026amp;title=AI+Detection\u0026amp;description=Detect+AI-generated+and+AI-assisted+text+using+the+async+inference+API\u0026amp;theme=cb37fc8d980168bbfcb03871\u0026amp;signature=8f698094e1857fecbe1970584787c49d0d52ba12ea584b33953920aea130580f\">\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=\"AI Detection - Pangram Labs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Detect AI-generated and AI-assisted text using the async inference API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pangram.mintlify.app/_mintlify/api/og/v2?division=REST+API\u0026amp;title=AI+Detection\u0026amp;description=Detect+AI-generated+and+AI-assisted+text+using+the+async+inference+API\u0026amp;theme=cb37fc8d980168bbfcb03871\u0026amp;signature=8f698094e1857fecbe1970584787c49d0d52ba12ea584b33953920aea130580f\">\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/pangram/fGA1EnuUts9ZN6hv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pangram Labs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF6106\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pangram.com/api-reference/ai-detection\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/ai-detection.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pangram.com/#organization\",\"name\":\"Pangram Labs\",\"url\":\"https://docs.pangram.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/logo/light.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=8b5e8d04b0d2aeb0cb557c7688a29f65\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pangram.com#website\",\"name\":\"Pangram Labs\",\"url\":\"https://docs.pangram.com\",\"publisher\":{\"@id\":\"https://docs.pangram.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pangram.com/api-reference/ai-detection#webpage\",\"url\":\"https://docs.pangram.com/api-reference/ai-detection\",\"name\":\"AI Detection\",\"description\":\"Detect AI-generated and AI-assisted text using the async inference API\",\"dateModified\":\"2026-07-29T16:23:32.650Z\",\"isPartOf\":{\"@id\":\"https://docs.pangram.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pangram.com/api-reference/ai-detection#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pangram.com/api-reference/ai-detection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"REST API\",\"item\":\"https://docs.pangram.com/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Detection\",\"item\":\"https://docs.pangram.com/api-reference/ai-detection\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.pangram.com/api-reference/ai-detection#apireference\",\"headline\":\"AI Detection\",\"name\":\"AI Detection\",\"description\":\"Detect AI-generated and AI-assisted text using the async inference API\",\"url\":\"https://docs.pangram.com/api-reference/ai-detection\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pangram.com/api-reference/ai-detection#webpage\"},\"dateModified\":\"2026-07-29T16:23:32.650Z\",\"publisher\":{\"@id\":\"https://docs.pangram.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pangram.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pangram Labs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Pangram Labs","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Python SDK","pages":[{"title":"Python SDK","href":"/sdk/python"}]},{"tab":"REST API","groups":[{"group":"REST API","pages":[{"title":"API Overview","href":"/api-reference/introduction"},{"title":"Models","description":"Discover the AI detection models available to your API key","api":"GET https://text.external-api.pangram.com/models","href":"/api-reference/models"},{"title":"AI Detection","api":"POST https://text.external-api.pangram.com/task","href":"/api-reference/ai-detection"},{"title":"Bulk API","description":"Submit asynchronous AI detection jobs for many texts","api":"POST https://text.external-api.pangram.com/bulk","href":"/api-reference/bulk-api"},{"title":"File Upload","openapi":"openapi/file-upload.json POST /","href":"/api-reference/file-external"},{"title":"Plagiarism Detection","api":"POST https://plagiarism.api.pangram.com","href":"/api-reference/plagiarism-detection"}]},{"group":"Deprecated","pages":[{"title":"Deprecated Endpoints","href":"/api-reference/deprecated-endpoints"}]}]}]},"title":"AI Detection - Pangram Labs","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js"]}