## Delete a Gateway `ai_gateway.delete(strid, AIGatewayDeleteParams**kwargs) -> AIGatewayDeleteResponse` **delete** `/accounts/{account_id}/ai-gateway/gateways/{id}` Deletes an AI Gateway dataset. ### Parameters - `account_id: str` - `id: str` gateway id ### Returns - `class AIGatewayDeleteResponse: …` - `id: str` gateway id - `cache_invalidate_on_update: bool` - `cache_ttl: Optional[int]` - `collect_logs: bool` - `created_at: datetime` - `modified_at: datetime` - `rate_limiting_interval: Optional[int]` - `rate_limiting_limit: Optional[int]` - `authentication: Optional[bool]` - `dlp: Optional[DLP]` - `class DLPUnionMember0: …` - `action: Literal["BLOCK", "FLAG"]` - `"BLOCK"` - `"FLAG"` - `enabled: bool` - `profiles: List[str]` - `class DLPUnionMember1: …` - `enabled: bool` - `policies: List[DLPUnionMember1Policy]` - `id: str` - `action: Literal["FLAG", "BLOCK"]` - `"FLAG"` - `"BLOCK"` - `check: List[Literal["REQUEST", "RESPONSE"]]` - `"REQUEST"` - `"RESPONSE"` - `enabled: bool` - `profiles: List[str]` - `is_default: Optional[bool]` - `log_management: Optional[int]` - `log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]]` - `"STOP_INSERTING"` - `"DELETE_OLDEST"` - `logpush: Optional[bool]` - `logpush_public_key: Optional[str]` - `otel: Optional[List[Otel]]` - `authorization: str` - `headers: Dict[str, str]` - `url: str` - `content_type: Optional[Literal["json", "protobuf"]]` - `"json"` - `"protobuf"` - `rate_limiting_technique: Optional[Literal["fixed", "sliding"]]` - `"fixed"` - `"sliding"` - `retry_backoff: Optional[Literal["constant", "linear", "exponential"]]` Backoff strategy for retry delays - `"constant"` - `"linear"` - `"exponential"` - `retry_delay: Optional[int]` Delay between retry attempts in milliseconds (0-5000) - `retry_max_attempts: Optional[int]` Maximum number of retry attempts for failed requests (1-5) - `store_id: Optional[str]` - `stripe: Optional[Stripe]` - `authorization: str` - `usage_events: List[StripeUsageEvent]` - `payload: str` - `workers_ai_billing_mode: Optional[Literal["postpaid"]]` Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. - `"postpaid"` - `zdr: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) ai_gateway = client.ai_gateway.delete( id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) print(ai_gateway.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 } ```