[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69AVDGZG8J945ZTN6ZQH44P":3,"skill-same:01M69AVDGZG8J945ZTN6ZQH44P":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":64,"ownerHtmlUrl":65,"ownerBlogUrl":66,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M69AVDGZG8J945ZTN6ZQH44P","azure-ai-document-intelligence-ts","Azure AI 文档智能提取","Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest\u002Fai-document-intelligence). Use when processing invoices, receipts, IDs, forms, or building custom document models.","使用 Azure 文档智能（@azure-rest\u002Fai-document-intelligence）从文档中提取文本、表格和结构化数据。适用于处理发票、收据、身份证件、表单，或构建自定义文档模型。","microsoft\u002Fskills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AJYYW4E1RMSYCQDJ4FJSH",3204,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-typescript\u002Fskills\u002Fazure-ai-document-intelligence-ts\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TK1MPB82068236GSXDE","文档处理","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,10],"azure ai","azure","azure ai document intelligence ts","intelligence","document","text","when","custom","invoices","tables","azure document intelligence","processing","forms","use","structured data","receipts","ids","REST","data","documents","2026-11-10 10:12:30",false,"---\nname: azure-ai-document-intelligence-ts\ndescription: Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest\u002Fai-document-intelligence). Use when processing invoices, receipts, IDs, forms, or building custom document models.\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: '@azure-rest\u002Fai-document-intelligence'\n---\n\n# Azure Document Intelligence REST SDK for TypeScript\n\nExtract text, tables, and structured data from documents using prebuilt and custom models.\n\n## Installation\n\n```bash\nnpm install @azure-rest\u002Fai-document-intelligence @azure\u002Fidentity\n```\n\n## Environment Variables\n\n```bash\nDOCUMENT_INTELLIGENCE_ENDPOINT=https:\u002F\u002F\u003Cresource>.cognitiveservices.azure.com\nDOCUMENT_INTELLIGENCE_API_KEY=\u003Capi-key>\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\n```\n\n## Authentication\n\n**Important**: This is a REST client. `DocumentIntelligence` is a **function**, not a class.\n\n### DefaultAzureCredential\n\n```typescript\nimport DocumentIntelligence from \"@azure-rest\u002Fai-document-intelligence\";\nimport { DefaultAzureCredential, ManagedIdentityCredential } from \"@azure\u002Fidentity\";\n\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nconst credential = new DefaultAzureCredential({requiredEnvVars: [\"AZURE_TOKEN_CREDENTIALS\"]});\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjavascript\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-node-latest#credential-classes\n\u002F\u002F const credential = new ManagedIdentityCredential();\n\nconst client = DocumentIntelligence(\n  process.env.DOCUMENT_INTELLIGENCE_ENDPOINT!,\n  credential\n);\n```\n\n### API Key\n\n```typescript\nimport DocumentIntelligence from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst client = DocumentIntelligence(\n  process.env.DOCUMENT_INTELLIGENCE_ENDPOINT!,\n  { key: process.env.DOCUMENT_INTELLIGENCE_API_KEY! }\n);\n```\n\n## Analyze Document (URL)\n\n```typescript\nimport DocumentIntelligence, {\n  isUnexpected,\n  getLongRunningPoller,\n  AnalyzeOperationOutput\n} from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-layout\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: {\n      urlSource: \"https:\u002F\u002Fexample.com\u002Fdocument.pdf\"\n    },\n    queryParameters: { locale: \"en-US\" }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n\nconsole.log(\"Pages:\", result.analyzeResult?.pages?.length);\nconsole.log(\"Tables:\", result.analyzeResult?.tables?.length);\n```\n\n## Analyze Document (Local File)\n\n```typescript\nimport { readFile } from \"node:fs\u002Fpromises\";\n\nconst fileBuffer = await readFile(\".\u002Fdocument.pdf\");\nconst base64Source = fileBuffer.toString(\"base64\");\n\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-invoice\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { base64Source }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n```\n\n## Prebuilt Models\n\n| Model ID | Description |\n|----------|-------------|\n| `prebuilt-read` | OCR - text and language extraction |\n| `prebuilt-layout` | Text, tables, selection marks, structure |\n| `prebuilt-invoice` | Invoice fields |\n| `prebuilt-receipt` | Receipt fields |\n| `prebuilt-idDocument` | ID document fields |\n| `prebuilt-tax.us.w2` | W-2 tax form fields |\n| `prebuilt-healthInsuranceCard.us` | Health insurance card fields |\n| `prebuilt-contract` | Contract fields |\n| `prebuilt-bankStatement.us` | Bank statement fields |\n\n## Extract Invoice Fields\n\n```typescript\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-invoice\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { urlSource: invoiceUrl }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n\nconst invoice = result.analyzeResult?.documents?.[0];\nif (invoice) {\n  console.log(\"Vendor:\", invoice.fields?.VendorName?.content);\n  console.log(\"Total:\", invoice.fields?.InvoiceTotal?.content);\n  console.log(\"Due Date:\", invoice.fields?.DueDate?.content);\n}\n```\n\n## Extract Receipt Fields\n\n```typescript\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-receipt\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { urlSource: receiptUrl }\n  });\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n\nconst receipt = result.analyzeResult?.documents?.[0];\nif (receipt) {\n  console.log(\"Merchant:\", receipt.fields?.MerchantName?.content);\n  console.log(\"Total:\", receipt.fields?.Total?.content);\n  \n  for (const item of receipt.fields?.Items?.values || []) {\n    console.log(\"Item:\", item.properties?.Description?.content);\n    console.log(\"Price:\", item.properties?.TotalPrice?.content);\n  }\n}\n```\n\n## List Document Models\n\n```typescript\nimport DocumentIntelligence, { isUnexpected, paginate } from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst response = await client.path(\"\u002FdocumentModels\").get();\n\nif (isUnexpected(response)) {\n  throw response.body.error;\n}\n\nfor await (const model of paginate(client, response)) {\n  console.log(model.modelId);\n}\n```\n\n## Build Custom Model\n\n```typescript\nconst initialResponse = await client.path(\"\u002FdocumentModels:build\").post({\n  body: {\n    modelId: \"my-custom-model\",\n    description: \"Custom model for purchase orders\",\n    buildMode: \"template\",  \u002F\u002F or \"neural\"\n    azureBlobSource: {\n      containerUrl: process.env.TRAINING_CONTAINER_SAS_URL!,\n      prefix: \"training-data\u002F\"\n    }\n  }\n});\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = await poller.pollUntilDone();\nconsole.log(\"Model built:\", result.body);\n```\n\n## Build Document Classifier\n\n```typescript\nimport { DocumentClassifierBuildOperationDetailsOutput } from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst containerSasUrl = process.env.TRAINING_CONTAINER_SAS_URL!;\n\nconst initialResponse = await client.path(\"\u002FdocumentClassifiers:build\").post({\n  body: {\n    classifierId: \"my-classifier\",\n    description: \"Invoice vs Receipt classifier\",\n    docTypes: {\n      invoices: {\n        azureBlobSource: { containerUrl: containerSasUrl, prefix: \"invoices\u002F\" }\n      },\n      receipts: {\n        azureBlobSource: { containerUrl: containerSasUrl, prefix: \"receipts\u002F\" }\n      }\n    }\n  }\n});\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as DocumentClassifierBuildOperationDetailsOutput;\nconsole.log(\"Classifier:\", result.result?.classifierId);\n```\n\n## Classify Document\n\n```typescript\nconst initialResponse = await client\n  .path(\"\u002FdocumentClassifiers\u002F{classifierId}:analyze\", \"my-classifier\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { urlSource: documentUrl },\n    queryParameters: { split: \"auto\" }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = await poller.pollUntilDone();\nconsole.log(\"Classification:\", result.body.analyzeResult?.documents);\n```\n\n## Get Service Info\n\n```typescript\nconst response = await client.path(\"\u002Finfo\").get();\n\nif (isUnexpected(response)) {\n  throw response.body.error;\n}\n\nconsole.log(\"Custom model limit:\", response.body.customDocumentModels.limit);\nconsole.log(\"Custom model count:\", response.body.customDocumentModels.count);\n```\n\n## Polling Pattern\n\n```typescript\nimport DocumentIntelligence, {\n  isUnexpected,\n  getLongRunningPoller,\n  AnalyzeOperationOutput\n} from \"@azure-rest\u002Fai-document-intelligence\";\n\n\u002F\u002F 1. Start operation\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-layout\")\n  .post({ contentType: \"application\u002Fjson\", body: { urlSource } });\n\n\u002F\u002F 2. Check for errors\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\n\u002F\u002F 3. Create poller\nconst poller = getLongRunningPoller(client, initialResponse);\n\n\u002F\u002F 4. Optional: Monitor progress\npoller.onProgress((state) => {\n  console.log(\"Status:\", state.status);\n});\n\n\u002F\u002F 5. Wait for completion\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n```\n\n## Key Types\n\n```typescript\nimport DocumentIntelligence, {\n  isUnexpected,\n  getLongRunningPoller,\n  paginate,\n  parseResultIdFromResponse,\n  AnalyzeOperationOutput,\n  DocumentClassifierBuildOperationDetailsOutput\n} from \"@azure-rest\u002Fai-document-intelligence\";\n```\n\n## Best Practices\n\n1. **Use getLongRunningPoller()** - Document analysis is async, always poll for results\n2. **Check isUnexpected()** - Type guard for proper error handling\n3. **Choose the right model** - Use prebuilt models when possible, custom for specialized docs\n4. **Handle confidence scores** - Fields have confidence values, set thresholds for your use case\n5. **Use pagination** - Use `paginate()` helper for listing models\n6. **Prefer neural mode** - For custom models, neural handles more variation than template\n","# Azure Document Intelligence REST SDK for TypeScript\n\nExtract text, tables, and structured data from documents using prebuilt and custom models.\n\n## Installation\n\n```bash\nnpm install @azure-rest\u002Fai-document-intelligence @azure\u002Fidentity\n```\n\n## Environment Variables\n\n```bash\nDOCUMENT_INTELLIGENCE_ENDPOINT=https:\u002F\u002F\u003Cresource>.cognitiveservices.azure.com\nDOCUMENT_INTELLIGENCE_API_KEY=\u003Capi-key>\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\n```\n\n## Authentication\n\n**Important**: This is a REST client. `DocumentIntelligence` is a **function**, not a class.\n\n### DefaultAzureCredential\n\n```typescript\nimport DocumentIntelligence from \"@azure-rest\u002Fai-document-intelligence\";\nimport { DefaultAzureCredential, ManagedIdentityCredential } from \"@azure\u002Fidentity\";\n\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nconst credential = new DefaultAzureCredential({requiredEnvVars: [\"AZURE_TOKEN_CREDENTIALS\"]});\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjavascript\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-node-latest#credential-classes\n\u002F\u002F const credential = new ManagedIdentityCredential();\n\nconst client = DocumentIntelligence(\n  process.env.DOCUMENT_INTELLIGENCE_ENDPOINT!,\n  credential\n);\n```\n\n### API Key\n\n```typescript\nimport DocumentIntelligence from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst client = DocumentIntelligence(\n  process.env.DOCUMENT_INTELLIGENCE_ENDPOINT!,\n  { key: process.env.DOCUMENT_INTELLIGENCE_API_KEY! }\n);\n```\n\n## Analyze Document (URL)\n\n```typescript\nimport DocumentIntelligence, {\n  isUnexpected,\n  getLongRunningPoller,\n  AnalyzeOperationOutput\n} from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-layout\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: {\n      urlSource: \"https:\u002F\u002Fexample.com\u002Fdocument.pdf\"\n    },\n    queryParameters: { locale: \"en-US\" }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n\nconsole.log(\"Pages:\", result.analyzeResult?.pages?.length);\nconsole.log(\"Tables:\", result.analyzeResult?.tables?.length);\n```\n\n## Analyze Document (Local File)\n\n```typescript\nimport { readFile } from \"node:fs\u002Fpromises\";\n\nconst fileBuffer = await readFile(\".\u002Fdocument.pdf\");\nconst base64Source = fileBuffer.toString(\"base64\");\n\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-invoice\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { base64Source }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n```\n\n## Prebuilt Models\n\n| Model ID | Description |\n|----------|-------------|\n| `prebuilt-read` | OCR - text and language extraction |\n| `prebuilt-layout` | Text, tables, selection marks, structure |\n| `prebuilt-invoice` | Invoice fields |\n| `prebuilt-receipt` | Receipt fields |\n| `prebuilt-idDocument` | ID document fields |\n| `prebuilt-tax.us.w2` | W-2 tax form fields |\n| `prebuilt-healthInsuranceCard.us` | Health insurance card fields |\n| `prebuilt-contract` | Contract fields |\n| `prebuilt-bankStatement.us` | Bank statement fields |\n\n## Extract Invoice Fields\n\n```typescript\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-invoice\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { urlSource: invoiceUrl }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n\nconst invoice = result.analyzeResult?.documents?.[0];\nif (invoice) {\n  console.log(\"Vendor:\", invoice.fields?.VendorName?.content);\n  console.log(\"Total:\", invoice.fields?.InvoiceTotal?.content);\n  console.log(\"Due Date:\", invoice.fields?.DueDate?.content);\n}\n```\n\n## Extract Receipt Fields\n\n```typescript\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-receipt\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { urlSource: receiptUrl }\n  });\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n\nconst receipt = result.analyzeResult?.documents?.[0];\nif (receipt) {\n  console.log(\"Merchant:\", receipt.fields?.MerchantName?.content);\n  console.log(\"Total:\", receipt.fields?.Total?.content);\n  \n  for (const item of receipt.fields?.Items?.values || []) {\n    console.log(\"Item:\", item.properties?.Description?.content);\n    console.log(\"Price:\", item.properties?.TotalPrice?.content);\n  }\n}\n```\n\n## List Document Models\n\n```typescript\nimport DocumentIntelligence, { isUnexpected, paginate } from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst response = await client.path(\"\u002FdocumentModels\").get();\n\nif (isUnexpected(response)) {\n  throw response.body.error;\n}\n\nfor await (const model of paginate(client, response)) {\n  console.log(model.modelId);\n}\n```\n\n## Build Custom Model\n\n```typescript\nconst initialResponse = await client.path(\"\u002FdocumentModels:build\").post({\n  body: {\n    modelId: \"my-custom-model\",\n    description: \"Custom model for purchase orders\",\n    buildMode: \"template\",  \u002F\u002F or \"neural\"\n    azureBlobSource: {\n      containerUrl: process.env.TRAINING_CONTAINER_SAS_URL!,\n      prefix: \"training-data\u002F\"\n    }\n  }\n});\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = await poller.pollUntilDone();\nconsole.log(\"Model built:\", result.body);\n```\n\n## Build Document Classifier\n\n```typescript\nimport { DocumentClassifierBuildOperationDetailsOutput } from \"@azure-rest\u002Fai-document-intelligence\";\n\nconst containerSasUrl = process.env.TRAINING_CONTAINER_SAS_URL!;\n\nconst initialResponse = await client.path(\"\u002FdocumentClassifiers:build\").post({\n  body: {\n    classifierId: \"my-classifier\",\n    description: \"Invoice vs Receipt classifier\",\n    docTypes: {\n      invoices: {\n        azureBlobSource: { containerUrl: containerSasUrl, prefix: \"invoices\u002F\" }\n      },\n      receipts: {\n        azureBlobSource: { containerUrl: containerSasUrl, prefix: \"receipts\u002F\" }\n      }\n    }\n  }\n});\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = (await poller.pollUntilDone()).body as DocumentClassifierBuildOperationDetailsOutput;\nconsole.log(\"Classifier:\", result.result?.classifierId);\n```\n\n## Classify Document\n\n```typescript\nconst initialResponse = await client\n  .path(\"\u002FdocumentClassifiers\u002F{classifierId}:analyze\", \"my-classifier\")\n  .post({\n    contentType: \"application\u002Fjson\",\n    body: { urlSource: documentUrl },\n    queryParameters: { split: \"auto\" }\n  });\n\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\nconst poller = getLongRunningPoller(client, initialResponse);\nconst result = await poller.pollUntilDone();\nconsole.log(\"Classification:\", result.body.analyzeResult?.documents);\n```\n\n## Get Service Info\n\n```typescript\nconst response = await client.path(\"\u002Finfo\").get();\n\nif (isUnexpected(response)) {\n  throw response.body.error;\n}\n\nconsole.log(\"Custom model limit:\", response.body.customDocumentModels.limit);\nconsole.log(\"Custom model count:\", response.body.customDocumentModels.count);\n```\n\n## Polling Pattern\n\n```typescript\nimport DocumentIntelligence, {\n  isUnexpected,\n  getLongRunningPoller,\n  AnalyzeOperationOutput\n} from \"@azure-rest\u002Fai-document-intelligence\";\n\n\u002F\u002F 1. Start operation\nconst initialResponse = await client\n  .path(\"\u002FdocumentModels\u002F{modelId}:analyze\", \"prebuilt-layout\")\n  .post({ contentType: \"application\u002Fjson\", body: { urlSource } });\n\n\u002F\u002F 2. Check for errors\nif (isUnexpected(initialResponse)) {\n  throw initialResponse.body.error;\n}\n\n\u002F\u002F 3. Create poller\nconst poller = getLongRunningPoller(client, initialResponse);\n\n\u002F\u002F 4. Optional: Monitor progress\npoller.onProgress((state) => {\n  console.log(\"Status:\", state.status);\n});\n\n\u002F\u002F 5. Wait for completion\nconst result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;\n```\n\n## Key Types\n\n```typescript\nimport DocumentIntelligence, {\n  isUnexpected,\n  getLongRunningPoller,\n  paginate,\n  parseResultIdFromResponse,\n  AnalyzeOperationOutput,\n  DocumentClassifierBuildOperationDetailsOutput\n} from \"@azure-rest\u002Fai-document-intelligence\";\n```\n\n## Best Practices\n\n1. **Use getLongRunningPoller()** - Document analysis is async, always poll for results\n2. **Check isUnexpected()** - Type guard for proper error handling\n3. **Choose the right model** - Use prebuilt models when possible, custom for specialized docs\n4. **Handle confidence scores** - Fields have confidence values, set thresholds for your use case\n5. **Use pagination** - Use `paginate()` helper for listing models\n6. **Prefer neural mode** - For custom models, neural handles more variation than template\n",{"name":5,"license":16,"metadata":56,"description":7},{"author":13,"package":57,"version":58},"@azure-rest\u002Fai-document-intelligence","1.0.0","main","3f5b461b2314e01c400564051e92469114c5b68f",".github\u002Fplugins\u002Fazure-sdk-typescript\u002Fskills\u002Fazure-ai-document-intelligence-ts",368,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","https:\u002F\u002Fmicrosoft.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 06:48:25",{"source":9,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add microsoft\u002Fskills --skill azure-ai-document-intelligence-ts",{"tool":75,"command":76},"bunx","bunx skills add microsoft\u002Fskills --skill azure-ai-document-intelligence-ts",{"tool":78,"command":79},"pnpm","pnpm dlx skills add microsoft\u002Fskills --skill azure-ai-document-intelligence-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-typescript\u002Fskills\u002Fazure-ai-document-intelligence-ts\u002FSKILL.md",true,[],[84,92,120,155,189,215],{"skillNo":85,"name":86,"nameZh":17,"description":87,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M741JBE1VH8A2Y3FXX2P7386","azure-advisor-cost-optimization","Analyze Azure Advisor Cost\u002FIdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: \"find unused Azure resources\", \"what resources am I paying for but no longer using\", \"idle-resource savings\", \"historical idle-resource savings\", \"are these idle resources safe to delete\". Generic Cost, other subcategories, and cross-category requests use azure-advisor.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-advisor\u002Fskills\u002Fazure-advisor-cost-optimization\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":93,"name":94,"nameZh":95,"description":96,"descriptionZh":97,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":98,"categories":99,"keywords":104,"publishedAt":51},"01M69B4JCRQV5SPXAFCKXQRV0H","skill-creator","Azure 技能创建与更新指南","Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.","面向使用 Azure SDK 和 Microsoft Foundry 服务的 AI 编码智能体，指导其创建高效技能的指南。在创建新技能或更新现有技能时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fskill-creator\u002FSKILL.md",[100,103],{"categoryNo":101,"categoryName":102,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[105,106,107,108,10,32,109,110,111,112,113,44,114,115,116,37,117,118,119],"skill creator","creator","ai coding agents","coding agents","foundry","microsoft foundry","coding","guide","for","Existing","services","new","sdks","with","ai coding",{"skillNo":121,"name":122,"nameZh":123,"description":124,"descriptionZh":125,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":126,"categories":127,"keywords":134,"publishedAt":51},"01M69B4FD57V1MYKRWAJJECTZ7","podcast-generation","AI 播客音频生成","Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.","通过 WebSocket 使用 Azure OpenAI 的 GPT Realtime Mini 模型生成 AI 驱动的播客式音频叙述。当构建文本转语音功能、音频叙述生成、根据内容制作播客，或集成 Azure OpenAI Realtime API 以获得真实音频输出时使用。涵盖从 React 前端到 Python FastAPI 后端及 WebSocket 流式传输的全栈实现。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpodcast-generation\u002FSKILL.md",[128,131],{"categoryNo":129,"categoryName":130,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V816HPKFXP1YV56C07K","多媒体工程师",{"categoryNo":132,"categoryName":133,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR82CCRKG2HNYVFH5H6GZ0","音频与语音处理",[135,136,137,138,32,139,140,141,142,143,144,145,146,147,148,37,149,150,36,151,152,153,154],"podcast generation","generation","podcast","frontend","azure openai","realtime","react","python","Audio","creation","model","fastapi backend","python fastapi","fastapi","api","streaming","narrative","stack","generate","features",{"skillNo":156,"name":157,"nameZh":158,"description":159,"descriptionZh":160,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":161,"categories":162,"keywords":169,"publishedAt":51},"01M69B4CYPM5SESY5ZWEFDXEQZ","microsoft-docs","Microsoft 技术文档查询","Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention \"docs.\" If the question is about understanding a concept rather than writing code, this is the right skill.","通过查询官方文档来理解 Microsoft 技术。当用户询问某项技术的工作原理、想要教程、需要任何 Microsoft 技术（Azure、.NET、M365、Windows、Power Platform 等）的配置选项、限制、配额或最佳实践时使用——即使他们没有提到\"文档\"。如果问题是为了理解概念而非编写代码，那么这就是合适的技能。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmicrosoft-docs\u002FSKILL.md",[163,166],{"categoryNo":164,"categoryName":165,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考",{"categoryNo":167,"categoryName":168,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",[170,10,171,172,173,174,175,32,176,177,178,179,180,181,182,183,113,184,72,185,44,186,187,188],"microsoft docs","docs","documentation","windows","official","cli","MCP","writing","power platform","mcp server","back","concept","power","platform","technology","question","learn mcp","learn","best practices",{"skillNo":190,"name":191,"nameZh":192,"description":193,"descriptionZh":194,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":195,"categories":196,"keywords":201,"publishedAt":51},"01M69B49C3YPD1ZJ3NC0HPCY58","mcp-builder","MCP 服务器构建","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node\u002FTypeScript (MCP SDK), or C#\u002F.NET (Microsoft MCP SDK).","用于创建高质量 MCP（Model Context Protocol）服务器的指南，使大语言模型能够通过设计完善的工具与外部服务交互。当构建用于集成外部 API 或服务的 MCP 服务器时使用，无论采用 Python（FastMCP）、Node\u002FTypeScript（MCP SDK），还是 C#\u002F.NET（Microsoft MCP SDK）。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-builder\u002FSKILL.md",[197,198],{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":199,"categoryName":200,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[202,176,203,204,205,10,142,206,207,145,208,37,209,210,211,112,212,213,113,214,44,118],"mcp builder","builder","llms","sdk","typescript","model context protocol","building mcp servers","node","integrate","Tools","context","fastmcp","mcp sdk",{"skillNo":216,"name":217,"nameZh":218,"description":219,"descriptionZh":220,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":221,"categories":222,"keywords":229,"publishedAt":51},"01M69B467A7CDMFQ0T6Q0ZA12Q","kql","KQL 查询编写与调试","KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.","KQL 语言专业能力，用于编写正确且高效的 Kusto Query Language 查询。涵盖语法陷阱、join 模式、dynamic 类型、datetime 陷阱、regex 模式、序列化、内存管理、结果集规模控制，以及高级函数（geo、vector、graph）。在编写、调试或审查 KQL 查询时均使用本技能——即使是简单查询——因为陷阱章节可防止最常见的错误，避免浪费工具调用并引发代价高昂的连锁重试。触发条件：KQL、Kusto、ADX、Azure Data Explorer、Fabric Real-Time Intelligence、EventHouse、Log Analytics、日志分析、数据探索、时间序列、异常检测、summarize、where 子句、join、extend、project、let 语句、parse 运算符、extract 函数，以及任何提及管道式查询语法的情形。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",[223,226],{"categoryNo":224,"categoryName":225,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4CMBM6B4PWSM1NXGT9","数据分析与报告",{"categoryNo":227,"categoryName":228,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师",[217,32,177,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,113,246,247,248],"analytics","memory","summarize","exploration","parse","project","time","vector","join","log","pipe","datetime","discipline","time series","regex","anomaly","section","tool","geo"]