Create new AI model (superadmin only)
curl --request POST \
--url https://your-instance.example.com/api/ai-models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Balanced reasoning + speed."
}
]
}
'import requests
url = "https://your-instance.example.com/api/ai-models"
payload = {
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Balanced reasoning + speed."
}
]
}
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({
providerName: 'Anthropic',
vercelUniqueName: 'anthropic',
websiteUrl: 'https://www.anthropic.com',
modelDetails: [{modelName: 'claude-sonnet-4-6', description: 'Balanced reasoning + speed.'}]
})
};
fetch('https://your-instance.example.com/api/ai-models', 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://your-instance.example.com/api/ai-models",
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([
'providerName' => 'Anthropic',
'vercelUniqueName' => 'anthropic',
'websiteUrl' => 'https://www.anthropic.com',
'modelDetails' => [
[
'modelName' => 'claude-sonnet-4-6',
'description' => 'Balanced reasoning + speed.'
]
]
]),
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://your-instance.example.com/api/ai-models"
payload := strings.NewReader("{\n \"providerName\": \"Anthropic\",\n \"vercelUniqueName\": \"anthropic\",\n \"websiteUrl\": \"https://www.anthropic.com\",\n \"modelDetails\": [\n {\n \"modelName\": \"claude-sonnet-4-6\",\n \"description\": \"Balanced reasoning + speed.\"\n }\n ]\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://your-instance.example.com/api/ai-models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"providerName\": \"Anthropic\",\n \"vercelUniqueName\": \"anthropic\",\n \"websiteUrl\": \"https://www.anthropic.com\",\n \"modelDetails\": [\n {\n \"modelName\": \"claude-sonnet-4-6\",\n \"description\": \"Balanced reasoning + speed.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/ai-models")
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 \"providerName\": \"Anthropic\",\n \"vercelUniqueName\": \"anthropic\",\n \"websiteUrl\": \"https://www.anthropic.com\",\n \"modelDetails\": [\n {\n \"modelName\": \"claude-sonnet-4-6\",\n \"description\": \"Balanced reasoning + speed.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "5f7b1c2e8a1d4e0012c3b4a5",
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Latest Sonnet release."
},
{
"modelName": "claude-haiku-4-5",
"description": "Fast, cost-efficient Haiku."
}
]
}
}{
"success": false,
"message": "Organization credentials not found"
}{
"success": false,
"message": "Organization credentials not found"
}{
"success": false,
"message": "Organization credentials not found"
}AI Models
Create new AI model (superadmin only)
Adds a new provider entry to the global AiModel registry. SUPERADMIN-only. vercelUniqueName must be unique across the registry; duplicates return 400.
POST
/
api
/
ai-models
Create new AI model (superadmin only)
curl --request POST \
--url https://your-instance.example.com/api/ai-models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Balanced reasoning + speed."
}
]
}
'import requests
url = "https://your-instance.example.com/api/ai-models"
payload = {
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Balanced reasoning + speed."
}
]
}
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({
providerName: 'Anthropic',
vercelUniqueName: 'anthropic',
websiteUrl: 'https://www.anthropic.com',
modelDetails: [{modelName: 'claude-sonnet-4-6', description: 'Balanced reasoning + speed.'}]
})
};
fetch('https://your-instance.example.com/api/ai-models', 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://your-instance.example.com/api/ai-models",
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([
'providerName' => 'Anthropic',
'vercelUniqueName' => 'anthropic',
'websiteUrl' => 'https://www.anthropic.com',
'modelDetails' => [
[
'modelName' => 'claude-sonnet-4-6',
'description' => 'Balanced reasoning + speed.'
]
]
]),
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://your-instance.example.com/api/ai-models"
payload := strings.NewReader("{\n \"providerName\": \"Anthropic\",\n \"vercelUniqueName\": \"anthropic\",\n \"websiteUrl\": \"https://www.anthropic.com\",\n \"modelDetails\": [\n {\n \"modelName\": \"claude-sonnet-4-6\",\n \"description\": \"Balanced reasoning + speed.\"\n }\n ]\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://your-instance.example.com/api/ai-models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"providerName\": \"Anthropic\",\n \"vercelUniqueName\": \"anthropic\",\n \"websiteUrl\": \"https://www.anthropic.com\",\n \"modelDetails\": [\n {\n \"modelName\": \"claude-sonnet-4-6\",\n \"description\": \"Balanced reasoning + speed.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/ai-models")
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 \"providerName\": \"Anthropic\",\n \"vercelUniqueName\": \"anthropic\",\n \"websiteUrl\": \"https://www.anthropic.com\",\n \"modelDetails\": [\n {\n \"modelName\": \"claude-sonnet-4-6\",\n \"description\": \"Balanced reasoning + speed.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "5f7b1c2e8a1d4e0012c3b4a5",
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Latest Sonnet release."
},
{
"modelName": "claude-haiku-4-5",
"description": "Fast, cost-efficient Haiku."
}
]
}
}{
"success": false,
"message": "Organization credentials not found"
}{
"success": false,
"message": "Organization credentials not found"
}{
"success": false,
"message": "Organization credentials not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Human-readable provider name shown in the admin UI (e.g. Anthropic, OpenAI).
Vercel AI SDK provider identifier (e.g. anthropic, openai, google). Must be unique across the registry.
Provider marketing/docs URL displayed alongside the provider card.
Per-model metadata: modelName and optional description/pricing.
Response
AI model created
Single-AiModel success envelope returned by create/update of an AiModel registry entry.
Available options:
true An AiModel registry entry (provider plus its available models).
Show child attributes
Show child attributes
Example:
{
"_id": "5f7b1c2e8a1d4e0012c3b4a5",
"providerName": "Anthropic",
"vercelUniqueName": "anthropic",
"websiteUrl": "https://www.anthropic.com",
"modelDetails": [
{
"modelName": "claude-sonnet-4-6",
"description": "Latest Sonnet release."
},
{
"modelName": "claude-haiku-4-5",
"description": "Fast, cost-efficient Haiku."
}
],
"createdAt": "2025-09-12T14:22:10.000Z",
"updatedAt": "2026-04-30T09:11:45.000Z"
}
⌘I