Update Llm Configuration
curl --request PATCH \
--url https://api.liveavatar.com/v1/llm-configurations/{config_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"base_url": "<string>",
"display_name": "<string>",
"model_name": "<string>",
"secret_id": "<string>"
}
'import requests
url = "https://api.liveavatar.com/v1/llm-configurations/{config_id}"
payload = {
"base_url": "<string>",
"display_name": "<string>",
"model_name": "<string>",
"secret_id": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: '<string>',
display_name: '<string>',
model_name: '<string>',
secret_id: '<string>'
})
};
fetch('https://api.liveavatar.com/v1/llm-configurations/{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://api.liveavatar.com/v1/llm-configurations/{config_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => '<string>',
'display_name' => '<string>',
'model_name' => '<string>',
'secret_id' => '<string>'
]),
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://api.liveavatar.com/v1/llm-configurations/{config_id}"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"model_name\": \"<string>\",\n \"secret_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.liveavatar.com/v1/llm-configurations/{config_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"model_name\": \"<string>\",\n \"secret_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liveavatar.com/v1/llm-configurations/{config_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"model_name\": \"<string>\",\n \"secret_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 100,
"data": {
"id": "<string>",
"base_url": "<string>",
"display_name": "<string>",
"model_name": "<string>",
"secret_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}LLM Configurations
Update Llm Configuration
Update an LLM configuration by ID.
This endpoint:
- Requires API key or session authentication
- Validates that the new secret_id (if provided) belongs to the user’s space
- Updates only the provided fields
Args: service: Injected LLM configuration service config_id: The ID of the LLM configuration to update payload: Request containing fields to update
Returns: Response with the updated LLM configuration
Raises: 400 Bad Request: If user doesn’t have an associated space or secret is invalid 404 Not Found: If the configuration doesn’t exist
PATCH
/
v1
/
llm-configurations
/
{config_id}
Update Llm Configuration
curl --request PATCH \
--url https://api.liveavatar.com/v1/llm-configurations/{config_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"base_url": "<string>",
"display_name": "<string>",
"model_name": "<string>",
"secret_id": "<string>"
}
'import requests
url = "https://api.liveavatar.com/v1/llm-configurations/{config_id}"
payload = {
"base_url": "<string>",
"display_name": "<string>",
"model_name": "<string>",
"secret_id": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: '<string>',
display_name: '<string>',
model_name: '<string>',
secret_id: '<string>'
})
};
fetch('https://api.liveavatar.com/v1/llm-configurations/{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://api.liveavatar.com/v1/llm-configurations/{config_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => '<string>',
'display_name' => '<string>',
'model_name' => '<string>',
'secret_id' => '<string>'
]),
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://api.liveavatar.com/v1/llm-configurations/{config_id}"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"model_name\": \"<string>\",\n \"secret_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.liveavatar.com/v1/llm-configurations/{config_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"model_name\": \"<string>\",\n \"secret_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liveavatar.com/v1/llm-configurations/{config_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"model_name\": \"<string>\",\n \"secret_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 100,
"data": {
"id": "<string>",
"base_url": "<string>",
"display_name": "<string>",
"model_name": "<string>",
"secret_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Cookies
Body
application/json
Request schema for updating an LLM configuration
The LLM API endpoint URL
Minimum string length:
1Display name for the configuration
Required string length:
1 - 255The model name to use
Required string length:
1 - 255ID of the secret containing the API key
Required string length:
1 - 36Was this page helpful?
⌘I