Skip to main content
POST
Create File Category

Authorizations

x-ti-app-id
string
header
required
x-ti-secret-code
string
header
required

Body

multipart/form-data
workspace_id
string
required

Workspace ID

Example:

"1234567890"

name
string
required

File category name

Maximum string length: 50
Example:

"Invoice"

extract_model
enum<string>
required

Extraction model

  • Auto: Automatically matches the extraction model
  • Acgpt: Fast speed with stable extraction results
  • Acgpt-VL: VLM, suitable for simple extraction (≤10 pages)
  • DF-M1: Suitable for complex document understanding
Available options:
Auto,
Acgpt,
Acgpt-VL,
DF-M1
Example:

"Acgpt"

sample_files
file[]
required

Sample file list; at least one file is required, and a category can contain at most 20 sample files in total

Required array length: 1 - 20 elements
fields
object[]
required

Field configuration list, at least one field must be configured

Minimum array length: 1
category_prompt
string

Prompt for classification

Maximum string length: 150
Example:

"VAT invoice, including fields such as invoice code, invoice number, etc."

category_keyword_rules
object

Category keyword rules. Positive groups are ORed; matching a negative group excludes the category. A category supports at most 10 positive groups and 1 negative group. Duplicate same-type groups are not allowed, and positive and negative rules must not contain the same keyword.

description
string

File category description

tables
object[]

Optional, table configuration list (one-stop creation), supports nested fields

with_detail
boolean

Whether to return full details. When true, the response includes complete category info (with fields, tables, samples). When not set or false, only category_id is returned.

Response

200 - application/json

Successfully created file category

code
integer
required

Status code

Example:

200

msg
string
required

Status description

result
object