This API uploads documents to the contract review module. After a successful upload, the system automatically parses the file. The API returns a file ID that you can use to generate review rules and results. File parsing uses a queuing mechanism. If the queue is long, parsing may be delayed.
Operation description
- This API requires activation of the pay-as-you-go service for Farui products (activation is free of charge). You can use the AccessKey and AccessSecret of this account to call our OpenAPI service.
- Calling this API requires workspace permissions on the Alibaba Cloud Model Studio platform.
Debugging
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
Authorization information
No authorization information is available for this API.
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | No | Workspace ID of Alibaba Cloud Model Studio. | llm-9w5y60lseff0jiqm |
| ClientToken | string | No | Client token used to ensure request idempotency. Generate a parameter value from your client and make sure it is unique across different requests. ClientToken only supports ASCII characters. If you do not specify it, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may vary for each API request. | e9a93201-7e96-4dc1-9678-2832fc132d08 |
| CreateTime | string | No | Creation time. | 1714476549 |
| TextFileName | string | No | Uploaded file name (with extension). | test-file.docx |
| TextFileUrl | string | No | Download URL of the uploaded file. To upload a file directly, use the CreateFileAdvanceRequest of the SDK. | https://xx.test-file.docx |
| ContractId | string | No | Used in contract comparison scenarios. The first file upload returns a ContractId. If comparison is required, pass this parameter in the second upload and upload the standard document. | 123 |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| Code | string | Error code. | null |
| Data | object | File information returned when the call succeeds. | |
| TextFileId | string | ID of the created file. | 36d6447d277c4a1c9fd0def1d16341f1 |
| TextFileName | string | File name. | test-file.docx |
| TextFileUrl | string | File URL. | https://xx.test-file.docx |
| ContractId | string | Contract record. Pay attention to this value in comparison mode. | 11123 |
| HttpStatusCode | long | HTTP status code. | 200 |
| Message | string | If the request is abnormal, the specific error message returned. | null |
| RequestId | string | Id of the request | 81E6F6D2-8ACB-5BDA-9C7C-4D6268CD9652 |
| Success | boolean | Indicates whether the call is successful. true: The call is successful. false: The call failed. | True |
Examples
Success response
JSON format
Error codes
Visit the Error Center to view more error codes.
Change history
| Change time | Change summary | Operation |
|---|---|---|
| 2025-11-13 | OpenAPI input parameters changed, and the OpenAPI response structure changed. | View change details |