Models
Define a BYO catalog model
Creates an API-owned BYO definition without activating its name.
POST
/
api
/
v1
/
llm
/
models
/
catalog
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.addCatalogEntry({
id: "meetkai:custom-chat-v1",
provider: "openai-compatible",
modelId: "custom-chat-v1",
displayName: "Custom Chat v1",
baseUrl: "https://models.example.com/v1",
apiFormat: "responses",
apiProviderType: "openai",
created: 1704067200,
auth: {
type: "api-key",
value: "sk-provider-key",
},
capabilities: {
modalities: {
input: [
"text",
],
output: [
"text",
],
},
reasoning: true,
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.Models.AddCatalogEntry(ctx, components.AddCatalogModelRequest{
ID: "meetkai:custom-chat-v1",
Provider: "openai-compatible",
ModelID: "custom-chat-v1",
DisplayName: mka1.Pointer("Custom Chat v1"),
BaseURL: mka1.Pointer("https://models.example.com/v1"),
APIFormat: components.AddCatalogModelRequestAPIFormatResponses,
APIProviderType: components.AddCatalogModelRequestAPIProviderTypeOpenai,
Created: 1704067200,
Auth: components.CreateAddCatalogModelRequestAuthUnionAPIKey(
components.AddCatalogModelRequestAuth1{
Value: mka1.Pointer("sk-provider-key"),
},
),
Capabilities: components.AddCatalogModelRequestCapabilities{
Modalities: components.AddCatalogModelRequestModalities{
Input: []components.AddCatalogModelRequestInput{
components.AddCatalogModelRequestInputText,
},
Output: []components.AddCatalogModelRequestOutput{
components.AddCatalogModelRequestOutputText,
},
},
Reasoning: true,
},
})
if err != nil {
log.Fatal(err)
}
if res.CatalogEntry != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
AddCatalogModelRequest req = new AddCatalogModelRequest() {
Id = "meetkai:custom-chat-v1",
Provider = "openai-compatible",
ModelId = "custom-chat-v1",
DisplayName = "Custom Chat v1",
BaseUrl = "https://models.example.com/v1",
ApiFormat = AddCatalogModelRequestApiFormat.Responses,
ApiProviderType = AddCatalogModelRequestApiProviderType.Openai,
Created = 1704067200,
Auth = AddCatalogModelRequestAuthUnion.CreateApiKey(
new AddCatalogModelRequestAuth1() {
Value = "sk-provider-key",
}
),
Capabilities = new AddCatalogModelRequestCapabilities() {
Modalities = new AddCatalogModelRequestModalities() {
Input = new List<AddCatalogModelRequestInput>() {
AddCatalogModelRequestInput.Text,
},
Output = new List<AddCatalogModelRequestOutput>() {
AddCatalogModelRequestOutput.Text,
},
},
Reasoning = true,
},
};
var res = await sdk.Llm.Models.AddCatalogEntryAsync(req);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.models.add_catalog_entry(id="meetkai:custom-chat-v1", provider="openai-compatible", model_id="custom-chat-v1", api_format="responses", api_provider_type="openai", created=1704067200, auth={
"type": "api-key",
"value": "sk-provider-key",
}, capabilities={
"modalities": {
"input": [
"text",
],
"output": [
"text",
],
},
"reasoning": True,
}, display_name="Custom Chat v1", base_url="https://models.example.com/v1")
# Handle response
print(res)curl --request POST \
--url https://apigw.mka1.com/api/v1/llm/models/catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "meetkai:custom-chat-v1",
"provider": "openai-compatible",
"modelId": "custom-chat-v1",
"displayName": "Custom Chat v1",
"baseUrl": "https://models.example.com/v1",
"apiFormat": "responses",
"apiProviderType": "openai",
"created": 1704067200,
"auth": {
"type": "api-key",
"value": "sk-provider-key"
},
"capabilities": {
"modalities": {
"input": [
"text"
],
"output": [
"text"
]
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'meetkai:custom-chat-v1',
provider: 'openai-compatible',
modelId: 'custom-chat-v1',
displayName: 'Custom Chat v1',
baseUrl: 'https://models.example.com/v1',
apiFormat: 'responses',
apiProviderType: 'openai',
created: 1704067200,
auth: {type: 'api-key', value: 'sk-provider-key'},
capabilities: {modalities: {input: ['text'], output: ['text']}}
})
};
fetch('https://apigw.mka1.com/api/v1/llm/models/catalog', 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://apigw.mka1.com/api/v1/llm/models/catalog",
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([
'id' => 'meetkai:custom-chat-v1',
'provider' => 'openai-compatible',
'modelId' => 'custom-chat-v1',
'displayName' => 'Custom Chat v1',
'baseUrl' => 'https://models.example.com/v1',
'apiFormat' => 'responses',
'apiProviderType' => 'openai',
'created' => 1704067200,
'auth' => [
'type' => 'api-key',
'value' => 'sk-provider-key'
],
'capabilities' => [
'modalities' => [
'input' => [
'text'
],
'output' => [
'text'
]
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/llm/models/catalog")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"meetkai:custom-chat-v1\",\n \"provider\": \"openai-compatible\",\n \"modelId\": \"custom-chat-v1\",\n \"displayName\": \"Custom Chat v1\",\n \"baseUrl\": \"https://models.example.com/v1\",\n \"apiFormat\": \"responses\",\n \"apiProviderType\": \"openai\",\n \"created\": 1704067200,\n \"auth\": {\n \"type\": \"api-key\",\n \"value\": \"sk-provider-key\"\n },\n \"capabilities\": {\n \"modalities\": {\n \"input\": [\n \"text\"\n ],\n \"output\": [\n \"text\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/models/catalog")
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 \"id\": \"meetkai:custom-chat-v1\",\n \"provider\": \"openai-compatible\",\n \"modelId\": \"custom-chat-v1\",\n \"displayName\": \"Custom Chat v1\",\n \"baseUrl\": \"https://models.example.com/v1\",\n \"apiFormat\": \"responses\",\n \"apiProviderType\": \"openai\",\n \"created\": 1704067200,\n \"auth\": {\n \"type\": \"api-key\",\n \"value\": \"sk-provider-key\"\n },\n \"capabilities\": {\n \"modalities\": {\n \"input\": [\n \"text\"\n ],\n \"output\": [\n \"text\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"model_id": "meetkai:custom-chat-v1",
"source": "byo",
"origin": "api",
"activation_state": "available",
"blocker_source": null,
"activated_by": null,
"activated_at": null,
"provider": "openai-compatible",
"provider_model_id": "custom-chat-v1",
"definition": {
"id": "meetkai:custom-chat-v1",
"provider": "openai-compatible",
"modelId": "custom-chat-v1",
"displayName": "Custom Chat v1",
"baseUrl": "https://models.example.com/v1",
"apiFormat": "responses",
"apiProviderType": "openai",
"created": 1704067200,
"auth": {
"type": "api-key",
"value": "****"
},
"capabilities": {
"modalities": {
"input": [
"text"
],
"output": [
"text"
]
}
},
"source": "database",
"immutable": false
},
"health": {
"status": "unknown",
"is_available": true,
"last_health_check": null,
"error": null
},
"created_at": 1704067200000,
"updated_at": 1704067200000,
"effective_price": {
"rates": null,
"source": "unpriced"
}
}Authorizations
Body
application/json
Response
200 - application/json
OK
Was this page helpful?
⌘I
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.addCatalogEntry({
id: "meetkai:custom-chat-v1",
provider: "openai-compatible",
modelId: "custom-chat-v1",
displayName: "Custom Chat v1",
baseUrl: "https://models.example.com/v1",
apiFormat: "responses",
apiProviderType: "openai",
created: 1704067200,
auth: {
type: "api-key",
value: "sk-provider-key",
},
capabilities: {
modalities: {
input: [
"text",
],
output: [
"text",
],
},
reasoning: true,
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.Models.AddCatalogEntry(ctx, components.AddCatalogModelRequest{
ID: "meetkai:custom-chat-v1",
Provider: "openai-compatible",
ModelID: "custom-chat-v1",
DisplayName: mka1.Pointer("Custom Chat v1"),
BaseURL: mka1.Pointer("https://models.example.com/v1"),
APIFormat: components.AddCatalogModelRequestAPIFormatResponses,
APIProviderType: components.AddCatalogModelRequestAPIProviderTypeOpenai,
Created: 1704067200,
Auth: components.CreateAddCatalogModelRequestAuthUnionAPIKey(
components.AddCatalogModelRequestAuth1{
Value: mka1.Pointer("sk-provider-key"),
},
),
Capabilities: components.AddCatalogModelRequestCapabilities{
Modalities: components.AddCatalogModelRequestModalities{
Input: []components.AddCatalogModelRequestInput{
components.AddCatalogModelRequestInputText,
},
Output: []components.AddCatalogModelRequestOutput{
components.AddCatalogModelRequestOutputText,
},
},
Reasoning: true,
},
})
if err != nil {
log.Fatal(err)
}
if res.CatalogEntry != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
AddCatalogModelRequest req = new AddCatalogModelRequest() {
Id = "meetkai:custom-chat-v1",
Provider = "openai-compatible",
ModelId = "custom-chat-v1",
DisplayName = "Custom Chat v1",
BaseUrl = "https://models.example.com/v1",
ApiFormat = AddCatalogModelRequestApiFormat.Responses,
ApiProviderType = AddCatalogModelRequestApiProviderType.Openai,
Created = 1704067200,
Auth = AddCatalogModelRequestAuthUnion.CreateApiKey(
new AddCatalogModelRequestAuth1() {
Value = "sk-provider-key",
}
),
Capabilities = new AddCatalogModelRequestCapabilities() {
Modalities = new AddCatalogModelRequestModalities() {
Input = new List<AddCatalogModelRequestInput>() {
AddCatalogModelRequestInput.Text,
},
Output = new List<AddCatalogModelRequestOutput>() {
AddCatalogModelRequestOutput.Text,
},
},
Reasoning = true,
},
};
var res = await sdk.Llm.Models.AddCatalogEntryAsync(req);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.models.add_catalog_entry(id="meetkai:custom-chat-v1", provider="openai-compatible", model_id="custom-chat-v1", api_format="responses", api_provider_type="openai", created=1704067200, auth={
"type": "api-key",
"value": "sk-provider-key",
}, capabilities={
"modalities": {
"input": [
"text",
],
"output": [
"text",
],
},
"reasoning": True,
}, display_name="Custom Chat v1", base_url="https://models.example.com/v1")
# Handle response
print(res)curl --request POST \
--url https://apigw.mka1.com/api/v1/llm/models/catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "meetkai:custom-chat-v1",
"provider": "openai-compatible",
"modelId": "custom-chat-v1",
"displayName": "Custom Chat v1",
"baseUrl": "https://models.example.com/v1",
"apiFormat": "responses",
"apiProviderType": "openai",
"created": 1704067200,
"auth": {
"type": "api-key",
"value": "sk-provider-key"
},
"capabilities": {
"modalities": {
"input": [
"text"
],
"output": [
"text"
]
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'meetkai:custom-chat-v1',
provider: 'openai-compatible',
modelId: 'custom-chat-v1',
displayName: 'Custom Chat v1',
baseUrl: 'https://models.example.com/v1',
apiFormat: 'responses',
apiProviderType: 'openai',
created: 1704067200,
auth: {type: 'api-key', value: 'sk-provider-key'},
capabilities: {modalities: {input: ['text'], output: ['text']}}
})
};
fetch('https://apigw.mka1.com/api/v1/llm/models/catalog', 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://apigw.mka1.com/api/v1/llm/models/catalog",
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([
'id' => 'meetkai:custom-chat-v1',
'provider' => 'openai-compatible',
'modelId' => 'custom-chat-v1',
'displayName' => 'Custom Chat v1',
'baseUrl' => 'https://models.example.com/v1',
'apiFormat' => 'responses',
'apiProviderType' => 'openai',
'created' => 1704067200,
'auth' => [
'type' => 'api-key',
'value' => 'sk-provider-key'
],
'capabilities' => [
'modalities' => [
'input' => [
'text'
],
'output' => [
'text'
]
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/llm/models/catalog")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"meetkai:custom-chat-v1\",\n \"provider\": \"openai-compatible\",\n \"modelId\": \"custom-chat-v1\",\n \"displayName\": \"Custom Chat v1\",\n \"baseUrl\": \"https://models.example.com/v1\",\n \"apiFormat\": \"responses\",\n \"apiProviderType\": \"openai\",\n \"created\": 1704067200,\n \"auth\": {\n \"type\": \"api-key\",\n \"value\": \"sk-provider-key\"\n },\n \"capabilities\": {\n \"modalities\": {\n \"input\": [\n \"text\"\n ],\n \"output\": [\n \"text\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/models/catalog")
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 \"id\": \"meetkai:custom-chat-v1\",\n \"provider\": \"openai-compatible\",\n \"modelId\": \"custom-chat-v1\",\n \"displayName\": \"Custom Chat v1\",\n \"baseUrl\": \"https://models.example.com/v1\",\n \"apiFormat\": \"responses\",\n \"apiProviderType\": \"openai\",\n \"created\": 1704067200,\n \"auth\": {\n \"type\": \"api-key\",\n \"value\": \"sk-provider-key\"\n },\n \"capabilities\": {\n \"modalities\": {\n \"input\": [\n \"text\"\n ],\n \"output\": [\n \"text\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"model_id": "meetkai:custom-chat-v1",
"source": "byo",
"origin": "api",
"activation_state": "available",
"blocker_source": null,
"activated_by": null,
"activated_at": null,
"provider": "openai-compatible",
"provider_model_id": "custom-chat-v1",
"definition": {
"id": "meetkai:custom-chat-v1",
"provider": "openai-compatible",
"modelId": "custom-chat-v1",
"displayName": "Custom Chat v1",
"baseUrl": "https://models.example.com/v1",
"apiFormat": "responses",
"apiProviderType": "openai",
"created": 1704067200,
"auth": {
"type": "api-key",
"value": "****"
},
"capabilities": {
"modalities": {
"input": [
"text"
],
"output": [
"text"
]
}
},
"source": "database",
"immutable": false
},
"health": {
"status": "unknown",
"is_available": true,
"last_health_check": null,
"error": null
},
"created_at": 1704067200000,
"updated_at": 1704067200000,
"effective_price": {
"rates": null,
"source": "unpriced"
}
}