Skip to main content
POST
/
v1
/
artifacts
/
ingest
curl --request POST \ --url https://{base_url}/gpt/v1/artifacts/ingest \ --header 'Content-Type: application/json' \ --data ' { "input": { "type": "file", "value": "JVBERi0xLjQKJaqrrK0KMS..." }, "artifact": "quarterly_report" } '
{
  "object": "list",
  "model": "private-gpt",
  "data": [
    {
      "object": "ingest.document",
      "artifact": "quarterly_report",
      "doc_metadata": {
        "file_name": "Q3_Report.pdf",
        "page_number": 1,
        "total_pages": 10
      }
    }
  ]
}

Body

application/json

JSON request body supporting multiple input types

Request body for ingesting content into the system for AI context.

artifact
string
required

Unique identifier for the text being ingested within the collection

Required string length: 1 - 255
Examples:

"user_manual_chapter_1"

"policy_document_2024"

input
FileArtifact · object
required

Input for base64 encoded files.

collection
string
default:pgpt_collection

Collection name to group related documents for better organization and filtering

Required string length: 1 - 255
Examples:

"corporate_docs"

"user_manuals"

"financial_reports"

metadata
Metadata · object

Optional metadata dictionary containing additional document information. If provided, must include 'file_name' with a valid file extension

Example:
{
  "author": "John Doe",
  "department": "HR",
  "file_name": "company_policy.txt"
}

Response

Content successfully ingested and processed

Response model for successful document ingestion operations.

object
string
required

Response object type, always 'list' for ingestion responses

Allowed value: "list"
model
string
required

Model identifier, always 'private-gpt'

Allowed value: "private-gpt"
data
IngestedDoc · object[]
required

List of ingested documents with their metadata and processing information