AI & indexing
Populate vector embeddings for a collection
Indexer endpoint: takes a collection name (name or content), a content type, and a list of row ids; generates embeddings and stores them. Used by content-update flows; not generally called by external clients.
POST
/
vector-db-populate-collection
Populate vector embeddings for a collection
curl --request POST \
--url https://api.wanderersguide.app/functions/v1/vector-db-populate-collection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
2
]
}
'import requests
url = "https://api.wanderersguide.app/functions/v1/vector-db-populate-collection"
payload = { "ids": [2] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: [2]})
};
fetch('https://api.wanderersguide.app/functions/v1/vector-db-populate-collection', 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.wanderersguide.app/functions/v1/vector-db-populate-collection",
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([
'ids' => [
2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.wanderersguide.app/functions/v1/vector-db-populate-collection"
payload := strings.NewReader("{\n \"ids\": [\n 2\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wanderersguide.app/functions/v1/vector-db-populate-collection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wanderersguide.app/functions/v1/vector-db-populate-collection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": true
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "error",
"message": "<string>",
"data": "<unknown>",
"code": 123
}{
"status": "error",
"message": "<string>",
"data": "<unknown>",
"code": 123
}{
"status": "error",
"message": "<string>",
"data": "<unknown>",
"code": 123
}Authorizations
API key created in your Wanderer's Guide account settings. Send as Authorization: Bearer <key>. Used for direct API access from external tools and scripts.
Body
application/json
Available options:
name, content Available options:
trait, item, spell, class, archetype, versatile-heritage, class-archetype, ability-block, creature, ancestry, background, language, content-source Required array length:
1 - 500 elementsRequired range:
x >= 1⌘I
Populate vector embeddings for a collection
curl --request POST \
--url https://api.wanderersguide.app/functions/v1/vector-db-populate-collection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
2
]
}
'import requests
url = "https://api.wanderersguide.app/functions/v1/vector-db-populate-collection"
payload = { "ids": [2] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: [2]})
};
fetch('https://api.wanderersguide.app/functions/v1/vector-db-populate-collection', 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.wanderersguide.app/functions/v1/vector-db-populate-collection",
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([
'ids' => [
2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.wanderersguide.app/functions/v1/vector-db-populate-collection"
payload := strings.NewReader("{\n \"ids\": [\n 2\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wanderersguide.app/functions/v1/vector-db-populate-collection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wanderersguide.app/functions/v1/vector-db-populate-collection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": true
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "fail",
"data": {
"message": "<string>"
}
}{
"status": "error",
"message": "<string>",
"data": "<unknown>",
"code": 123
}{
"status": "error",
"message": "<string>",
"data": "<unknown>",
"code": 123
}{
"status": "error",
"message": "<string>",
"data": "<unknown>",
"code": 123
}
