CSharp (SDK)
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 = AutoEndpoint.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)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();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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/llm/models/catalog"
payload := strings.NewReader("{\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}")
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://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": {
"is_available": true,
"last_health_check": null,
"error": null
},
"created_at": 1704067200000,
"updated_at": 1704067200000,
"effective_price": {
"rates": null,
"source": "unpriced"
}
}Models
Define un modelo de catálogo BYO
Crea una definición BYO propiedad de la API sin activar su nombre.
POST
/
api
/
v1
/
llm
/
models
/
catalog
CSharp (SDK)
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 = AutoEndpoint.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)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();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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/llm/models/catalog"
payload := strings.NewReader("{\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}")
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://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": {
"is_available": true,
"last_health_check": null,
"error": null
},
"created_at": 1704067200000,
"updated_at": 1704067200000,
"effective_price": {
"rates": null,
"source": "unpriced"
}
}Autorizaciones
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Cuerpo
application/json
Required string length:
1 - 255Required string length:
1 - 100Required string length:
1 - 255Opciones disponibles:
responses, completions, embeddings, images, transcriptions, tts Opciones disponibles:
groq, azure, meetkai, meetkaiGateway, fal, openai Rango requerido:
0 <= x <= 9007199254740991- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Rango requerido:
-9007199254740991 < x <= 9007199254740991Rango requerido:
-9007199254740991 < x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Rango requerido:
-9007199254740991 < x <= 9007199254740991Rango requerido:
0 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Respuesta
200 - application/json
Está bien
Opciones disponibles:
byo, serving, cluster Opciones disponibles:
api, yaml Opciones disponibles:
active, available, available_name_blocked Opciones disponibles:
byo, serving, cluster Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
¿Esta página le ayudó?
Enumera el catálogo de modelos de la organización
Anterior
Actualizar un modelo de catálogo BYO
Siguiente
⌘I