# Alibaba Cloud Farui API

> Alibaba Cloud Farui API on Apizie: 8 endpoints (Uploads a document to the contract review module. After the document is added, the system automatically…, This API extracts specified fields from contract content. You provide a contract URL and a list of fields to…, Generates contract review results for the contract review module by calling a large language model to return…, This operation uses a Large Language Model (LLM) to generate intelligent contract review rules. It returns…, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/cloud:aliyun-farui/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `cloud:aliyun-farui`
- Category: Cloud
- Status: byok
- Source: https://api.alibabacloud.com/product/farui
- Page: https://zieapi.vercel.app/api/cloud/aliyun-farui
- OpenAPI: https://zieapi.vercel.app/api/cloud/aliyun-farui/openapi.json

Alibaba Cloud OpenAPI for Farui (farui, version 2024-06-28). Calls are signed with ACS3-HMAC-SHA256 using your AccessKey ID and secret.

## Endpoints

### Uploads a document to the contract review module. After the document is added, the system automatically…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/create-text-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace in Alibaba Cloud Model Studio |
| ClientToken | string | no | The client token that is used to ensure the idempotence of the request. You can generate a parameter value on your client to ensure that… |
| CreateTime | string | no | The creation time. The value is a UNIX timestamp in seconds |
| TextFileName | string | no | The name of the uploaded file, including the file name extension |
| TextFileUrl | string | no | The download URL of the uploaded file. To upload a file directly, use the CreateFileAdvanceRequest operation in the SDK |
| ContractId | string | no | The contract ID, which is used in contract comparison scenarios. The ContractId is returned when you upload a file for the first time. If… |

### This API extracts specified fields from contract content. You provide a contract URL and a list of fields to…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/run-contract-extract` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID in Alibaba Cloud Model Studio |
| appId | string | no | Application ID |
| regionId | string | no | Region ID |
| fileOssUrl | string | yes | Publicly accessible OSS URL of the file |
| fieldsToExtract | string | no | Fields to extract (JSON-encoded) |

### Generates contract review results for the contract review module by calling a large language model to return…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/run-contract-result-generation` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| appId | string | no | The application ID |
| stream | string | no | Specifies whether to use streaming output |
| workspaceId | string | yes | The workspace ID of Alibaba Cloud Model Studio |
| assistant | string | no | The agent (JSON-encoded) |

### This operation uses a Large Language Model (LLM) to generate intelligent contract review rules. It returns…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/run-contract-rule-generation` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| appId | string | no | Application ID |
| stream | string | no | Set to true to enable streaming output |
| workspaceId | string | yes | Workspace ID on Alibaba Cloud Model Studio |
| assistant | string | no | Agent (JSON-encoded) |

### Provides legal consultation services
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/run-legal-advice-consultation` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| appId | string | no | The application ID |
| stream | string | no | Specifies whether the request is a streaming request |
| workspaceId | string | yes | The ID of the workspace in Alibaba Cloud Model Studio |
| assistant | string | no | The agent (JSON-encoded) |
| thread | string | no | The thread (JSON-encoded) |
| extra | string | no | Settings related to deep thinking. If this parameter is not specified, the response format of the previous version is used (JSON-encoded) |

### Retrieves relevant cases for a user-described question. After a user inputs a question, this operation calls…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/run-search-case-full-text` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace in Model Studio |
| appId | string | no | The ID of the application |
| thread | string | no | The thread (JSON-encoded) |
| query | string | yes | The question to query |
| queryKeywords | string | no | The array of search keywords (JSON-encoded) |
| pageParam | string | yes | The pagination parameters (JSON-encoded) |
| sortKeyAndDirection | string | no | The sort mapping (JSON-encoded) |
| filterCondition | string | no | The filter conditions (JSON-encoded) |
| referLevel | string | no | The case type. Valid values: Other, Reference, and Guiding. Default value: Other |

### This API is used to retrieve relevant regulations corresponding to a user-described question. After the user…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/run-search-law-query` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Alibaba Cloud Bailian Platform workspace ID |
| appId | string | no | Application ID |
| thread | string | no | Thread (JSON-encoded) |
| query | string | yes | Query question |
| queryKeywords | string | no | Keyword array (JSON-encoded) |
| pageParam | string | no | Pagination parameters (JSON-encoded) |
| filterCondition | string | no | Filter conditions (JSON-encoded) |

### version
`POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/version` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://farui.cn-beijing.aliyuncs.com |

## Example
```
curl "https://zieapi.vercel.app/v1/cloud:aliyun-farui/create-text-file" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Alibaba Cloud Farui API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/cloud:aliyun-farui/create-text-file with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Alibaba Cloud Farui API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Alibaba Cloud Farui itself also needs your own key from aliyuncs.com.

### Can AI agents use the Alibaba Cloud Farui API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key cloud:aliyun-farui.

### What is the status of the Alibaba Cloud Farui API?
Needs your own provider key (bring your own key)
