Save Meta Profile
curl --request POST \
--url https://api.example.com/api/meta-profiles/{name} \
--header 'Content-Type: application/json' \
--header 'X-Session-API-Key: <api-key>' \
--data '
{
"classifier_model": "<string>",
"classes": [
{
"description": "<string>",
"model": "<string>"
}
],
"model_table": "<string>",
"prompt_template": "<string>"
}
'import requests
url = "https://api.example.com/api/meta-profiles/{name}"
payload = {
"classifier_model": "<string>",
"classes": [
{
"description": "<string>",
"model": "<string>"
}
],
"model_table": "<string>",
"prompt_template": "<string>"
}
headers = {
"X-Session-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Session-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
classifier_model: '<string>',
classes: [{description: '<string>', model: '<string>'}],
model_table: '<string>',
prompt_template: '<string>'
})
};
fetch('https://api.example.com/api/meta-profiles/{name}', 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/api/meta-profiles/{name}",
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([
'classifier_model' => '<string>',
'classes' => [
[
'description' => '<string>',
'model' => '<string>'
]
],
'model_table' => '<string>',
'prompt_template' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Session-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.example.com/api/meta-profiles/{name}"
payload := strings.NewReader("{\n \"classifier_model\": \"<string>\",\n \"classes\": [\n {\n \"description\": \"<string>\",\n \"model\": \"<string>\"\n }\n ],\n \"model_table\": \"<string>\",\n \"prompt_template\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Session-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.post("https://api.example.com/api/meta-profiles/{name}")
.header("X-Session-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"classifier_model\": \"<string>\",\n \"classes\": [\n {\n \"description\": \"<string>\",\n \"model\": \"<string>\"\n }\n ],\n \"model_table\": \"<string>\",\n \"prompt_template\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/meta-profiles/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Session-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"classifier_model\": \"<string>\",\n \"classes\": [\n {\n \"description\": \"<string>\",\n \"model\": \"<string>\"\n }\n ],\n \"model_table\": \"<string>\",\n \"prompt_template\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Meta-profiles
Save Meta Profile
Save (create or overwrite) a meta-profile.
Returns 409 if creating a new meta-profile would exceed
MAX_META_PROFILES.
POST
/
api
/
meta-profiles
/
{name}
Save Meta Profile
curl --request POST \
--url https://api.example.com/api/meta-profiles/{name} \
--header 'Content-Type: application/json' \
--header 'X-Session-API-Key: <api-key>' \
--data '
{
"classifier_model": "<string>",
"classes": [
{
"description": "<string>",
"model": "<string>"
}
],
"model_table": "<string>",
"prompt_template": "<string>"
}
'import requests
url = "https://api.example.com/api/meta-profiles/{name}"
payload = {
"classifier_model": "<string>",
"classes": [
{
"description": "<string>",
"model": "<string>"
}
],
"model_table": "<string>",
"prompt_template": "<string>"
}
headers = {
"X-Session-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Session-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
classifier_model: '<string>',
classes: [{description: '<string>', model: '<string>'}],
model_table: '<string>',
prompt_template: '<string>'
})
};
fetch('https://api.example.com/api/meta-profiles/{name}', 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/api/meta-profiles/{name}",
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([
'classifier_model' => '<string>',
'classes' => [
[
'description' => '<string>',
'model' => '<string>'
]
],
'model_table' => '<string>',
'prompt_template' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Session-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.example.com/api/meta-profiles/{name}"
payload := strings.NewReader("{\n \"classifier_model\": \"<string>\",\n \"classes\": [\n {\n \"description\": \"<string>\",\n \"model\": \"<string>\"\n }\n ],\n \"model_table\": \"<string>\",\n \"prompt_template\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Session-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.post("https://api.example.com/api/meta-profiles/{name}")
.header("X-Session-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"classifier_model\": \"<string>\",\n \"classes\": [\n {\n \"description\": \"<string>\",\n \"model\": \"<string>\"\n }\n ],\n \"model_table\": \"<string>\",\n \"prompt_template\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/meta-profiles/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Session-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"classifier_model\": \"<string>\",\n \"classes\": [\n {\n \"description\": \"<string>\",\n \"model\": \"<string>\"\n }\n ],\n \"model_table\": \"<string>\",\n \"prompt_template\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Path Parameters
Required string length:
1 - 64Pattern:
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$Body
application/json
A declarative model-routing configuration.
Name of the saved LLM profile used to classify the task.
Ordered list of task classes and their target profiles.
Show child attributes
Show child attributes
Optional text inserted into {{ model_table }} for direct-routing prompts.
Optional direct-routing prompt template. When set, the classifier receives this rendered prompt and should return JSON with a model field instead of a class number.
Was this page helpful?

