Class: AIGatewayProvidersClient
Defined in: src/ai-gateway/providers-client.ts:24
Client for AI Gateway provider operations (data plane).
Constructors
Constructor
new AIGatewayProvidersClient(opts): AIGatewayProvidersClient;
Defined in: src/ai-gateway/providers-client.ts:29
Parameters
| Parameter | Type |
|---|---|
opts | AIGatewaySubClientOptions |
Returns
AIGatewayProvidersClient
Methods
list()
list(opts): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
object: ZodOptional<ZodString>;
integration_id: ZodOptional<ZodString>;
note: ZodOptional<ZodNullable<ZodString>>;
status: ZodOptional<ZodString>;
usage_limits: ZodOptional<ZodNullable<ZodUnion<[ZodObject<..., ..., ..., ..., ...>, ZodArray<..., ...>]>>>;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[ZodNumber, ZodBoolean]>>>;
created_at: ZodOptional<ZodString>;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<{
type: ...;
unit: ...;
value: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">>>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
object: ZodOptional<ZodString>;
integration_id: ZodOptional<ZodString>;
note: ZodOptional<ZodNullable<ZodString>>;
status: ZodOptional<ZodString>;
usage_limits: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
created_at: ZodOptional<ZodString>;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">>>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
object: ZodOptional<ZodString>;
integration_id: ZodOptional<ZodString>;
note: ZodOptional<ZodNullable<ZodString>>;
status: ZodOptional<ZodString>;
usage_limits: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
created_at: ZodOptional<ZodString>;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">>>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/providers-client.ts:48
List providers in a workspace.
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | AIGatewayWorkspaceScopedListOptions | Must include the workspace UUID. |
Returns
Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
object: ZodOptional<ZodString>;
integration_id: ZodOptional<ZodString>;
note: ZodOptional<ZodNullable<ZodString>>;
status: ZodOptional<ZodString>;
usage_limits: ZodOptional<ZodNullable<ZodUnion<[ZodObject<..., ..., ..., ..., ...>, ZodArray<..., ...>]>>>;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[ZodNumber, ZodBoolean]>>>;
created_at: ZodOptional<ZodString>;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<{
type: ...;
unit: ...;
value: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">>>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
object: ZodOptional<ZodString>;
integration_id: ZodOptional<ZodString>;
note: ZodOptional<ZodNullable<ZodString>>;
status: ZodOptional<ZodString>;
usage_limits: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
created_at: ZodOptional<ZodString>;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">>>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
object: ZodOptional<ZodString>;
integration_id: ZodOptional<ZodString>;
note: ZodOptional<ZodNullable<ZodString>>;
status: ZodOptional<ZodString>;
usage_limits: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[..., ...]>>>;
created_at: ZodOptional<ZodString>;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">>>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>
Providers bound into that workspace.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const p = await gw.providers.list({ workspaceId: '16f7e90d-382a-4e78-b577-1b01eb5f8297' });
// p.data[0].slug => 'openai-calvin'
get()
get(providerId): Promise<objectOutputType<{
id: ZodString;
ai_provider_name: ZodString;
model_config: ZodRecord<ZodString, ZodUnknown>;
key: ZodString;
masked_api_key: ZodString;
slug: ZodString;
name: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodObject<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<ZodString>>;
periodic_reset_days: ZodOptional<ZodNullable<ZodNumber>>;
next_usage_reset_at: ZodOptional<ZodNullable<ZodString>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<...>>;
periodic_reset_days: ZodOptional<ZodNullable<...>>;
next_usage_reset_at: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<...>>;
periodic_reset_days: ZodOptional<ZodNullable<...>>;
next_usage_reset_at: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">>, ZodArray<ZodObject<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<...>>;
periodic_reset_days: ZodOptional<ZodNullable<...>>;
next_usage_reset_at: ZodOptional<ZodNullable<...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
credit_limit: ZodOptional<...>;
type: ZodOptional<...>;
alert_threshold: ZodOptional<...>;
periodic_reset: ZodOptional<...>;
periodic_reset_days: ZodOptional<...>;
next_usage_reset_at: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
credit_limit: ZodOptional<...>;
type: ZodOptional<...>;
alert_threshold: ZodOptional<...>;
periodic_reset: ZodOptional<...>;
periodic_reset_days: ZodOptional<...>;
next_usage_reset_at: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>, "many">]>>;
status: ZodString;
note: ZodNullable<ZodString>;
created_at: ZodString;
expires_at: ZodNullable<ZodString>;
last_reset_at: ZodNullable<ZodString>;
rate_limits: ZodArray<ZodObject<{
type: ZodOptional<ZodString>;
unit: ZodOptional<ZodString>;
value: ZodOptional<ZodNumber>;
}, "passthrough", ZodTypeAny, objectOutputType<{
type: ZodOptional<ZodString>;
unit: ZodOptional<ZodString>;
value: ZodOptional<ZodNumber>;
}, ZodTypeAny, "passthrough">, objectInputType<{
type: ZodOptional<ZodString>;
unit: ZodOptional<ZodString>;
value: ZodOptional<ZodNumber>;
}, ZodTypeAny, "passthrough">>, "many">;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[ZodNumber, ZodBoolean]>>>;
integration_id: ZodString;
tags: ZodNullable<ZodUnknown>;
secret_mappings: ZodOptional<ZodArray<ZodType<{
[key: string]: unknown;
target_field: string;
secret_reference_id: string;
secret_key?: string | null;
value_format?: string | null;
}, ZodTypeDef, {
[key: string]: unknown;
target_field: string;
secret_reference_id: string;
secret_key?: string | null;
value_format?: string | null;
}>, "many">>;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/providers-client.ts:77
Fetch one provider binding. Verified live 2026-08-29.
Parameters
| Parameter | Type | Description |
|---|---|---|
providerId | string | Provider UUID. |
Returns
Promise<objectOutputType<{
id: ZodString;
ai_provider_name: ZodString;
model_config: ZodRecord<ZodString, ZodUnknown>;
key: ZodString;
masked_api_key: ZodString;
slug: ZodString;
name: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodObject<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<ZodString>>;
periodic_reset_days: ZodOptional<ZodNullable<ZodNumber>>;
next_usage_reset_at: ZodOptional<ZodNullable<ZodString>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<...>>;
periodic_reset_days: ZodOptional<ZodNullable<...>>;
next_usage_reset_at: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<...>>;
periodic_reset_days: ZodOptional<ZodNullable<...>>;
next_usage_reset_at: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">>, ZodArray<ZodObject<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<...>>;
periodic_reset_days: ZodOptional<ZodNullable<...>>;
next_usage_reset_at: ZodOptional<ZodNullable<...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
credit_limit: ZodOptional<...>;
type: ZodOptional<...>;
alert_threshold: ZodOptional<...>;
periodic_reset: ZodOptional<...>;
periodic_reset_days: ZodOptional<...>;
next_usage_reset_at: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
credit_limit: ZodOptional<...>;
type: ZodOptional<...>;
alert_threshold: ZodOptional<...>;
periodic_reset: ZodOptional<...>;
periodic_reset_days: ZodOptional<...>;
next_usage_reset_at: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>, "many">]>>;
status: ZodString;
note: ZodNullable<ZodString>;
created_at: ZodString;
expires_at: ZodNullable<ZodString>;
last_reset_at: ZodNullable<ZodString>;
rate_limits: ZodArray<ZodObject<{
type: ZodOptional<ZodString>;
unit: ZodOptional<ZodString>;
value: ZodOptional<ZodNumber>;
}, "passthrough", ZodTypeAny, objectOutputType<{
type: ZodOptional<ZodString>;
unit: ZodOptional<ZodString>;
value: ZodOptional<ZodNumber>;
}, ZodTypeAny, "passthrough">, objectInputType<{
type: ZodOptional<ZodString>;
unit: ZodOptional<ZodString>;
value: ZodOptional<ZodNumber>;
}, ZodTypeAny, "passthrough">>, "many">;
reset_usage: ZodOptional<ZodNullable<ZodUnion<[ZodNumber, ZodBoolean]>>>;
integration_id: ZodString;
tags: ZodNullable<ZodUnknown>;
secret_mappings: ZodOptional<ZodArray<ZodType<{
[key: string]: unknown;
target_field: string;
secret_reference_id: string;
secret_key?: string | null;
value_format?: string | null;
}, ZodTypeDef, {
[key: string]: unknown;
target_field: string;
secret_reference_id: string;
secret_key?: string | null;
value_format?: string | null;
}>, "many">>;
object: ZodString;
}, ZodTypeAny, "passthrough">>
Provider configuration and lifecycle detail.
Remarks
The response can contain provider credential material. Do not log or persist it, and avoid logging the complete returned object. SDK debug logs redact the known credential fields for this operation.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const provider = await gw.providers.get('f6692544-3265-49be-9711-bbdcebc079e4');
console.log(provider.name);
create()
create(body): Promise<objectOutputType<{
id: ZodString;
slug: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/providers-client.ts:116
Create a provider.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | { workspace_id: string; ai_provider_id: string; name: string; integration_id: string; slug: string; note?: string | null; usage_limits?: | { [key: string]: any; } | null; rate_limits?: | { type: GatewayOpenValue<"requests" | "tokens">; unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">; value: number; } | null; expires_at?: string | null; } | Workspace UUID, upstream provider id, integration id, name, and slug. |
body.workspace_id | string | - |
body.ai_provider_id | string | - |
body.name | string | - |
body.integration_id | string | - |
body.slug | string | - |
body.note? | string | null | - |
body.usage_limits? | | { [key: string]: any; } | null | - |
body.rate_limits? | | { type: GatewayOpenValue<"requests" | "tokens">; unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">; value: number; } | null | - |
body.expires_at? | string | null | - |
Returns
Promise<objectOutputType<{
id: ZodString;
slug: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>
The creation receipt.
Remarks
The response is a creation receipt — { id, slug, object } — not a GatewayProvider. Note it has no version_id, unlike the sibling receipts for
configs.create and guardrails.create. Verified live 2026-07-28.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const receipt = await gw.providers.create({
workspace_id: '16f7e90d-382a-4e78-b577-1b01eb5f8297',
ai_provider_id: 'de7d7d50-31cd-11ee-b93b-0e06f1aa7f7c',
integration_id: 'f6692544-3265-49be-9711-bbdcebc079e4',
name: 'openai-calvin',
slug: 'openai-calvin',
});
// receipt => { id: '...', slug: 'sdk-verify-delete-me-provider', object: 'provider' }
update()
update(providerId, 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/providers-client.ts:147
Update a provider binding. Verified live 2026-08-29.
Parameters
| Parameter | Type | Description |
|---|---|---|
providerId | string | Provider 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.providers.update('f6692544-3265-49be-9711-bbdcebc079e4', {
name: 'Vertex production',
note: 'Updated by automation',
});
delete()
delete(providerId): Promise<void>;
Defined in: src/ai-gateway/providers-client.ts:183
Delete a provider.
Parameters
| Parameter | Type | Description |
|---|---|---|
providerId | string | Provider UUID. |
Returns
Promise<void>
Nothing.
Remarks
This is a hard delete — unlike deployments.delete
(which archives), the provider 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.providers.delete('f6692544-3265-49be-9711-bbdcebc079e4');
// the provider no longer appears in gw.providers.list()