FastGPTFastGPT

Create Collection from API Dataset (V1)

Legacy V1 endpoint to import a single file from a third-party API dataset by apiFileId (deprecated in favor of V2).

⚠️

Deprecated Endpoint : POST /api/core/dataset/collection/create/apiCollection (V1) is deprecated. For active System OpenAPI collection creation, use Create Collection from Local File , Create Collection from Link , or Create Collection from Text , or check V2 batch import ( apiCollectionV2 ) in your instance Dev API.

Endpoint Overview

  • Method : POST
  • Path : /api/core/dataset/collection/create/apiCollection
  • Module : Datasets / Create Collections
  • 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/%E9%9B%86%E5%90%88%E5%88%9B%E5%BB%BA/POST/core/dataset/collection/create/apiCollection )

Description & Notes

Import a single file from a third-party API dataset by apiFileId and create a collection.

Request Parameters

Request Body ( application/json )

FieldTypeRequiredDefaultConstraints & Description
trainingTypestring (enum)No-Training mode. Allowed values: chunk , qa , imageParse , backup , template , auto
chunkTriggerTypestring (enum)No-Chunk trigger mode. Allowed values: minSize , forceChunk , maxSize
chunkTriggerMinSizenumberNo-Minimum size threshold to trigger chunking
dataEnhanceCollectionNamebooleanNo-Prepend collection name to chunks
imageIndexbooleanNo-Enable image indexing
autoIndexesbooleanNo-Auto-generate vector indexes
indexPrefixTitlebooleanNo-Prefix title for indexes
chunkSettingModestring (enum)No-Chunk setting preset ( auto , custom , or intelligent ). Allowed values: auto , custom , intelligent
chunkSplitModestring (enum)No-Chunk splitting mode. Allowed values: paragraph , size , char
paragraphChunkAIModestring (enum)No-AI paragraph chunking mode. Allowed values: auto , force , forbid
paragraphChunkDeepnumberNo-Paragraph heading split depth
paragraphChunkMinSizenumberNo-Minimum paragraph chunk size
chunkSizenumberNo-Target chunk size
chunkSplitterstringNo-Custom primary chunk separator
indexSizenumberNo-Vector index chunk size
qaPromptstringNo-Custom prompt for Q&A extraction
parentIdstring | nullNo-Parent folder ID
metadataobjectNo-Metadata
customPdfParsebooleanNo-Custom PDF parser
datasetIdstringYes-Dataset ID
tagsstring | object[]No-List of collection tags. String items map to legacy default_tag tags; object items { tag, value } resolve by tag name.
namestringYes-Collection name
apiFileIdstringYes-External API file ID

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/collection/create/apiCollection" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "datasetId": "string",
  "name": "string",
  "apiFileId": "string"
}'

Minimal Valid JSON Body

{
  "datasetId": "string",
  "name": "string",
  "apiFileId": "string"
}

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 created collection

Content-Type : application/json

FieldTypeRequiredDefaultConstraints & Description
successCountnumberYes-Number of collections newly created in this request
failedCountnumberYes-Number of nodes that failed or were skipped due to cascading
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.