Saltar al contenido principal
PATCH
/
api
/
v1
/
llm
/
models
/
registry
/
cluster
/
{id}
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;

var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.Llm.Models.UpdateClusterRegistryModelAsync(
    id: "meetkai:my-custom-chat-v1",
    body: new MeetKai.MKA1.Types.Components.UpdateRegistryModelRequest() {
        DisplayName = "My Custom Chat v2",
        Rpm = 240,
        DefaultParams = new UpdateRegistryModelRequestDefaultParams() {
            Temperature = 0.1D,
            TopP = 0.9D,
        },
    }
);

// handle response
from meetkai_mka1 import SDK


with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

res = sdk.llm.models.update_cluster_registry_model(id="meetkai:my-custom-chat-v1", display_name="My Custom Chat v2", api_format="tts", rpm=240, default_params={
"temperature": 0.1,
"top_p": 0.9,
})

# 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.updateClusterRegistryModel({
id: "meetkai:my-custom-chat-v1",
updateRegistryModelRequest: {
displayName: "My Custom Chat v2",
rpm: 240,
defaultParams: {
temperature: 0.1,
topP: 0.9,
},
},
});

console.log(result);
}

run();
curl --request PATCH \
--url https://apigw.mka1.com/api/v1/llm/models/registry/cluster/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "My Custom Chat v2",
"rpm": 240,
"defaultParams": {
"temperature": 0.1,
"topP": 0.9
}
}
'
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: 'My Custom Chat v2',
rpm: 240,
defaultParams: {temperature: 0.1, topP: 0.9}
})
};

fetch('https://apigw.mka1.com/api/v1/llm/models/registry/cluster/{id}', 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/registry/cluster/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => 'My Custom Chat v2',
'rpm' => 240,
'defaultParams' => [
'temperature' => 0.1,
'topP' => 0.9
]
]),
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/registry/cluster/{id}"

payload := strings.NewReader("{\n \"displayName\": \"My Custom Chat v2\",\n \"rpm\": 240,\n \"defaultParams\": {\n \"temperature\": 0.1,\n \"topP\": 0.9\n }\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://apigw.mka1.com/api/v1/llm/models/registry/cluster/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"My Custom Chat v2\",\n \"rpm\": 240,\n \"defaultParams\": {\n \"temperature\": 0.1,\n \"topP\": 0.9\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://apigw.mka1.com/api/v1/llm/models/registry/cluster/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"My Custom Chat v2\",\n \"rpm\": 240,\n \"defaultParams\": {\n \"temperature\": 0.1,\n \"topP\": 0.9\n }\n}"

response = http.request(request)
puts response.read_body
{
  "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 v2",
    "baseUrl": "https://models.example.com/v1",
    "apiFormat": "responses",
    "created": 1704067200,
    "auth": {
      "type": "api-key",
      "value": "****"
    },
    "capabilities": {
      "modalities": {
        "input": [
          "text"
        ],
        "output": [
          "text"
        ]
      },
      "reasoning": true,
      "supportsTemperature": true,
      "supportsTopP": true
    },
    "contextWindow": 131072,
    "rpm": 240,
    "defaultParams": {
      "temperature": 0.1,
      "topP": 0.9
    },
    "hidden": false,
    "healthCheck": {
      "mode": "preflight",
      "path": "/models"
    },
    "source": "database",
    "immutable": false
  },
  "health": {
    "is_available": true,
    "last_health_check": 1704067200000,
    "error": null
  },
  "created_at": 1704067200000,
  "updated_at": 1704240000000
}

Autorizaciones

Authorization
string
header
requerido

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>.

Parámetros de ruta

id
string
requerido

Cuerpo

application/json
provider
string
modelId
string
displayName
string | null
baseUrl
string<uri> | null
apiFormat
enum<string>
Opciones disponibles:
responses,
completions,
embeddings,
images,
transcriptions,
tts
apiProviderType
enum<string>
Opciones disponibles:
groq,
azure,
meetkai,
meetkaiGateway,
fal,
openai
created
integer
Rango requerido: 0 <= x <= 9007199254740991
auth
object
capabilities
object
contextWindow
integer | null
Rango requerido: 0 < x <= 9007199254740991
rpm
integer | null
Rango requerido: 0 < x <= 9007199254740991
rateLimits
object[] | null
defaultParams
object | null
rerouteRules
object[] | null
hidden
boolean | null
embeddingLimits
object | null
healthCheck
object

Respuesta

200 - application/json

Está bien

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