curl --request POST \
--url https://api.anam.ai/v1/llms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "My GPT-4o",
"urls": [
{
"url": "https://api.openai.com/v1/chat/completions"
}
],
"llmFormat": "openai",
"modelName": "gpt-4o",
"secret": "sk-…",
"temperature": 0.7
}
'import requests
url = "https://api.anam.ai/v1/llms"
payload = {
"displayName": "My GPT-4o",
"urls": [{ "url": "https://api.openai.com/v1/chat/completions" }],
"llmFormat": "openai",
"modelName": "gpt-4o",
"secret": "sk-…",
"temperature": 0.7
}
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({
displayName: 'My GPT-4o',
urls: [{url: 'https://api.openai.com/v1/chat/completions'}],
llmFormat: 'openai',
modelName: 'gpt-4o',
secret: 'sk-…',
temperature: 0.7
})
};
fetch('https://api.anam.ai/v1/llms', 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.anam.ai/v1/llms",
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([
'displayName' => 'My GPT-4o',
'urls' => [
[
'url' => 'https://api.openai.com/v1/chat/completions'
]
],
'llmFormat' => 'openai',
'modelName' => 'gpt-4o',
'secret' => 'sk-…',
'temperature' => 0.7
]),
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.anam.ai/v1/llms"
payload := strings.NewReader("{\n \"displayName\": \"My GPT-4o\",\n \"urls\": [\n {\n \"url\": \"https://api.openai.com/v1/chat/completions\"\n }\n ],\n \"llmFormat\": \"openai\",\n \"modelName\": \"gpt-4o\",\n \"secret\": \"sk-…\",\n \"temperature\": 0.7\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.anam.ai/v1/llms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"My GPT-4o\",\n \"urls\": [\n {\n \"url\": \"https://api.openai.com/v1/chat/completions\"\n }\n ],\n \"llmFormat\": \"openai\",\n \"modelName\": \"gpt-4o\",\n \"secret\": \"sk-…\",\n \"temperature\": 0.7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/llms")
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 \"displayName\": \"My GPT-4o\",\n \"urls\": [\n {\n \"url\": \"https://api.openai.com/v1/chat/completions\"\n }\n ],\n \"llmFormat\": \"openai\",\n \"modelName\": \"gpt-4o\",\n \"secret\": \"sk-…\",\n \"temperature\": 0.7\n}"
response = http.request(request)
puts response.read_body{
"id": "a7cf662c-2ace-4de1-a21e-ef0fbf144bb7",
"displayName": "GPT-4o",
"description": "OpenAI GPT-4o default configuration.",
"llmFormat": "openai",
"urls": [
{
"url": "https://api.openai.com/v1/chat/completions"
}
],
"modelName": "gpt-4o",
"temperature": 0.7,
"maxTokens": 1024,
"deploymentName": null,
"apiVersion": null,
"metadata": {},
"displayTags": [
"openai"
],
"isDefault": true,
"isGlobal": true,
"isZdr": false,
"isDeprecated": false,
"createdByOrganizationId": null,
"createdAt": "2026-04-20T10:00:00.000Z",
"updatedAt": null
}create llm
Create a new LLM configuration
curl --request POST \
--url https://api.anam.ai/v1/llms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "My GPT-4o",
"urls": [
{
"url": "https://api.openai.com/v1/chat/completions"
}
],
"llmFormat": "openai",
"modelName": "gpt-4o",
"secret": "sk-…",
"temperature": 0.7
}
'import requests
url = "https://api.anam.ai/v1/llms"
payload = {
"displayName": "My GPT-4o",
"urls": [{ "url": "https://api.openai.com/v1/chat/completions" }],
"llmFormat": "openai",
"modelName": "gpt-4o",
"secret": "sk-…",
"temperature": 0.7
}
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({
displayName: 'My GPT-4o',
urls: [{url: 'https://api.openai.com/v1/chat/completions'}],
llmFormat: 'openai',
modelName: 'gpt-4o',
secret: 'sk-…',
temperature: 0.7
})
};
fetch('https://api.anam.ai/v1/llms', 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.anam.ai/v1/llms",
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([
'displayName' => 'My GPT-4o',
'urls' => [
[
'url' => 'https://api.openai.com/v1/chat/completions'
]
],
'llmFormat' => 'openai',
'modelName' => 'gpt-4o',
'secret' => 'sk-…',
'temperature' => 0.7
]),
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.anam.ai/v1/llms"
payload := strings.NewReader("{\n \"displayName\": \"My GPT-4o\",\n \"urls\": [\n {\n \"url\": \"https://api.openai.com/v1/chat/completions\"\n }\n ],\n \"llmFormat\": \"openai\",\n \"modelName\": \"gpt-4o\",\n \"secret\": \"sk-…\",\n \"temperature\": 0.7\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.anam.ai/v1/llms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"My GPT-4o\",\n \"urls\": [\n {\n \"url\": \"https://api.openai.com/v1/chat/completions\"\n }\n ],\n \"llmFormat\": \"openai\",\n \"modelName\": \"gpt-4o\",\n \"secret\": \"sk-…\",\n \"temperature\": 0.7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/llms")
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 \"displayName\": \"My GPT-4o\",\n \"urls\": [\n {\n \"url\": \"https://api.openai.com/v1/chat/completions\"\n }\n ],\n \"llmFormat\": \"openai\",\n \"modelName\": \"gpt-4o\",\n \"secret\": \"sk-…\",\n \"temperature\": 0.7\n}"
response = http.request(request)
puts response.read_body{
"id": "a7cf662c-2ace-4de1-a21e-ef0fbf144bb7",
"displayName": "GPT-4o",
"description": "OpenAI GPT-4o default configuration.",
"llmFormat": "openai",
"urls": [
{
"url": "https://api.openai.com/v1/chat/completions"
}
],
"modelName": "gpt-4o",
"temperature": 0.7,
"maxTokens": 1024,
"deploymentName": null,
"apiVersion": null,
"metadata": {},
"displayTags": [
"openai"
],
"isDefault": true,
"isGlobal": true,
"isZdr": false,
"isDeprecated": false,
"createdByOrganizationId": null,
"createdAt": "2026-04-20T10:00:00.000Z",
"updatedAt": null
}Authorizations
Body
Endpoint URLs, model and credentials for the LLM. secret is encrypted at rest and never returned. llmFormat is the upstream API's wire protocol: openai, groq_openai, gemini and openrouter need urls, modelName and secret; azure_openai needs urls, deploymentName, apiVersion and secret; none needs only displayName. An openrouter model name starts with the provider, such as anthropic/claude-sonnet-4.5, and its reasoningEffort, when set, is one of none, minimal, low, medium, high, xhigh or max. providerRouting is only for openrouter. For OpenRouter's in-region routing, use https://eu.openrouter.ai/api/v1 or https://us.openrouter.ai/api/v1 (OpenRouter Business or Enterprise plans); an LLM's OpenRouter URLs must all be in one region.
Reasoning effort for models that take it, sent to the provider as is, such as low, medium or high (values depend on the model). The one exception is minimal on gemini-3.8-flash, which rejects it and is sent low. An openrouter LLM takes only none, minimal, low, medium, high, xhigh or max. Omit or set null for the model default.
50"minimal"
Response
Successfully created LLM
An LLM configuration a persona can use. Secrets are never returned.
Where this LLM processes requests, as Anam recorded it. eu or us when every endpoint of the LLM is in that region. Null when it may process requests in any region, and always for llmFormat none, which makes no LLM calls. Only Anam sets it, on its own LLMs; a request that sends a value gets 400 LLM_RESIDENCY_NOT_SETTABLE, and a null is ignored.
eu, us, null 
