Generate extraction field prompts
Generate field names, field types, field prompts, and other configuration references from a sample document or prompt. Standard applications require at least one of prompt, file_url, or file_base64. High-speed applications still require file_url or file_base64, and prompt is only an auxiliary instruction. When app_id belongs to a high-speed custom extraction application, the endpoint returns a configuration preview containing common_rule, field_rule, and table_rule. It does not save a configuration version or automatically populate the Web application. An HTTP 200 response can still represent a business failure, so callers must check both the HTTP status and the response code.
Authorizations
Production API Key. You can find it under My API in the ADP platform. Make sure the API Key is active and belongs to the production environment.
Path Parameters
Tenant name. Default: laiye.
Body
- Option 1
- Option 2
- Option 3
Field configuration generation request. Standard applications require at least one of prompt, file_url, or file_base64. High-speed applications still require file_url or file_base64, and prompt is only supporting guidance. Because the application type is resolved from app_id, OpenAPI cannot fully express the two conditional contracts from request fields alone.
Application ID. When you pass a high-speed custom extraction application, the response returns a high-speed auto-configuration preview.
User-provided generation instruction. Standard applications can use prompt alone; high-speed applications must also provide a file.
Base64-encoded file. Required for high-speed applications if file_url is not provided.
File URL. Required for high-speed applications if file_base64 is not provided.
Document type. You can provide this for standard application recommendations. High-speed applications detect the document type automatically.
Document type description. You can provide this for standard application recommendations.