This API extracts specified fields from contract content. You provide a contract URL and a list of fields to extract, and the service returns the extracted field values.
Operation description
Before using this API, review the Alibaba Cloud FaRui billing model and pricing.
- You must enable the FaRui pay-as-you-go service. Activation is free. Then, use your account's AccessKey and AccessSecret to call the OpenAPI service.
- You need workspace permissions in Alibaba Cloud Model Studio to call this API.
Try it now
Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.
RAM authorization
No authorization for this operation. If you encounter issues with this operation, contact technical support.
Request syntax
Path Parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | No | Workspace ID in Alibaba Cloud Model Studio | llm-sds12344 |
Request parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| appId | string | No | Application ID | farui |
| regionId | string | No | Region ID | cn-hangzhou |
| fileOssUrl | string | Yes | Publicly accessible OSS URL of the file | ttps://xxxxx.oss-cn-hangzhou.aliyuncs.com/legalmind/userdownload/4a83e0fe-baee-41d5-89f6-e33c8d462839/contract/report/9ce843d2-a05e-4351-9d69-15ae96bd910a_1713348901026.pdf |
| fieldsToExtract | array<object> | No | Fields to extract | |
object | No | Field | ||
| extractItem | string | No | Name of the field to extract | Party B entity name |
| option | array | No | Fixed enumeration values for the field | |
string | No | Field enumeration | "Fixed amount" | |
| desc | string | No | Description of the field to extract | Optional when the amount type is income or expenditure |
Response elements
Element | Type | Description | Example |
|---|---|---|---|
object | Response schema | ||
| requestId | string | Request ID | C844BE6B-33A9-5AC4-A1AE-97B131849E0F |
| data | object | Response data | |
| contractText | string | Contract content | Technical service cooperation agreement signed by Party A and Party B... |
| extractResult | array<object> | Extraction results | |
array<object> | Extraction result entity | ||
| extractItem | string | Name of the extracted field | Contract number |
| option | string | Fixed enumeration value of the extracted field | null |
| desc | string | Description of the extracted field | Unique identifier of the contract, in the format HT-YYYY-XXXXX |
| value | array<object> | Value of the extracted field | |
object | Extracted field | ||
| data | string | Value of the extracted field | HT-2022-0001 |
| originalText | string | Original text of the extracted field | Contract number: HT-2022-0001 |
| httpStatusCode | integer | HTTP status code | 200 |
| code | string | Response status code | 200 |
| success | boolean | Whether the call succeeded | True |
| message | string | Error message | Error |
Examples
Success response
JSON format