FastGPTFastGPT

Create Dataset

Create a new FastGPT dataset or folder supporting standard, website, external file, and third-party API dataset configurations.

Endpoint Overview

  • Method : POST
  • Path : /api/core/dataset/create
  • Module : Datasets / Datasets
  • Authentication : Authorization: Bearer <apiKey>—Personal API Key (access scoped by team member permissions) (see API Getting Started )
  • Interactive Try-It-Out : Open in Scalar API Explorer (self-hosted instances: replace the origin with <instance>/apidoc/systemopenapi#tag/%E7%9F%A5%E8%AF%86%E5%BA%93%E7%AE%A1%E7%90%86/POST/core/dataset/create )

Description & Notes

Create a new dataset or folder supporting standard, site sync, external file, and API datasets.

Request Parameters

Request Body ( application/json )

FieldTypeRequiredDefaultConstraints & Description
parentIdstring | nullNo-Parent folder ID; omit to create at the root level
typestring (enum)Yes-Dataset type. Allowed values: folder , dataset , websiteDataset , externalFile , apiDataset , feishu , yuque , dingtalk
namestringYes-Dataset name
introstringYes-Dataset introduction
avatarstringNo-Dataset avatar URL (optional; uses default icon when omitted)
vectorModelIdstringNo-Embedding model ID; uses the system default if omitted
vectorModelstringNo-Deprecated . Embedding model identifier; uses the system default if omitted
agentModelIdstringNo-Dataset Agent model ID; uses the default model if omitted
agentModelstringNo-Deprecated . Dataset Agent model identifier; uses the default model if omitted
vlmModelIdstring | nullNo-Vision-Language Model (VLM) ID; keeps default when omitted, null or empty string clears it
vlmModelstringNo-Deprecated . Vision-Language Model (VLM) identifier
apiDatasetServerobjectNo-Third-party dataset server configuration (API / Lark / Yuque / DingTalk)
apiDatasetServer.apiServerobjectNo-API dataset server configuration
apiDatasetServer.apiServer.baseUrlstringYes--
apiDatasetServer.apiServer.authorizationstringNo--
apiDatasetServer.apiServer.basePathstringNo--
apiDatasetServer.feishuServerobjectNo-Lark (Feishu) server configuration
apiDatasetServer.feishuServer.appIdstringYes--
apiDatasetServer.feishuServer.appSecretstringNo--
apiDatasetServer.feishuServer.folderTokenstringYes--
apiDatasetServer.yuqueServerobjectNo-Yuque server configuration
apiDatasetServer.yuqueServer.userIdstringYes--
apiDatasetServer.yuqueServer.tokenstringNo--
apiDatasetServer.yuqueServer.basePathstringNo--
apiDatasetServer.dingtalkServerobjectNo-DingTalk dataset configuration
apiDatasetServer.dingtalkServer.appKeystringYes--
apiDatasetServer.dingtalkServer.appSecretstringNo--
apiDatasetServer.dingtalkServer.userIdstringYes--
apiDatasetServer.dingtalkServer.operatorIdstringNo--
apiDatasetServer.dingtalkServer.workspaceIdstringNo--
apiDatasetServer.dingtalkServer.rootNodeIdstringNo--
apiDatasetServer.dingtalkServer.workspaceNamestringNo--
sangforFileParseConfigobjectNo-External PDF parsing switches (header/footer, appendix, image OCR, chart-to-table); applies only when customPdfParse is enabled
sangforFileParseConfig.keep_header_footerbooleanNo-Whether to keep page headers and footers (default false , strips headers/footers)
sangforFileParseConfig.keep_appendixbooleanNo-Whether to keep appendix sections (default true )
sangforFileParseConfig.image_analysisbooleanNo-Whether to retain OCR/image recognition results including stamps (default false )
sangforFileParseConfig.chart_analysisbooleanNo-Whether to keep chart-to-table extraction results alongside original images (default false )
inheritPermissionbooleanNo-Whether to inherit parent permissions (default true ). true merges the parent permission snapshot and tracks future changes; false creates an isolated Node.js with only creator owner permission.

Request Examples

Replace YOUR_API_KEY and placeholder IDs before running. Self-hosted users should replace the base URL with <instance>/api .

cURL Example

curl --fail-with-body -X POST "https://cloud.fastgpt.io/api/core/dataset/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "type": "folder",
  "name": "My Dataset",
  "intro": "A knowledge base dataset for storing product documentation."
}'

Minimal Valid JSON Body

{
  "type": "folder",
  "name": "My Dataset",
  "intro": "A knowledge base dataset for storing product documentation."
}

Response Schema & Examples

Successful /api/* calls return the standard FastGPT envelope { "code": 200, "statusText": "", "message": "", "data": ... } , where data matches the 200 schema below (when a payload schema is declared; otherwise refer to the status description for runtime data semantics).

HTTP 200

Successfully returned the newly created dataset ID

Returns the standard FastGPT success envelope ( { "code": 200, "statusText": "", "message": "", "data": ... } ). The exact data payload schema is not declared in this OpenAPI contract; refer to the status description above or inspect runtime responses.

Edit on GitHub

Last updated

On this page

Put your business knowledge to work with AI

Import company documents and build accurate, reliable, traceable AI answers.