Skip to main content
POST
/
api
/
v1
/
runtime
/
vector-stores
Create vector store (CLI/SDK)
curl --request POST \
  --url https://api.runflow.ai/api/v1/runtime/vector-stores \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "embeddingConfigId": "<string>",
  "llmProviderConfigId": "<string>",
  "llmModelConfigId": "<string>",
  "type": "KNOWLEDGE",
  "metadata": {},
  "chunkSize": 1000,
  "chunkOverlap": 200,
  "chunkStrategy": "recursive"
}
'
import requests

url = "https://api.runflow.ai/api/v1/runtime/vector-stores"

payload = {
"name": "<string>",
"description": "<string>",
"embeddingConfigId": "<string>",
"llmProviderConfigId": "<string>",
"llmModelConfigId": "<string>",
"type": "KNOWLEDGE",
"metadata": {},
"chunkSize": 1000,
"chunkOverlap": 200,
"chunkStrategy": "recursive"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
embeddingConfigId: '<string>',
llmProviderConfigId: '<string>',
llmModelConfigId: '<string>',
type: 'KNOWLEDGE',
metadata: {},
chunkSize: 1000,
chunkOverlap: 200,
chunkStrategy: 'recursive'
})
};

fetch('https://api.runflow.ai/api/v1/runtime/vector-stores', 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.runflow.ai/api/v1/runtime/vector-stores",
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([
'name' => '<string>',
'description' => '<string>',
'embeddingConfigId' => '<string>',
'llmProviderConfigId' => '<string>',
'llmModelConfigId' => '<string>',
'type' => 'KNOWLEDGE',
'metadata' => [

],
'chunkSize' => 1000,
'chunkOverlap' => 200,
'chunkStrategy' => 'recursive'
]),
CURLOPT_HTTPHEADER => [
"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.runflow.ai/api/v1/runtime/vector-stores"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"embeddingConfigId\": \"<string>\",\n \"llmProviderConfigId\": \"<string>\",\n \"llmModelConfigId\": \"<string>\",\n \"type\": \"KNOWLEDGE\",\n \"metadata\": {},\n \"chunkSize\": 1000,\n \"chunkOverlap\": 200,\n \"chunkStrategy\": \"recursive\"\n}")

req, _ := http.NewRequest("POST", url, payload)

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.runflow.ai/api/v1/runtime/vector-stores")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"embeddingConfigId\": \"<string>\",\n \"llmProviderConfigId\": \"<string>\",\n \"llmModelConfigId\": \"<string>\",\n \"type\": \"KNOWLEDGE\",\n \"metadata\": {},\n \"chunkSize\": 1000,\n \"chunkOverlap\": 200,\n \"chunkStrategy\": \"recursive\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.runflow.ai/api/v1/runtime/vector-stores")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"embeddingConfigId\": \"<string>\",\n \"llmProviderConfigId\": \"<string>\",\n \"llmModelConfigId\": \"<string>\",\n \"type\": \"KNOWLEDGE\",\n \"metadata\": {},\n \"chunkSize\": 1000,\n \"chunkOverlap\": 200,\n \"chunkStrategy\": \"recursive\"\n}"

response = http.request(request)
puts response.read_body

Body

application/json
name
string
required

Vector store name

description
string

Description

embeddingConfigId
string

Embedding configuration ID (optional if llmProviderConfigId + llmModelConfigId provided)

llmProviderConfigId
string

LLM Provider Config ID (for tenant-credential embeddings)

llmModelConfigId
string

LLM Model Config ID (for tenant-credential embeddings)

type
enum<string>
default:KNOWLEDGE

Vector store type

Available options:
KNOWLEDGE,
STRUCTURED
metadata
object

Custom metadata

structuredType
enum<string>

Structured document type (only for STRUCTURED stores)

Available options:
FAQ,
SURVEY,
GLOSSARY,
CATALOG,
QA,
DEFINITION
chunkSize
number
default:1000

Chunk size in tokens (default: 1000)

Required range: 100 <= x <= 8000
chunkOverlap
number
default:200

Chunk overlap in tokens (default: 200)

Required range: 0 <= x <= 1000
chunkStrategy
enum<string>
default:recursive

Chunking strategy (default: recursive)

Available options:
fixed,
recursive,
semantic

Response

201

Vector store created successfully.