## Delete a Gateway `client.aiGateway.delete(stringid, AIGatewayDeleteParamsparams, RequestOptionsoptions?): AIGatewayDeleteResponse` **delete** `/accounts/{account_id}/ai-gateway/gateways/{id}` Deletes an AI Gateway dataset. ### Parameters - `id: string` gateway id - `params: AIGatewayDeleteParams` - `account_id: string` ### Returns - `AIGatewayDeleteResponse` - `id: string` gateway id - `cache_invalidate_on_update: boolean` - `cache_ttl: number | null` - `collect_logs: boolean` - `created_at: string` - `modified_at: string` - `rate_limiting_interval: number | null` - `rate_limiting_limit: number | null` - `authentication?: boolean` - `dlp?: UnionMember0 | UnionMember1` - `UnionMember0` - `action: "BLOCK" | "FLAG"` - `"BLOCK"` - `"FLAG"` - `enabled: boolean` - `profiles: Array` - `UnionMember1` - `enabled: boolean` - `policies: Array` - `id: string` - `action: "FLAG" | "BLOCK"` - `"FLAG"` - `"BLOCK"` - `check: Array<"REQUEST" | "RESPONSE">` - `"REQUEST"` - `"RESPONSE"` - `enabled: boolean` - `profiles: Array` - `is_default?: boolean` - `log_management?: number | null` - `log_management_strategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null` - `"STOP_INSERTING"` - `"DELETE_OLDEST"` - `logpush?: boolean` - `logpush_public_key?: string | null` - `otel?: Array | null` - `authorization: string` - `headers: Record` - `url: string` - `content_type?: "json" | "protobuf"` - `"json"` - `"protobuf"` - `rate_limiting_technique?: "fixed" | "sliding" | null` - `"fixed"` - `"sliding"` - `retry_backoff?: "constant" | "linear" | "exponential" | null` Backoff strategy for retry delays - `"constant"` - `"linear"` - `"exponential"` - `retry_delay?: number | null` Delay between retry attempts in milliseconds (0-5000) - `retry_max_attempts?: number | null` Maximum number of retry attempts for failed requests (1-5) - `store_id?: string | null` - `stripe?: Stripe | null` - `authorization: string` - `usage_events: Array` - `payload: string` - `workers_ai_billing_mode?: "postpaid"` Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. - `"postpaid"` - `zdr?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const aiGateway = await client.aiGateway.delete('my-gateway', { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', }); console.log(aiGateway.id); ``` #### Response ```json { "result": { "id": "my-gateway", "cache_invalidate_on_update": true, "cache_ttl": 0, "collect_logs": true, "created_at": "2019-12-27T18:11:19.117Z", "modified_at": "2019-12-27T18:11:19.117Z", "rate_limiting_interval": 0, "rate_limiting_limit": 0, "authentication": true, "dlp": { "action": "BLOCK", "enabled": true, "profiles": [ "string" ] }, "is_default": true, "log_management": 10000, "log_management_strategy": "STOP_INSERTING", "logpush": true, "logpush_public_key": "xxxxxxxxxxxxxxxx", "otel": [ { "authorization": "authorization", "headers": { "foo": "string" }, "url": "url", "content_type": "json" } ], "rate_limiting_technique": "fixed", "retry_backoff": "constant", "retry_delay": 0, "retry_max_attempts": 1, "store_id": "store_id", "stripe": { "authorization": "authorization", "usage_events": [ { "payload": "payload" } ] }, "workers_ai_billing_mode": "postpaid", "zdr": true }, "success": true } ```