You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询Form Recognizer中AnalyzeWithCustomModel接口的请求体格式

AnalyzeWithCustomModel API Request Body Format for Form Recognizer

Got it, let's break down the request body options for the AnalyzeWithCustomModel API—since you already have a trained model and can make valid calls via Postman, this should map directly to your workflow.

There are two primary supported request body formats, depending on how you want to submit your document:

1. Direct Binary Document Upload

This is the most common approach if you're submitting a local file (like from your machine) via Postman.

  • Request Header Requirement: Set the Content-Type header to match your document's format. Supported values include:
    • application/pdf for PDF files
    • image/jpeg for JPG images
    • image/png for PNG images
    • image/bmp for BMP images
    • image/tiff for TIFF images
  • Request Body: The raw binary content of your document. In Postman, you'd select the Body tab, choose binary, then upload your file directly.

2. Document URL Reference

If your document is hosted at a publicly accessible URL (or an Azure Storage URL with a SAS token), you can submit a JSON payload pointing to that location instead.

  • Request Header Requirement: Set the Content-Type header to application/json
  • Request Body Format: A JSON object with a single required field:
    {
      "sourceUrl": "https://your-hosted-document-location.com/document.pdf"
    }
    
  • Notes: The URL must be publicly accessible (no local network URLs). If using Azure Blob Storage, append a valid SAS token to the URL to grant temporary access.

Optional Additional Field

You can include the includeTextDetails boolean field in the JSON payload (for URL submissions) to get granular text extraction details alongside form results:

{
  "sourceUrl": "https://example.com/your-form.pdf",
  "includeTextDetails": true
}

Key Notes to Remember

  • Supported document sizes: Up to 50MB (check the latest API version for any updates)
  • Multi-page PDFs and multi-page TIFFs are supported, but ensure your model was trained on similar document structures
  • Always confirm your trained model ID is correctly included in the API endpoint path (e.g., https://<your-resource-region>.cognitiveservices.azure.com/formrecognizer/v2.1/custom/models/<your-model-id>/analyze)

内容的提问来源于stack exchange,提问作者SonOfNye

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:26:53