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 sample file must be uploaded, a category can have at most 20 sample files

Required array length: 1 - 10 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."

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