Insert
curl --request POST \
--url https://api.example.com/insert \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"title": "<string>",
"tags": [
"<string>"
],
"metadata": {}
}
'import requests
url = "https://api.example.com/insert"
payload = {
"content": "<string>",
"title": "<string>",
"tags": ["<string>"],
"metadata": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', title: '<string>', tags: ['<string>'], metadata: {}})
};
fetch('https://api.example.com/insert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/insert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'title' => '<string>',
'tags' => [
'<string>'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/insert"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/insert")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/insert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"job_id": "job_abc123",
"message": "Content queued for processing"
}
Endpoints
Insert
Insert text content into the knowledge base
POST
/
insert
Insert
curl --request POST \
--url https://api.example.com/insert \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"title": "<string>",
"tags": [
"<string>"
],
"metadata": {}
}
'import requests
url = "https://api.example.com/insert"
payload = {
"content": "<string>",
"title": "<string>",
"tags": ["<string>"],
"metadata": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', title: '<string>', tags: ['<string>'], metadata: {}})
};
fetch('https://api.example.com/insert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/insert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'title' => '<string>',
'tags' => [
'<string>'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/insert"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/insert")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/insert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"job_id": "job_abc123",
"message": "Content queued for processing"
}
Insert text content into Vrin. The content is chunked, facts are extracted (entities, relationships, attributes), and everything is indexed for retrieval.
Insertion is asynchronous — the endpoint returns a
job_id immediately and processes in the background.
string
required
Bearer token. Example:
Bearer vrin_live_abc123string
required
Text content to insert.
string
default:"Untitled"
Document title for search results and source attribution.
string[]
default:"[]"
Tags for categorization.
object
default:"{}"
Arbitrary metadata attached to the document.
{
"success": true,
"job_id": "job_abc123",
"message": "Content queued for processing"
}
Job status polling
After receiving thejob_id, poll the status endpoint:
GET /job-status/{job_id}
{
"job_id": "job_abc123",
"status": "extracting",
"progress": 0.65,
"message": "Extracting facts from chunks..."
}
Job status values
| Status | Description |
|---|---|
pending | Job is queued |
chunking | Splitting content into chunks |
extracting | Extracting facts with LLM |
storing | Writing to graph + vector store |
completed | Processing finished successfully |
failed | Processing failed (see error_details) |
Completed job
{
"job_id": "job_abc123",
"status": "completed",
"progress": 1.0,
"data": {
"facts_extracted": 18,
"chunks_created": 3,
"document_id": "doc_xyz"
}
}
SDK usage
The Python SDK handles polling automatically:# Synchronous (waits for completion)
result = client.insert("content...", title="My Document")
# Asynchronous (returns job_id)
job_id = client.insert("content...", wait=False)
status = client.get_job_status(job_id)
⌘I