POST
Upload the documents to your storage. If you need information regarding the status and other data related to the documents, please refer to List documents.
Upon uploading the documents, they undergo automatic training, eliminating the necessity for additional manual training or the invocation of extra functions.
Endpoint: /api/v1/document
To do this, you need the organization ID
. However, due to documentation constraints in README, it is not possible to test it from this platform.
The file should be in .TXT
2MB maximum.
Example
curl -X POST "https://api.codegpt.co/api/v1/document" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "CodeGPT-Org-Id: YOUR_ORG_ID" \
-F "file=@/path/to/your/file.txt;type=text/plain"