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.Guardrails.DeleteGuardrailsResourcePolicy(ctx, components.GuardrailsResourceTarget{
ResourceType: components.GuardrailsResourceTargetResourceTypeModel,
ResourceID: "meetkai:functionary-urdu-mini-pak",
})
if err != nil {
log.Fatal(err)
}
if res.DeleteGuardrailsResourcePolicyResponse != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
GuardrailsResourceTarget req = new GuardrailsResourceTarget() {
ResourceType = GuardrailsResourceTargetResourceType.Model,
ResourceId = "meetkai:functionary-urdu-mini-pak",
};
var res = await sdk.Guardrails.DeleteGuardrailsResourcePolicyAsync(req);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.guardrails.delete_guardrails_resource_policy(resource_type="model", resource_id="meetkai:functionary-urdu-mini-pak")
# 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.guardrails.deleteGuardrailsResourcePolicy({
resourceType: "model",
resourceId: "meetkai:functionary-urdu-mini-pak",
});
console.log(result);
}
run();curl --request DELETE \
--url https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "model",
"resource_id": "meetkai:functionary-urdu-mini-pak"
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resource_type: 'model', resource_id: 'meetkai:functionary-urdu-mini-pak'})
};
fetch('https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies', 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/guardrails/resource-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'resource_type' => 'model',
'resource_id' => 'meetkai:functionary-urdu-mini-pak'
]),
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.delete("https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_type\": \"model\",\n \"resource_id\": \"meetkai:functionary-urdu-mini-pak\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource_type\": \"model\",\n \"resource_id\": \"meetkai:functionary-urdu-mini-pak\"\n}"
response = http.request(request)
puts response.read_body{
"object": "guardrails_resource_policy",
"deleted": true
}Remove a resource guardrails policy
Additional guardrails attached to a saved agent in the active team or a catalog model endpoint throughout the organization. Cluster, organization and team policies are always enforced as well. Model aliases resolve to canonical model IDs; auto is not an attachable endpoint. Only organization admins/owners may change these policies. Policies apply to saved-agent versions and future background executions independently of version snapshots. Configured fallback and image-reroute endpoint policies are checked before dispatch as well, even if a fallback is not eventually needed.
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.Guardrails.DeleteGuardrailsResourcePolicy(ctx, components.GuardrailsResourceTarget{
ResourceType: components.GuardrailsResourceTargetResourceTypeModel,
ResourceID: "meetkai:functionary-urdu-mini-pak",
})
if err != nil {
log.Fatal(err)
}
if res.DeleteGuardrailsResourcePolicyResponse != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
GuardrailsResourceTarget req = new GuardrailsResourceTarget() {
ResourceType = GuardrailsResourceTargetResourceType.Model,
ResourceId = "meetkai:functionary-urdu-mini-pak",
};
var res = await sdk.Guardrails.DeleteGuardrailsResourcePolicyAsync(req);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.guardrails.delete_guardrails_resource_policy(resource_type="model", resource_id="meetkai:functionary-urdu-mini-pak")
# 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.guardrails.deleteGuardrailsResourcePolicy({
resourceType: "model",
resourceId: "meetkai:functionary-urdu-mini-pak",
});
console.log(result);
}
run();curl --request DELETE \
--url https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "model",
"resource_id": "meetkai:functionary-urdu-mini-pak"
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resource_type: 'model', resource_id: 'meetkai:functionary-urdu-mini-pak'})
};
fetch('https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies', 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/guardrails/resource-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'resource_type' => 'model',
'resource_id' => 'meetkai:functionary-urdu-mini-pak'
]),
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.delete("https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_type\": \"model\",\n \"resource_id\": \"meetkai:functionary-urdu-mini-pak\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/guardrails/resource-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource_type\": \"model\",\n \"resource_id\": \"meetkai:functionary-urdu-mini-pak\"\n}"
response = http.request(request)
puts response.read_body{
"object": "guardrails_resource_policy",
"deleted": true
}Authorizations
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>.
Body
Was this page helpful?