Skip to main content
POST
/
api
/
v1
/
llm
/
models
/
registry
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.models.addRegistryModel({
    addRegistryModelRequest: {
      id: "meetkai:my-custom-chat-v1",
      provider: "openai-compatible",
      modelId: "my-custom-chat-v1",
      displayName: "My Custom Chat v1",
      baseUrl: "https://models.example.com/v1",
      apiFormat: "responses",
      created: 1704067200,
      auth: {
        type: "api-key",
        envVar: "CUSTOM_MODEL_API_KEY",
      },
      capabilities: {
        modalities: {
          input: [
            "text",
          ],
          output: [
            "text",
          ],
        },
        reasoning: true,
        supportsTemperature: true,
        supportsTopP: true,
      },
      contextWindow: 131072,
      rpm: 120,
      defaultParams: {
        temperature: 0.2,
        topP: 0.95,
      },
      hidden: false,
      healthCheck: {
        url: "https://models.example.com/health",
        method: "GET",
      },
    },
  });

  console.log(result);
}

run();
{
  "id": "meetkai:my-custom-chat-v1",
  "provider": "openai-compatible",
  "model_id": "my-custom-chat-v1",
  "source": "database",
  "immutable": false,
  "definition": {
    "id": "meetkai:my-custom-chat-v1",
    "provider": "openai-compatible",
    "modelId": "my-custom-chat-v1",
    "displayName": "My Custom Chat v1",
    "baseUrl": "https://models.example.com/v1",
    "apiFormat": "responses",
    "created": 1704067200,
    "auth": {
      "type": "api-key",
      "envVar": "CUSTOM_MODEL_API_KEY"
    },
    "capabilities": {
      "modalities": {
        "input": [
          "text"
        ],
        "output": [
          "text"
        ]
      },
      "reasoning": true,
      "supportsTemperature": true,
      "supportsTopP": true
    },
    "contextWindow": 131072,
    "rpm": 120,
    "defaultParams": {
      "temperature": 0.2,
      "topP": 0.95
    },
    "hidden": false,
    "healthCheck": {
      "url": "https://models.example.com/health",
      "method": "GET"
    },
    "source": "database",
    "immutable": false
  },
  "health": {
    "is_available": true,
    "last_health_check": 1704067200000,
    "error": null
  },
  "created_at": 1704067200000,
  "updated_at": 1704153600000
}

Authorizations

Authorization
string
header
required

Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.

Headers

X-On-Behalf-Of
string

Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.

Body

application/json
id
string
required
provider
string
required
modelId
string
required
apiFormat
enum<string>
required
Available options:
responses,
completions,
embeddings,
images
created
integer
required
Required range: 0 <= x <= 9007199254740991
auth
object
required
capabilities
object
required
contextWindow
integer
required
Required range: -9007199254740991 < x <= 9007199254740991
publicName
string
aliases
string[]
displayName
string
baseUrl
string<uri>
rpm
integer
Required range: -9007199254740991 < x <= 9007199254740991
defaultParams
object
rerouteRules
object[]
hidden
boolean
embeddingLimits
object
healthCheck

Response

200 - application/json

OK

id
string
required
provider
string
required
model_id
string
required
source
string
required
immutable
boolean
required
definition
object
required
health
object
required
created_at
number | null
required
updated_at
number | null
required