Update Rag Config
curl --request PUT \
--url https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": "<string>",
"llm_credential_id": "<string>",
"embedding_credential_id": "<string>",
"vector_db_credential_id": "<string>",
"collection_name": "<string>",
"llm_model": "<string>",
"embedding_model": "<string>",
"vector_store_provider": "<string>",
"description": "<string>",
"semantic_data_model": true,
"meta_data": {}
}
'import requests
url = "https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/"
payload = {
"user_id": "<string>",
"llm_credential_id": "<string>",
"embedding_credential_id": "<string>",
"vector_db_credential_id": "<string>",
"collection_name": "<string>",
"llm_model": "<string>",
"embedding_model": "<string>",
"vector_store_provider": "<string>",
"description": "<string>",
"semantic_data_model": True,
"meta_data": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '<string>',
llm_credential_id: '<string>',
embedding_credential_id: '<string>',
vector_db_credential_id: '<string>',
collection_name: '<string>',
llm_model: '<string>',
embedding_model: '<string>',
vector_store_provider: '<string>',
description: '<string>',
semantic_data_model: true,
meta_data: {}
})
};
fetch('https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/', 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://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '<string>',
'llm_credential_id' => '<string>',
'embedding_credential_id' => '<string>',
'vector_db_credential_id' => '<string>',
'collection_name' => '<string>',
'llm_model' => '<string>',
'embedding_model' => '<string>',
'vector_store_provider' => '<string>',
'description' => '<string>',
'semantic_data_model' => true,
'meta_data' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/"
payload := strings.NewReader("{\n \"user_id\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"embedding_credential_id\": \"<string>\",\n \"vector_db_credential_id\": \"<string>\",\n \"collection_name\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"embedding_model\": \"<string>\",\n \"vector_store_provider\": \"<string>\",\n \"description\": \"<string>\",\n \"semantic_data_model\": true,\n \"meta_data\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"embedding_credential_id\": \"<string>\",\n \"vector_db_credential_id\": \"<string>\",\n \"collection_name\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"embedding_model\": \"<string>\",\n \"vector_store_provider\": \"<string>\",\n \"description\": \"<string>\",\n \"semantic_data_model\": true,\n \"meta_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"embedding_credential_id\": \"<string>\",\n \"vector_db_credential_id\": \"<string>\",\n \"collection_name\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"embedding_model\": \"<string>\",\n \"vector_store_provider\": \"<string>\",\n \"description\": \"<string>\",\n \"semantic_data_model\": true,\n \"meta_data\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"detail": "Invalid Permission"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Update RAG Configuration
Update the configuration for an existing RAG setup by providing the config ID and updated values.
PUT
/
rag
/
{config_id}
/
Update Rag Config
curl --request PUT \
--url https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": "<string>",
"llm_credential_id": "<string>",
"embedding_credential_id": "<string>",
"vector_db_credential_id": "<string>",
"collection_name": "<string>",
"llm_model": "<string>",
"embedding_model": "<string>",
"vector_store_provider": "<string>",
"description": "<string>",
"semantic_data_model": true,
"meta_data": {}
}
'import requests
url = "https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/"
payload = {
"user_id": "<string>",
"llm_credential_id": "<string>",
"embedding_credential_id": "<string>",
"vector_db_credential_id": "<string>",
"collection_name": "<string>",
"llm_model": "<string>",
"embedding_model": "<string>",
"vector_store_provider": "<string>",
"description": "<string>",
"semantic_data_model": True,
"meta_data": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '<string>',
llm_credential_id: '<string>',
embedding_credential_id: '<string>',
vector_db_credential_id: '<string>',
collection_name: '<string>',
llm_model: '<string>',
embedding_model: '<string>',
vector_store_provider: '<string>',
description: '<string>',
semantic_data_model: true,
meta_data: {}
})
};
fetch('https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/', 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://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '<string>',
'llm_credential_id' => '<string>',
'embedding_credential_id' => '<string>',
'vector_db_credential_id' => '<string>',
'collection_name' => '<string>',
'llm_model' => '<string>',
'embedding_model' => '<string>',
'vector_store_provider' => '<string>',
'description' => '<string>',
'semantic_data_model' => true,
'meta_data' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/"
payload := strings.NewReader("{\n \"user_id\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"embedding_credential_id\": \"<string>\",\n \"vector_db_credential_id\": \"<string>\",\n \"collection_name\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"embedding_model\": \"<string>\",\n \"vector_store_provider\": \"<string>\",\n \"description\": \"<string>\",\n \"semantic_data_model\": true,\n \"meta_data\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"embedding_credential_id\": \"<string>\",\n \"vector_db_credential_id\": \"<string>\",\n \"collection_name\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"embedding_model\": \"<string>\",\n \"vector_store_provider\": \"<string>\",\n \"description\": \"<string>\",\n \"semantic_data_model\": true,\n \"meta_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rag-prod.studio.lyzr.ai/v3/rag/{config_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"embedding_credential_id\": \"<string>\",\n \"vector_db_credential_id\": \"<string>\",\n \"collection_name\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"embedding_model\": \"<string>\",\n \"vector_store_provider\": \"<string>\",\n \"description\": \"<string>\",\n \"semantic_data_model\": true,\n \"meta_data\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"detail": "Invalid Permission"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Endpoint
PUT/v3/rag/{config_id}/
Authentication
API Key (x-api-key) must be included in the header.
Path Parameters
| Name | Type | Description |
|---|---|---|
| config_id | string | The ID of the RAG configuration to update. |
Request Body
A JSON object containing the updated RAG configuration values.JSON Schema
{
"user_id": "string",
"llm_credential_id": "string",
"embedding_credential_id": "string",
"vector_db_credential_id": "string",
"description": "",
"collection_name": "string",
"llm_model": "string",
"embedding_model": "string",
"vector_store_provider": "string",
"semantic_data_model": false,
"meta_data": {}
}
Response
{
"success": true
}
Example cURL Request
curl -X PUT "https://rag-dev.test.studio.lyzr.ai/v3/rag/{config_id}/" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-EXAMPLEKEY123" ^
-d "{
\"user_id\": \"user_123\",
\"llm_credential_id\": \"llm_cred_abc\",
\"embedding_credential_id\": \"embed_cred_xyz\",
\"vector_db_credential_id\": \"vectordb_cred_789\",
\"description\": \"Updated configuration for search\",
\"collection_name\": \"my_collection\",
\"llm_model\": \"gpt-4\",
\"embedding_model\": \"text-embedding-ada-002\",
\"vector_store_provider\": \"pinecone\",
\"semantic_data_model\": true,
\"meta_data\": {\"source\": \"internal\"}
}"
Authorizations
Path Parameters
Unique identifier for the RAG configuration to update.
Body
application/json
Response
Successful Response
Example:
true
⌘I