Skip to main content
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."
    }
  ]
}
'
{
  "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."
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
providerName
string
required

Human-readable provider name shown in the admin UI (e.g. Anthropic, OpenAI).

vercelUniqueName
string
required

Vercel AI SDK provider identifier (e.g. anthropic, openai, google). Must be unique across the registry.

websiteUrl
string

Provider marketing/docs URL displayed alongside the provider card.

modelDetails
object[]

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.

success
enum<boolean>
required
Available options:
true
data
object
required

An AiModel registry entry (provider plus its available models).

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"
}