cURL
curl --request POST \ --url https://rag-prod.studio.lyzr.ai/v3/train/txt/ \ --header 'Content-Type: multipart/form-data' \ --header 'x-api-key: <api-key>' \ --form file='@example-file' \ --form data_parser=txt_parser \ --form 'extra_info={}'
{ "message": "TXT parsing and training completed successfully", "rag_id": "6848ff3c4c291b4bef798e0c", "document_count": 1 }
Upload a plain text (.txt) file and ingest its content into the provided RAG configuration.
The ID of the RAG system you want to train this document into.
The .txt file to upload and train.
Optional parser name for text files.
Optional JSON string with metadata for the file.
TXT file successfully trained
"TXT parsing and training completed successfully"
"6848ff3c4c291b4bef798e0c"
1