How to Insert Text Content
To insert text content into a collection, make aPOST
request to the /v1/resource/insert/
endpoint with the required parameters in the body. The resource should be the text content you want to index and make sure you use the text
type.
Request Example
Successful Response
A successful response confirms the operation and tracks token usage. Example ResponseField | Description |
---|---|
success | Indicates whether the resource was inserted successfully. |
tokens | Number of tokens consumed during the operation. |
resource_id | Unique ID for the resource, this is required when removing a resource |
Related Operations
- Create Collection: Start by creating a collection to hold your resources.
- Query Resources: Access and retrieve insights from the indexed resources.
- Delete Collection: Remove collections and their resources when no longer needed.