FastGPTFastGPT

Push Data Items to Training Queue

Batch insert up to 200 structured data items with optional custom indexes into a dataset collection training queue.

Endpoint Overview

  • Method : POST
  • Path : /api/core/dataset/data/pushData
  • Module : Datasets / Dataset Data
  • 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/%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86/POST/core/dataset/data/pushData )

Description & Notes

Batch insert up to 200 data items into the collection training queue.

Request Parameters

Request Body ( application/json )

FieldTypeRequiredDefaultConstraints & Description
collectionIdstringYes-Collection ID. pattern: ^[0-9a-fA-F]{24}$
dataobject[]Yes-List of data items (up to 200 per request). maxItems: 200
data[].qstringNo-Primary chunk content / question
data[].astringNo-Supplementary answer / text
data[].imageIdstringNo-Image ID
data[].chunkIndexnumberNo-Chunk index
data[].indexesobject[]No-Additional vector indexes
data[].indexes[].typestring (enum)No"custom"Index type (external callers omit or use custom ; other types are system-generated). Allowed values: default , imageEmbedding , summary , question , image , custom
data[].indexes[].textstringYes-Indexed text content by default; for imageEmbedding , the image objectKey or URL
data[].metadataobjectNo-Custom metadata
trainingTypestring (enum)No-Training mode. Allowed values: chunk , qa , imageParse , backup , template , auto
indexSizenumberNo-Index chunk size limit
autoIndexesbooleanNo-Whether to auto-generate vector indexes
imageIndexbooleanNo-Whether to generate image indexes
promptstringNo-Custom prompt
billIdstringNo-Optional training billing ID; created automatically when omitted
trainingModestring (enum)No-Deprecated . Training mode. Allowed values: chunk , qa , imageParse , backup , template , auto

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/data/pushData" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "collectionId": "68ad85a7463006c963799a06",
  "data": [
    {}
  ]
}'

Minimal Valid JSON Body

{
  "collectionId": "68ad85a7463006c963799a06",
  "data": [{}]
}

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 inserted item count

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.