Skip to main content

Class: AIGatewayGuardrailsClient

Defined in: src/ai-gateway/guardrails-client.ts:41

Client for AI Gateway guardrail operations (data plane), with an admin-plane capability catalog.

Constructors​

Constructor​

new AIGatewayGuardrailsClient(opts): AIGatewayGuardrailsClient;

Defined in: src/ai-gateway/guardrails-client.ts:47

Parameters​

ParameterType
optsAIGatewaySubClientOptions & { adminBaseUrl?: string; }

Returns​

AIGatewayGuardrailsClient

Methods​

getCatalog()​

getCatalog(): Promise<objectOutputType<{
object: ZodString;
evals: ZodArray<ZodObject<{
id: ZodString;
name: ZodString;
type: ZodString;
guardrailCategory: ZodString;
targets: ZodOptional<ZodArray<ZodString, "many">>;
supportedHooks: ZodOptional<ZodArray<ZodString, "many">>;
description: ZodArray<ZodRecord<ZodString, ZodUnknown>, "many">;
parameters: ZodObject<{
type: ZodString;
properties: ZodRecord<ZodString, ZodUnknown>;
required: ZodOptional<ZodArray<ZodString, "many">>;
}, "passthrough", ZodTypeAny, objectOutputType<{
type: ZodString;
properties: ZodRecord<ZodString, ZodUnknown>;
required: ZodOptional<ZodArray<..., ...>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
type: ZodString;
properties: ZodRecord<ZodString, ZodUnknown>;
required: ZodOptional<ZodArray<..., ...>>;
}, ZodTypeAny, "passthrough">>;
source: ZodOptional<ZodObject<{
id: ZodString;
name: ZodString;
description: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
description: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
description: ZodString;
}, ZodTypeAny, "passthrough">>>;
deny: ZodOptional<ZodBoolean>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
type: ZodString;
guardrailCategory: ZodString;
targets: ZodOptional<ZodArray<ZodString, "many">>;
supportedHooks: ZodOptional<ZodArray<ZodString, "many">>;
description: ZodArray<ZodRecord<ZodString, ZodUnknown>, "many">;
parameters: ZodObject<{
type: ZodString;
properties: ZodRecord<ZodString, ZodUnknown>;
required: ZodOptional<ZodArray<..., ...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
type: ZodString;
properties: ZodRecord<..., ...>;
required: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
type: ZodString;
properties: ZodRecord<..., ...>;
required: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>;
source: ZodOptional<ZodObject<{
id: ZodString;
name: ZodString;
description: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ...;
name: ...;
description: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ...;
name: ...;
description: ...;
}, ZodTypeAny, "passthrough">>>;
deny: ZodOptional<ZodBoolean>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
type: ZodString;
guardrailCategory: ZodString;
targets: ZodOptional<ZodArray<ZodString, "many">>;
supportedHooks: ZodOptional<ZodArray<ZodString, "many">>;
description: ZodArray<ZodRecord<ZodString, ZodUnknown>, "many">;
parameters: ZodObject<{
type: ZodString;
properties: ZodRecord<ZodString, ZodUnknown>;
required: ZodOptional<ZodArray<..., ...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
type: ZodString;
properties: ZodRecord<..., ...>;
required: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
type: ZodString;
properties: ZodRecord<..., ...>;
required: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>;
source: ZodOptional<ZodObject<{
id: ZodString;
name: ZodString;
description: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ...;
name: ...;
description: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ...;
name: ...;
description: ...;
}, ZodTypeAny, "passthrough">>>;
deny: ZodOptional<ZodBoolean>;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/guardrails-client.ts:55

Available guardrail evaluators and parameter schemas, not configured guardrail instances.

Returns​

Promise<objectOutputType<{ object: ZodString; evals: ZodArray<ZodObject<{ id: ZodString; name: ZodString; type: ZodString; guardrailCategory: ZodString; targets: ZodOptional<ZodArray<ZodString, "many">>; supportedHooks: ZodOptional<ZodArray<ZodString, "many">>; description: ZodArray<ZodRecord<ZodString, ZodUnknown>, "many">; parameters: ZodObject<{ type: ZodString; properties: ZodRecord<ZodString, ZodUnknown>; required: ZodOptional<ZodArray<ZodString, "many">>; }, "passthrough", ZodTypeAny, objectOutputType<{ type: ZodString; properties: ZodRecord<ZodString, ZodUnknown>; required: ZodOptional<ZodArray<..., ...>>; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; properties: ZodRecord<ZodString, ZodUnknown>; required: ZodOptional<ZodArray<..., ...>>; }, ZodTypeAny, "passthrough">>; source: ZodOptional<ZodObject<{ id: ZodString; name: ZodString; description: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ZodString; name: ZodString; description: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ZodString; name: ZodString; description: ZodString; }, ZodTypeAny, "passthrough">>>; deny: ZodOptional<ZodBoolean>; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ZodString; name: ZodString; type: ZodString; guardrailCategory: ZodString; targets: ZodOptional<ZodArray<ZodString, "many">>; supportedHooks: ZodOptional<ZodArray<ZodString, "many">>; description: ZodArray<ZodRecord<ZodString, ZodUnknown>, "many">; parameters: ZodObject<{ type: ZodString; properties: ZodRecord<ZodString, ZodUnknown>; required: ZodOptional<ZodArray<..., ...>>; }, "passthrough", ZodTypeAny, objectOutputType<{ type: ZodString; properties: ZodRecord<..., ...>; required: ZodOptional<...>; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; properties: ZodRecord<..., ...>; required: ZodOptional<...>; }, ZodTypeAny, "passthrough">>; source: ZodOptional<ZodObject<{ id: ZodString; name: ZodString; description: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ...; name: ...; description: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ...; name: ...; description: ...; }, ZodTypeAny, "passthrough">>>; deny: ZodOptional<ZodBoolean>; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ZodString; name: ZodString; type: ZodString; guardrailCategory: ZodString; targets: ZodOptional<ZodArray<ZodString, "many">>; supportedHooks: ZodOptional<ZodArray<ZodString, "many">>; description: ZodArray<ZodRecord<ZodString, ZodUnknown>, "many">; parameters: ZodObject<{ type: ZodString; properties: ZodRecord<ZodString, ZodUnknown>; required: ZodOptional<ZodArray<..., ...>>; }, "passthrough", ZodTypeAny, objectOutputType<{ type: ZodString; properties: ZodRecord<..., ...>; required: ZodOptional<...>; }, ZodTypeAny, "passthrough">, objectInputType<{ type: ZodString; properties: ZodRecord<..., ...>; required: ZodOptional<...>; }, ZodTypeAny, "passthrough">>; source: ZodOptional<ZodObject<{ id: ZodString; name: ZodString; description: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ...; name: ...; description: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ...; name: ...; description: ...; }, ZodTypeAny, "passthrough">>>; deny: ZodOptional<ZodBoolean>; }, ZodTypeAny, "passthrough">>, "many">; }, ZodTypeAny, "passthrough">>

Example​

`await gw.guardrails.getCatalog();`

getMcpServers()​

getMcpServers(guardrailId): Promise<{
[key: string]: unknown;
id: string;
guardrail_id: string;
mcp_server_id: string;
run_on: string[];
capability_ids?: string[];
}[]>;

Defined in: src/ai-gateway/guardrails-client.ts:74

List guardrail mappings to MCP servers.

Parameters​

ParameterType
guardrailIdstring

Returns​

Promise<{ [key: string]: unknown; id: string; guardrail_id: string; mcp_server_id: string; run_on: string[]; capability_ids?: string[]; }[]>

Example​

`await gw.guardrails.getMcpServers(id);`

syncMcpServers()​

syncMcpServers(guardrailId, body): Promise<{
[key: string]: unknown;
changed: boolean;
added: number;
updated: number;
removed: number;
}>;

Defined in: src/ai-gateway/guardrails-client.ts:87

Replace all MCP server mappings on this guardrail.

Parameters​

ParameterType
guardrailIdstring
body{ mcp_servers: { [key: string]: { run_on?: string[]; mcp_integration_capability_ids?: string[]; }; }; }
body.mcp_servers{ [key: string]: { run_on?: string[]; mcp_integration_capability_ids?: string[]; }; }

Returns​

Promise<{ [key: string]: unknown; changed: boolean; added: number; updated: number; removed: number; }>

Example​

`await gw.guardrails.syncMcpServers(id, body);`

upsertMcpServer()​

upsertMcpServer(
guardrailId,
mcpServerId,
body): Promise<{
[key: string]: unknown;
map_id: string;
}>;

Defined in: src/ai-gateway/guardrails-client.ts:105

Enable or disable one MCP server mapping.

Parameters​

ParameterType
guardrailIdstring
mcpServerIdstring
body{ run_on?: string[]; mcp_integration_capability_ids?: string[]; }
body.run_on?string[]
body.mcp_integration_capability_ids?string[]

Returns​

Promise<{ [key: string]: unknown; map_id: string; }>

Example​

`await gw.guardrails.upsertMcpServer(id, serverId, body);`

list()​

list(opts): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>;
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
status: ZodString;
owner_id: ZodString;
updated_by: ZodNullable<ZodString>;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>;
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
status: ZodString;
owner_id: ZodString;
updated_by: ZodNullable<ZodString>;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>;
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
status: ZodString;
owner_id: ZodString;
updated_by: ZodNullable<ZodString>;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/guardrails-client.ts:137

List guardrails in a workspace.

Parameters​

ParameterTypeDescription
optsAIGatewayWorkspaceScopedListOptionsMust include the workspace UUID.

Returns​

Promise<objectOutputType<{ object: ZodString; total: ZodNumber; success: ZodOptional<ZodBoolean>; has_more: ZodOptional<ZodBoolean>; data: ZodArray<ZodObject<{ target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>; id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; status: ZodString; owner_id: ZodString; updated_by: ZodNullable<ZodString>; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>; id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; status: ZodString; owner_id: ZodString; updated_by: ZodNullable<ZodString>; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>; id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; status: ZodString; owner_id: ZodString; updated_by: ZodNullable<ZodString>; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; }, ZodTypeAny, "passthrough">>, "many">; }, ZodTypeAny, "passthrough">>

Guardrails defined on that workspace.

Example​

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

const g = await gw.guardrails.list({ workspaceId: '16f7e90d-382a-4e78-b577-1b01eb5f8297' });
// g.data[0].id => 'pg-prisma-099a16'

get()​

get(guardrailId): Promise<objectOutputType<{
target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>;
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
status: ZodString;
owner_id: ZodString;
updated_by: ZodNullable<ZodString>;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
mcp_server_mappings: ZodOptional<ZodArray<ZodType<{
[key: string]: unknown;
id: string;
guardrail_id: string;
mcp_server_id: string;
run_on: string[];
capability_ids?: string[];
}, ZodTypeDef, {
[key: string]: unknown;
id: string;
guardrail_id: string;
mcp_server_id: string;
run_on: string[];
capability_ids?: string[];
}>, "many">>;
checks: ZodArray<ZodObject<{
id: ZodString;
parameters: ZodType<
| {
[key: string]: unknown;
jwksUri: string;
headerKey: string;
cacheMaxAge?: ... | ...;
clockTolerance?: ... | ...;
maxTokenAge?: ... | ...;
algorithms?: ... | ...;
}
| {
[key: string]: unknown;
models: ...[];
}
| {
[key: string]: unknown;
rule: string;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
minSentences?: ... | ...;
maxSentences?: ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
minWords?: ... | ...;
maxWords?: ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
minCharacters?: ... | ...;
maxCharacters?: ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
schema: {
[key: ...]: ...;
};
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
keys: ...[];
operator: string;
}
| {
[key: string]: unknown;
words: ...[];
operator: string;
}
| {
[key: string]: unknown;
onlyDNS?: ... | ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
format: string;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
webhookURL: string;
headers?: ... | ...;
timeout?: ... | ...;
failOnError?: ... | ... | ...;
}
| {
[key: string]: unknown;
suffix: string;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
metadataKeys: ...[];
operator: string;
}
| {
[key: string]: unknown;
allowedTypes?: ... | ...;
blockedTypes?: ... | ...;
}
| {
[key: string]: unknown;
prompt_injection_threshold?: ... | ...;
toxicity_threshold?: ... | ...;
evasion_threshold?: ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
projectID: string;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
scanners: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
profile: string;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
categories: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
language?: ... | ...;
not?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
redact?: ... | ... | ...;
categories: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
categories: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
guardrailVersion: string;
guardrailId: string;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
prompt_injection?: ... | ... | ...;
prompt_injection_threshold?: ... | ...;
toxic?: ... | ... | ...;
toxic_threshold?: ... | ...;
jail_break?: ... | ... | ...;
jail_break_threshold?: ... | ...;
malicious_url?: ... | ... | ...;
malicious_url_threshold?: ... | ...;
biased?: ... | ... | ...;
biased_threshold?: ... | ...;
harmful?: ... | ... | ...;
harmful_threshold?: ... | ...;
language?: ... | ... | ...;
language_values?: ... | ...;
pii?: ... | ... | ...;
pii_redact?: ... | ... | ...;
pii_categories?: ... | ...;
secrets?: ... | ... | ...;
secrets_redact?: ... | ... | ...;
secrets_categories?: ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
blocklistNames?: ... | ...;
apiVersion?: ... | ...;
severity?: ... | ...;
categories?: ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
domain?: ... | ...;
apiVersion?: ... | ...;
modelVersion?: ... | ...;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
profile_name: string;
ai_model?: ... | ...;
app_user?: ... | ...;
}
| {
[key: string]: unknown;
}, ZodTypeDef,
| {
[key: string]: unknown;
jwksUri: string;
headerKey: string;
cacheMaxAge?: ... | ...;
clockTolerance?: ... | ...;
maxTokenAge?: ... | ...;
algorithms?: ... | ...;
}
| {
[key: string]: unknown;
models: ...[];
}
| {
[key: string]: unknown;
rule: string;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
minSentences?: ... | ...;
maxSentences?: ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
minWords?: ... | ...;
maxWords?: ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
minCharacters?: ... | ...;
maxCharacters?: ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
schema: {
[key: ...]: ...;
};
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
keys: ...[];
operator: string;
}
| {
[key: string]: unknown;
words: ...[];
operator: string;
}
| {
[key: string]: unknown;
onlyDNS?: ... | ... | ...;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
format: string;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
webhookURL: string;
headers?: ... | ...;
timeout?: ... | ...;
failOnError?: ... | ... | ...;
}
| {
[key: string]: unknown;
suffix: string;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
not?: ... | ... | ...;
}
| {
[key: string]: unknown;
metadataKeys: ...[];
operator: string;
}
| {
[key: string]: unknown;
allowedTypes?: ... | ...;
blockedTypes?: ... | ...;
}
| {
[key: string]: unknown;
prompt_injection_threshold?: ... | ...;
toxicity_threshold?: ... | ...;
evasion_threshold?: ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
projectID: string;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
scanners: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
profile: string;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
categories: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
language?: ... | ...;
not?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
redact?: ... | ... | ...;
categories: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
categories: ...[];
timeout?: ... | ...;
}
| {
[key: string]: unknown;
guardrailVersion: string;
guardrailId: string;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
prompt_injection?: ... | ... | ...;
prompt_injection_threshold?: ... | ...;
toxic?: ... | ... | ...;
toxic_threshold?: ... | ...;
jail_break?: ... | ... | ...;
jail_break_threshold?: ... | ...;
malicious_url?: ... | ... | ...;
malicious_url_threshold?: ... | ...;
biased?: ... | ... | ...;
biased_threshold?: ... | ...;
harmful?: ... | ... | ...;
harmful_threshold?: ... | ...;
language?: ... | ... | ...;
language_values?: ... | ...;
pii?: ... | ... | ...;
pii_redact?: ... | ... | ...;
pii_categories?: ... | ...;
secrets?: ... | ... | ...;
secrets_redact?: ... | ... | ...;
secrets_categories?: ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
blocklistNames?: ... | ...;
apiVersion?: ... | ...;
severity?: ... | ...;
categories?: ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
domain?: ... | ...;
apiVersion?: ... | ...;
modelVersion?: ... | ...;
redact?: ... | ... | ...;
timeout?: ... | ...;
}
| {
[key: string]: unknown;
profile_name: string;
ai_model?: ... | ...;
app_user?: ... | ...;
}
| {
[key: string]: unknown;
}>;
name: ZodOptional<ZodString>;
is_enabled: ZodBoolean;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
parameters: ZodType<
| {
[key: ...]: ...;
jwksUri: ...;
headerKey: ...;
cacheMaxAge?: ...;
clockTolerance?: ...;
maxTokenAge?: ...;
algorithms?: ...;
}
| {
[key: ...]: ...;
models: ...;
}
| {
[key: ...]: ...;
rule: ...;
not?: ...;
}
| {
[key: ...]: ...;
minSentences?: ...;
maxSentences?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minWords?: ...;
maxWords?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minCharacters?: ...;
maxCharacters?: ...;
not?: ...;
}
| {
[key: ...]: ...;
schema: ...;
not?: ...;
}
| {
[key: ...]: ...;
keys: ...;
operator: ...;
}
| {
[key: ...]: ...;
words: ...;
operator: ...;
}
| {
[key: ...]: ...;
onlyDNS?: ...;
not?: ...;
}
| {
[key: ...]: ...;
format: ...;
not?: ...;
}
| {
[key: ...]: ...;
webhookURL: ...;
headers?: ...;
timeout?: ...;
failOnError?: ...;
}
| {
[key: ...]: ...;
suffix: ...;
not?: ...;
}
| {
[key: ...]: ...;
not?: ...;
}
| {
[key: ...]: ...;
metadataKeys: ...;
operator: ...;
}
| {
[key: ...]: ...;
allowedTypes?: ...;
blockedTypes?: ...;
}
| {
[key: ...]: ...;
prompt_injection_threshold?: ...;
toxicity_threshold?: ...;
evasion_threshold?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
projectID: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
scanners: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
language?: ...;
not?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
guardrailVersion: ...;
guardrailId: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
prompt_injection?: ...;
prompt_injection_threshold?: ...;
toxic?: ...;
toxic_threshold?: ...;
jail_break?: ...;
jail_break_threshold?: ...;
malicious_url?: ...;
malicious_url_threshold?: ...;
biased?: ...;
biased_threshold?: ...;
harmful?: ...;
harmful_threshold?: ...;
language?: ...;
language_values?: ...;
pii?: ...;
pii_redact?: ...;
pii_categories?: ...;
secrets?: ...;
secrets_redact?: ...;
secrets_categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
blocklistNames?: ...;
apiVersion?: ...;
severity?: ...;
categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
domain?: ...;
apiVersion?: ...;
modelVersion?: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile_name: ...;
ai_model?: ...;
app_user?: ...;
}
| {
[key: ...]: ...;
}, ZodTypeDef,
| {
[key: ...]: ...;
jwksUri: ...;
headerKey: ...;
cacheMaxAge?: ...;
clockTolerance?: ...;
maxTokenAge?: ...;
algorithms?: ...;
}
| {
[key: ...]: ...;
models: ...;
}
| {
[key: ...]: ...;
rule: ...;
not?: ...;
}
| {
[key: ...]: ...;
minSentences?: ...;
maxSentences?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minWords?: ...;
maxWords?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minCharacters?: ...;
maxCharacters?: ...;
not?: ...;
}
| {
[key: ...]: ...;
schema: ...;
not?: ...;
}
| {
[key: ...]: ...;
keys: ...;
operator: ...;
}
| {
[key: ...]: ...;
words: ...;
operator: ...;
}
| {
[key: ...]: ...;
onlyDNS?: ...;
not?: ...;
}
| {
[key: ...]: ...;
format: ...;
not?: ...;
}
| {
[key: ...]: ...;
webhookURL: ...;
headers?: ...;
timeout?: ...;
failOnError?: ...;
}
| {
[key: ...]: ...;
suffix: ...;
not?: ...;
}
| {
[key: ...]: ...;
not?: ...;
}
| {
[key: ...]: ...;
metadataKeys: ...;
operator: ...;
}
| {
[key: ...]: ...;
allowedTypes?: ...;
blockedTypes?: ...;
}
| {
[key: ...]: ...;
prompt_injection_threshold?: ...;
toxicity_threshold?: ...;
evasion_threshold?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
projectID: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
scanners: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
language?: ...;
not?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
guardrailVersion: ...;
guardrailId: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
prompt_injection?: ...;
prompt_injection_threshold?: ...;
toxic?: ...;
toxic_threshold?: ...;
jail_break?: ...;
jail_break_threshold?: ...;
malicious_url?: ...;
malicious_url_threshold?: ...;
biased?: ...;
biased_threshold?: ...;
harmful?: ...;
harmful_threshold?: ...;
language?: ...;
language_values?: ...;
pii?: ...;
pii_redact?: ...;
pii_categories?: ...;
secrets?: ...;
secrets_redact?: ...;
secrets_categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
blocklistNames?: ...;
apiVersion?: ...;
severity?: ...;
categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
domain?: ...;
apiVersion?: ...;
modelVersion?: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile_name: ...;
ai_model?: ...;
app_user?: ...;
}
| {
[key: ...]: ...;
}>;
name: ZodOptional<ZodString>;
is_enabled: ZodBoolean;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
parameters: ZodType<
| {
[key: ...]: ...;
jwksUri: ...;
headerKey: ...;
cacheMaxAge?: ...;
clockTolerance?: ...;
maxTokenAge?: ...;
algorithms?: ...;
}
| {
[key: ...]: ...;
models: ...;
}
| {
[key: ...]: ...;
rule: ...;
not?: ...;
}
| {
[key: ...]: ...;
minSentences?: ...;
maxSentences?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minWords?: ...;
maxWords?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minCharacters?: ...;
maxCharacters?: ...;
not?: ...;
}
| {
[key: ...]: ...;
schema: ...;
not?: ...;
}
| {
[key: ...]: ...;
keys: ...;
operator: ...;
}
| {
[key: ...]: ...;
words: ...;
operator: ...;
}
| {
[key: ...]: ...;
onlyDNS?: ...;
not?: ...;
}
| {
[key: ...]: ...;
format: ...;
not?: ...;
}
| {
[key: ...]: ...;
webhookURL: ...;
headers?: ...;
timeout?: ...;
failOnError?: ...;
}
| {
[key: ...]: ...;
suffix: ...;
not?: ...;
}
| {
[key: ...]: ...;
not?: ...;
}
| {
[key: ...]: ...;
metadataKeys: ...;
operator: ...;
}
| {
[key: ...]: ...;
allowedTypes?: ...;
blockedTypes?: ...;
}
| {
[key: ...]: ...;
prompt_injection_threshold?: ...;
toxicity_threshold?: ...;
evasion_threshold?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
projectID: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
scanners: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
language?: ...;
not?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
guardrailVersion: ...;
guardrailId: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
prompt_injection?: ...;
prompt_injection_threshold?: ...;
toxic?: ...;
toxic_threshold?: ...;
jail_break?: ...;
jail_break_threshold?: ...;
malicious_url?: ...;
malicious_url_threshold?: ...;
biased?: ...;
biased_threshold?: ...;
harmful?: ...;
harmful_threshold?: ...;
language?: ...;
language_values?: ...;
pii?: ...;
pii_redact?: ...;
pii_categories?: ...;
secrets?: ...;
secrets_redact?: ...;
secrets_categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
blocklistNames?: ...;
apiVersion?: ...;
severity?: ...;
categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
domain?: ...;
apiVersion?: ...;
modelVersion?: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile_name: ...;
ai_model?: ...;
app_user?: ...;
}
| {
[key: ...]: ...;
}, ZodTypeDef,
| {
[key: ...]: ...;
jwksUri: ...;
headerKey: ...;
cacheMaxAge?: ...;
clockTolerance?: ...;
maxTokenAge?: ...;
algorithms?: ...;
}
| {
[key: ...]: ...;
models: ...;
}
| {
[key: ...]: ...;
rule: ...;
not?: ...;
}
| {
[key: ...]: ...;
minSentences?: ...;
maxSentences?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minWords?: ...;
maxWords?: ...;
not?: ...;
}
| {
[key: ...]: ...;
minCharacters?: ...;
maxCharacters?: ...;
not?: ...;
}
| {
[key: ...]: ...;
schema: ...;
not?: ...;
}
| {
[key: ...]: ...;
keys: ...;
operator: ...;
}
| {
[key: ...]: ...;
words: ...;
operator: ...;
}
| {
[key: ...]: ...;
onlyDNS?: ...;
not?: ...;
}
| {
[key: ...]: ...;
format: ...;
not?: ...;
}
| {
[key: ...]: ...;
webhookURL: ...;
headers?: ...;
timeout?: ...;
failOnError?: ...;
}
| {
[key: ...]: ...;
suffix: ...;
not?: ...;
}
| {
[key: ...]: ...;
not?: ...;
}
| {
[key: ...]: ...;
metadataKeys: ...;
operator: ...;
}
| {
[key: ...]: ...;
allowedTypes?: ...;
blockedTypes?: ...;
}
| {
[key: ...]: ...;
prompt_injection_threshold?: ...;
toxicity_threshold?: ...;
evasion_threshold?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
projectID: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
scanners: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
language?: ...;
not?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
categories: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
guardrailVersion: ...;
guardrailId: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
prompt_injection?: ...;
prompt_injection_threshold?: ...;
toxic?: ...;
toxic_threshold?: ...;
jail_break?: ...;
jail_break_threshold?: ...;
malicious_url?: ...;
malicious_url_threshold?: ...;
biased?: ...;
biased_threshold?: ...;
harmful?: ...;
harmful_threshold?: ...;
language?: ...;
language_values?: ...;
pii?: ...;
pii_redact?: ...;
pii_categories?: ...;
secrets?: ...;
secrets_redact?: ...;
secrets_categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
blocklistNames?: ...;
apiVersion?: ...;
severity?: ...;
categories?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
domain?: ...;
apiVersion?: ...;
modelVersion?: ...;
redact?: ...;
timeout?: ...;
}
| {
[key: ...]: ...;
profile_name: ...;
ai_model?: ...;
app_user?: ...;
}
| {
[key: ...]: ...;
}>;
name: ZodOptional<ZodString>;
is_enabled: ZodBoolean;
}, ZodTypeAny, "passthrough">>, "many">;
actions: ZodObject<{
deny: ZodBoolean;
async: ZodBoolean;
sequential: ZodBoolean;
on_success: ZodOptional<ZodNullable<ZodObject<{
feedback: ZodObject<..., ..., ..., ..., ...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
feedback: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
feedback: ...;
}, ZodTypeAny, "passthrough">>>>;
on_fail: ZodOptional<ZodNullable<ZodObject<{
feedback: ZodObject<..., ..., ..., ..., ...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
feedback: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
feedback: ...;
}, ZodTypeAny, "passthrough">>>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
deny: ZodBoolean;
async: ZodBoolean;
sequential: ZodBoolean;
on_success: ZodOptional<ZodNullable<ZodObject<{
feedback: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>;
on_fail: ZodOptional<ZodNullable<ZodObject<{
feedback: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
deny: ZodBoolean;
async: ZodBoolean;
sequential: ZodBoolean;
on_success: ZodOptional<ZodNullable<ZodObject<{
feedback: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>;
on_fail: ZodOptional<ZodNullable<ZodObject<{
feedback: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>;
}, ZodTypeAny, "passthrough">>;
version_id: ZodString;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/guardrails-client.ts:164

Fetch one guardrail.

Parameters​

ParameterTypeDescription
guardrailIdstringGuardrail UUID.

Returns​

Promise<objectOutputType<{ target: ZodOptional<ZodEnum<["llm", "mcp_tools"]>>; id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; status: ZodString; owner_id: ZodString; updated_by: ZodNullable<ZodString>; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; } & { mcp_server_mappings: ZodOptional<ZodArray<ZodType<{ [key: string]: unknown; id: string; guardrail_id: string; mcp_server_id: string; run_on: string[]; capability_ids?: string[]; }, ZodTypeDef, { [key: string]: unknown; id: string; guardrail_id: string; mcp_server_id: string; run_on: string[]; capability_ids?: string[]; }>, "many">>; checks: ZodArray<ZodObject<{ id: ZodString; parameters: ZodType< | { [key: string]: unknown; jwksUri: string; headerKey: string; cacheMaxAge?: ... | ...; clockTolerance?: ... | ...; maxTokenAge?: ... | ...; algorithms?: ... | ...; } | { [key: string]: unknown; models: ...[]; } | { [key: string]: unknown; rule: string; not?: ... | ... | ...; } | { [key: string]: unknown; minSentences?: ... | ...; maxSentences?: ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; minWords?: ... | ...; maxWords?: ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; minCharacters?: ... | ...; maxCharacters?: ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; schema: { [key: ...]: ...; }; not?: ... | ... | ...; } | { [key: string]: unknown; keys: ...[]; operator: string; } | { [key: string]: unknown; words: ...[]; operator: string; } | { [key: string]: unknown; onlyDNS?: ... | ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; format: string; not?: ... | ... | ...; } | { [key: string]: unknown; webhookURL: string; headers?: ... | ...; timeout?: ... | ...; failOnError?: ... | ... | ...; } | { [key: string]: unknown; suffix: string; not?: ... | ... | ...; } | { [key: string]: unknown; not?: ... | ... | ...; } | { [key: string]: unknown; metadataKeys: ...[]; operator: string; } | { [key: string]: unknown; allowedTypes?: ... | ...; blockedTypes?: ... | ...; } | { [key: string]: unknown; prompt_injection_threshold?: ... | ...; toxicity_threshold?: ... | ...; evasion_threshold?: ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; projectID: string; timeout?: ... | ...; } | { [key: string]: unknown; scanners: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; profile: string; timeout?: ... | ...; } | { [key: string]: unknown; categories: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; language?: ... | ...; not?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; redact?: ... | ... | ...; categories: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; categories: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; guardrailVersion: string; guardrailId: string; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; prompt_injection?: ... | ... | ...; prompt_injection_threshold?: ... | ...; toxic?: ... | ... | ...; toxic_threshold?: ... | ...; jail_break?: ... | ... | ...; jail_break_threshold?: ... | ...; malicious_url?: ... | ... | ...; malicious_url_threshold?: ... | ...; biased?: ... | ... | ...; biased_threshold?: ... | ...; harmful?: ... | ... | ...; harmful_threshold?: ... | ...; language?: ... | ... | ...; language_values?: ... | ...; pii?: ... | ... | ...; pii_redact?: ... | ... | ...; pii_categories?: ... | ...; secrets?: ... | ... | ...; secrets_redact?: ... | ... | ...; secrets_categories?: ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; blocklistNames?: ... | ...; apiVersion?: ... | ...; severity?: ... | ...; categories?: ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; domain?: ... | ...; apiVersion?: ... | ...; modelVersion?: ... | ...; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; profile_name: string; ai_model?: ... | ...; app_user?: ... | ...; } | { [key: string]: unknown; }, ZodTypeDef, | { [key: string]: unknown; jwksUri: string; headerKey: string; cacheMaxAge?: ... | ...; clockTolerance?: ... | ...; maxTokenAge?: ... | ...; algorithms?: ... | ...; } | { [key: string]: unknown; models: ...[]; } | { [key: string]: unknown; rule: string; not?: ... | ... | ...; } | { [key: string]: unknown; minSentences?: ... | ...; maxSentences?: ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; minWords?: ... | ...; maxWords?: ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; minCharacters?: ... | ...; maxCharacters?: ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; schema: { [key: ...]: ...; }; not?: ... | ... | ...; } | { [key: string]: unknown; keys: ...[]; operator: string; } | { [key: string]: unknown; words: ...[]; operator: string; } | { [key: string]: unknown; onlyDNS?: ... | ... | ...; not?: ... | ... | ...; } | { [key: string]: unknown; format: string; not?: ... | ... | ...; } | { [key: string]: unknown; webhookURL: string; headers?: ... | ...; timeout?: ... | ...; failOnError?: ... | ... | ...; } | { [key: string]: unknown; suffix: string; not?: ... | ... | ...; } | { [key: string]: unknown; not?: ... | ... | ...; } | { [key: string]: unknown; metadataKeys: ...[]; operator: string; } | { [key: string]: unknown; allowedTypes?: ... | ...; blockedTypes?: ... | ...; } | { [key: string]: unknown; prompt_injection_threshold?: ... | ...; toxicity_threshold?: ... | ...; evasion_threshold?: ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; projectID: string; timeout?: ... | ...; } | { [key: string]: unknown; scanners: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; profile: string; timeout?: ... | ...; } | { [key: string]: unknown; categories: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; language?: ... | ...; not?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; redact?: ... | ... | ...; categories: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; categories: ...[]; timeout?: ... | ...; } | { [key: string]: unknown; guardrailVersion: string; guardrailId: string; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; prompt_injection?: ... | ... | ...; prompt_injection_threshold?: ... | ...; toxic?: ... | ... | ...; toxic_threshold?: ... | ...; jail_break?: ... | ... | ...; jail_break_threshold?: ... | ...; malicious_url?: ... | ... | ...; malicious_url_threshold?: ... | ...; biased?: ... | ... | ...; biased_threshold?: ... | ...; harmful?: ... | ... | ...; harmful_threshold?: ... | ...; language?: ... | ... | ...; language_values?: ... | ...; pii?: ... | ... | ...; pii_redact?: ... | ... | ...; pii_categories?: ... | ...; secrets?: ... | ... | ...; secrets_redact?: ... | ... | ...; secrets_categories?: ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; blocklistNames?: ... | ...; apiVersion?: ... | ...; severity?: ... | ...; categories?: ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; domain?: ... | ...; apiVersion?: ... | ...; modelVersion?: ... | ...; redact?: ... | ... | ...; timeout?: ... | ...; } | { [key: string]: unknown; profile_name: string; ai_model?: ... | ...; app_user?: ... | ...; } | { [key: string]: unknown; }>; name: ZodOptional<ZodString>; is_enabled: ZodBoolean; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ZodString; parameters: ZodType< | { [key: ...]: ...; jwksUri: ...; headerKey: ...; cacheMaxAge?: ...; clockTolerance?: ...; maxTokenAge?: ...; algorithms?: ...; } | { [key: ...]: ...; models: ...; } | { [key: ...]: ...; rule: ...; not?: ...; } | { [key: ...]: ...; minSentences?: ...; maxSentences?: ...; not?: ...; } | { [key: ...]: ...; minWords?: ...; maxWords?: ...; not?: ...; } | { [key: ...]: ...; minCharacters?: ...; maxCharacters?: ...; not?: ...; } | { [key: ...]: ...; schema: ...; not?: ...; } | { [key: ...]: ...; keys: ...; operator: ...; } | { [key: ...]: ...; words: ...; operator: ...; } | { [key: ...]: ...; onlyDNS?: ...; not?: ...; } | { [key: ...]: ...; format: ...; not?: ...; } | { [key: ...]: ...; webhookURL: ...; headers?: ...; timeout?: ...; failOnError?: ...; } | { [key: ...]: ...; suffix: ...; not?: ...; } | { [key: ...]: ...; not?: ...; } | { [key: ...]: ...; metadataKeys: ...; operator: ...; } | { [key: ...]: ...; allowedTypes?: ...; blockedTypes?: ...; } | { [key: ...]: ...; prompt_injection_threshold?: ...; toxicity_threshold?: ...; evasion_threshold?: ...; timeout?: ...; } | { [key: ...]: ...; projectID: ...; timeout?: ...; } | { [key: ...]: ...; scanners: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; language?: ...; not?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; guardrailVersion: ...; guardrailId: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; prompt_injection?: ...; prompt_injection_threshold?: ...; toxic?: ...; toxic_threshold?: ...; jail_break?: ...; jail_break_threshold?: ...; malicious_url?: ...; malicious_url_threshold?: ...; biased?: ...; biased_threshold?: ...; harmful?: ...; harmful_threshold?: ...; language?: ...; language_values?: ...; pii?: ...; pii_redact?: ...; pii_categories?: ...; secrets?: ...; secrets_redact?: ...; secrets_categories?: ...; timeout?: ...; } | { [key: ...]: ...; blocklistNames?: ...; apiVersion?: ...; severity?: ...; categories?: ...; timeout?: ...; } | { [key: ...]: ...; domain?: ...; apiVersion?: ...; modelVersion?: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile_name: ...; ai_model?: ...; app_user?: ...; } | { [key: ...]: ...; }, ZodTypeDef, | { [key: ...]: ...; jwksUri: ...; headerKey: ...; cacheMaxAge?: ...; clockTolerance?: ...; maxTokenAge?: ...; algorithms?: ...; } | { [key: ...]: ...; models: ...; } | { [key: ...]: ...; rule: ...; not?: ...; } | { [key: ...]: ...; minSentences?: ...; maxSentences?: ...; not?: ...; } | { [key: ...]: ...; minWords?: ...; maxWords?: ...; not?: ...; } | { [key: ...]: ...; minCharacters?: ...; maxCharacters?: ...; not?: ...; } | { [key: ...]: ...; schema: ...; not?: ...; } | { [key: ...]: ...; keys: ...; operator: ...; } | { [key: ...]: ...; words: ...; operator: ...; } | { [key: ...]: ...; onlyDNS?: ...; not?: ...; } | { [key: ...]: ...; format: ...; not?: ...; } | { [key: ...]: ...; webhookURL: ...; headers?: ...; timeout?: ...; failOnError?: ...; } | { [key: ...]: ...; suffix: ...; not?: ...; } | { [key: ...]: ...; not?: ...; } | { [key: ...]: ...; metadataKeys: ...; operator: ...; } | { [key: ...]: ...; allowedTypes?: ...; blockedTypes?: ...; } | { [key: ...]: ...; prompt_injection_threshold?: ...; toxicity_threshold?: ...; evasion_threshold?: ...; timeout?: ...; } | { [key: ...]: ...; projectID: ...; timeout?: ...; } | { [key: ...]: ...; scanners: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; language?: ...; not?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; guardrailVersion: ...; guardrailId: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; prompt_injection?: ...; prompt_injection_threshold?: ...; toxic?: ...; toxic_threshold?: ...; jail_break?: ...; jail_break_threshold?: ...; malicious_url?: ...; malicious_url_threshold?: ...; biased?: ...; biased_threshold?: ...; harmful?: ...; harmful_threshold?: ...; language?: ...; language_values?: ...; pii?: ...; pii_redact?: ...; pii_categories?: ...; secrets?: ...; secrets_redact?: ...; secrets_categories?: ...; timeout?: ...; } | { [key: ...]: ...; blocklistNames?: ...; apiVersion?: ...; severity?: ...; categories?: ...; timeout?: ...; } | { [key: ...]: ...; domain?: ...; apiVersion?: ...; modelVersion?: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile_name: ...; ai_model?: ...; app_user?: ...; } | { [key: ...]: ...; }>; name: ZodOptional<ZodString>; is_enabled: ZodBoolean; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ZodString; parameters: ZodType< | { [key: ...]: ...; jwksUri: ...; headerKey: ...; cacheMaxAge?: ...; clockTolerance?: ...; maxTokenAge?: ...; algorithms?: ...; } | { [key: ...]: ...; models: ...; } | { [key: ...]: ...; rule: ...; not?: ...; } | { [key: ...]: ...; minSentences?: ...; maxSentences?: ...; not?: ...; } | { [key: ...]: ...; minWords?: ...; maxWords?: ...; not?: ...; } | { [key: ...]: ...; minCharacters?: ...; maxCharacters?: ...; not?: ...; } | { [key: ...]: ...; schema: ...; not?: ...; } | { [key: ...]: ...; keys: ...; operator: ...; } | { [key: ...]: ...; words: ...; operator: ...; } | { [key: ...]: ...; onlyDNS?: ...; not?: ...; } | { [key: ...]: ...; format: ...; not?: ...; } | { [key: ...]: ...; webhookURL: ...; headers?: ...; timeout?: ...; failOnError?: ...; } | { [key: ...]: ...; suffix: ...; not?: ...; } | { [key: ...]: ...; not?: ...; } | { [key: ...]: ...; metadataKeys: ...; operator: ...; } | { [key: ...]: ...; allowedTypes?: ...; blockedTypes?: ...; } | { [key: ...]: ...; prompt_injection_threshold?: ...; toxicity_threshold?: ...; evasion_threshold?: ...; timeout?: ...; } | { [key: ...]: ...; projectID: ...; timeout?: ...; } | { [key: ...]: ...; scanners: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; language?: ...; not?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; guardrailVersion: ...; guardrailId: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; prompt_injection?: ...; prompt_injection_threshold?: ...; toxic?: ...; toxic_threshold?: ...; jail_break?: ...; jail_break_threshold?: ...; malicious_url?: ...; malicious_url_threshold?: ...; biased?: ...; biased_threshold?: ...; harmful?: ...; harmful_threshold?: ...; language?: ...; language_values?: ...; pii?: ...; pii_redact?: ...; pii_categories?: ...; secrets?: ...; secrets_redact?: ...; secrets_categories?: ...; timeout?: ...; } | { [key: ...]: ...; blocklistNames?: ...; apiVersion?: ...; severity?: ...; categories?: ...; timeout?: ...; } | { [key: ...]: ...; domain?: ...; apiVersion?: ...; modelVersion?: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile_name: ...; ai_model?: ...; app_user?: ...; } | { [key: ...]: ...; }, ZodTypeDef, | { [key: ...]: ...; jwksUri: ...; headerKey: ...; cacheMaxAge?: ...; clockTolerance?: ...; maxTokenAge?: ...; algorithms?: ...; } | { [key: ...]: ...; models: ...; } | { [key: ...]: ...; rule: ...; not?: ...; } | { [key: ...]: ...; minSentences?: ...; maxSentences?: ...; not?: ...; } | { [key: ...]: ...; minWords?: ...; maxWords?: ...; not?: ...; } | { [key: ...]: ...; minCharacters?: ...; maxCharacters?: ...; not?: ...; } | { [key: ...]: ...; schema: ...; not?: ...; } | { [key: ...]: ...; keys: ...; operator: ...; } | { [key: ...]: ...; words: ...; operator: ...; } | { [key: ...]: ...; onlyDNS?: ...; not?: ...; } | { [key: ...]: ...; format: ...; not?: ...; } | { [key: ...]: ...; webhookURL: ...; headers?: ...; timeout?: ...; failOnError?: ...; } | { [key: ...]: ...; suffix: ...; not?: ...; } | { [key: ...]: ...; not?: ...; } | { [key: ...]: ...; metadataKeys: ...; operator: ...; } | { [key: ...]: ...; allowedTypes?: ...; blockedTypes?: ...; } | { [key: ...]: ...; prompt_injection_threshold?: ...; toxicity_threshold?: ...; evasion_threshold?: ...; timeout?: ...; } | { [key: ...]: ...; projectID: ...; timeout?: ...; } | { [key: ...]: ...; scanners: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; language?: ...; not?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; categories: ...; timeout?: ...; } | { [key: ...]: ...; guardrailVersion: ...; guardrailId: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; prompt_injection?: ...; prompt_injection_threshold?: ...; toxic?: ...; toxic_threshold?: ...; jail_break?: ...; jail_break_threshold?: ...; malicious_url?: ...; malicious_url_threshold?: ...; biased?: ...; biased_threshold?: ...; harmful?: ...; harmful_threshold?: ...; language?: ...; language_values?: ...; pii?: ...; pii_redact?: ...; pii_categories?: ...; secrets?: ...; secrets_redact?: ...; secrets_categories?: ...; timeout?: ...; } | { [key: ...]: ...; blocklistNames?: ...; apiVersion?: ...; severity?: ...; categories?: ...; timeout?: ...; } | { [key: ...]: ...; domain?: ...; apiVersion?: ...; modelVersion?: ...; redact?: ...; timeout?: ...; } | { [key: ...]: ...; profile_name: ...; ai_model?: ...; app_user?: ...; } | { [key: ...]: ...; }>; name: ZodOptional<ZodString>; is_enabled: ZodBoolean; }, ZodTypeAny, "passthrough">>, "many">; actions: ZodObject<{ deny: ZodBoolean; async: ZodBoolean; sequential: ZodBoolean; on_success: ZodOptional<ZodNullable<ZodObject<{ feedback: ZodObject<..., ..., ..., ..., ...>; }, "passthrough", ZodTypeAny, objectOutputType<{ feedback: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ feedback: ...; }, ZodTypeAny, "passthrough">>>>; on_fail: ZodOptional<ZodNullable<ZodObject<{ feedback: ZodObject<..., ..., ..., ..., ...>; }, "passthrough", ZodTypeAny, objectOutputType<{ feedback: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ feedback: ...; }, ZodTypeAny, "passthrough">>>>; }, "passthrough", ZodTypeAny, objectOutputType<{ deny: ZodBoolean; async: ZodBoolean; sequential: ZodBoolean; on_success: ZodOptional<ZodNullable<ZodObject<{ feedback: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>; on_fail: ZodOptional<ZodNullable<ZodObject<{ feedback: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>; }, ZodTypeAny, "passthrough">, objectInputType<{ deny: ZodBoolean; async: ZodBoolean; sequential: ZodBoolean; on_success: ZodOptional<ZodNullable<ZodObject<{ feedback: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>; on_fail: ZodOptional<ZodNullable<ZodObject<{ feedback: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>; }, ZodTypeAny, "passthrough">>; version_id: ZodString; }, ZodTypeAny, "passthrough">>

Guardrail detail — adds checks, actions, and version_id on top of the list row.

Example​

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

const g = await gw.guardrails.get('9f6c2a8e-2b3d-4e5f-8a9b-0c1d2e3f4a5b');
// g.checks[0].id => 'panw-prisma-airs.intercept'

create()​

create(body): Promise<objectOutputType<{
id: ZodString;
version_id: ZodString;
slug: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/guardrails-client.ts:200

Create a guardrail.

Parameters​

ParameterTypeDescription
body{ workspace_id: string; organisation_id?: string; name: string; target?: "llm" | "mcp_tools"; checks?: { id: string; parameters?: ({ [key: string]: unknown; jwksUri: string; headerKey: string; cacheMaxAge?: number | undefined; clockTolerance?: number | undefined; maxTokenAge?: string | undefined; algorithms?: string[] | undefined; } | ... 30 more ... | { ...; }) & GatewayJsonObject; is_enabled?: boolean; name?: string; }[]; actions?: { [key: string]: any; }; }Workspace UUID, name, checks, and pass/fail actions.
body.workspace_idstring-
body.organisation_id?stringOptional upstream organisation scope; SCM still requires workspace_id.
body.namestring-
body.target?"llm" | "mcp_tools"-
body.checks?{ id: string; parameters?: ({ [key: string]: unknown; jwksUri: string; headerKey: string; cacheMaxAge?: number | undefined; clockTolerance?: number | undefined; maxTokenAge?: string | undefined; algorithms?: string[] | undefined; } | ... 30 more ... | { ...; }) & GatewayJsonObject; is_enabled?: boolean; name?: string; }[]-
body.actions?{ [key: string]: any; }-

Returns​

Promise<objectOutputType<{ id: ZodString; version_id: ZodString; slug: ZodString; object: ZodString; }, ZodTypeAny, "passthrough">>

The creation receipt.

Remarks​

The response is a creation receipt — { id, version_id, slug, object } — not a GatewayGuardrailDetail. Call get for the full record. Verified live 2026-07-28.

Example​

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

const receipt = await gw.guardrails.create({
workspace_id: '16f7e90d-382a-4e78-b577-1b01eb5f8297',
name: 'PrismaAIRS',
checks: [{ id: 'panw-prisma-airs.intercept', parameters: { profile_name: 'AI Gateway - Strict' }, is_enabled: true }],
actions: { deny: false, async: false, sequential: false },
});
// receipt => { id: '...', version_id: '...', slug: 'pg-sdk-ve-874b62', object: 'guardrail' }

update()​

update(guardrailId, body): Promise<objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodUnion<[ZodObject<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>, ZodString, ZodNumber]>>;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/guardrails-client.ts:228

Update a guardrail. Verified live 2026-08-29.

Parameters​

ParameterTypeDescription
guardrailIdstringGuardrail UUID.
body{ [key: string]: any; }Fields to update.

Returns​

Promise<objectOutputType<{ id: ZodOptional<ZodString>; slug: ZodOptional<ZodString>; version_id: ZodOptional<ZodString>; success: ZodOptional<ZodBoolean>; data: ZodOptional<ZodUnion<[ZodObject<{ id: ZodOptional<ZodString>; slug: ZodOptional<ZodString>; version_id: ZodOptional<ZodString>; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ZodOptional<ZodString>; slug: ZodOptional<ZodString>; version_id: ZodOptional<ZodString>; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ZodOptional<ZodString>; slug: ZodOptional<ZodString>; version_id: ZodOptional<ZodString>; }, ZodTypeAny, "passthrough">>, ZodString, ZodNumber]>>; }, ZodTypeAny, "passthrough">>

The gateway write response.

Example​

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.guardrails.update('9f6c2a8e-2b3d-4e5f-8a9b-0c1d2e3f4a5b', {
name: 'Updated guardrail',
});

delete()​

delete(guardrailId): Promise<void>;

Defined in: src/ai-gateway/guardrails-client.ts:264

Delete a guardrail.

Parameters​

ParameterTypeDescription
guardrailIdstringGuardrail UUID.

Returns​

Promise<void>

Nothing.

Remarks​

This is a hard delete — unlike deployments.delete (which archives), the guardrail disappears from list entirely. Verified live 2026-07-28. No organisation_id query param is required, unlike deployments/integrations.

Example​

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

await gw.guardrails.delete('9f6c2a8e-2b3d-4e5f-8a9b-0c1d2e3f4a5b');
// the guardrail no longer appears in gw.guardrails.list()