## List Gateways `client.AIGateway.List(ctx, params) (*V4PagePaginationArray[AIGatewayListResponse], error)` **get** `/accounts/{account_id}/ai-gateway/gateways` Lists all AI Gateway evaluator types configured for the account. ### Parameters - `params AIGatewayListParams` - `AccountID param.Field[string]` Path param - `Page param.Field[int64]` Query param - `PerPage param.Field[int64]` Query param - `Search param.Field[string]` Query param: Search by id ### Returns - `type AIGatewayListResponse struct{…}` - `ID string` gateway id - `CacheInvalidateOnUpdate bool` - `CacheTTL int64` - `CollectLogs bool` - `CreatedAt Time` - `ModifiedAt Time` - `RateLimitingInterval int64` - `RateLimitingLimit int64` - `Authentication bool` - `DLP AIGatewayListResponseDLP` - `type AIGatewayListResponseDLPObject struct{…}` - `Action AIGatewayListResponseDLPObjectAction` - `const AIGatewayListResponseDLPObjectActionBlock AIGatewayListResponseDLPObjectAction = "BLOCK"` - `const AIGatewayListResponseDLPObjectActionFlag AIGatewayListResponseDLPObjectAction = "FLAG"` - `Enabled bool` - `Profiles []string` - `type AIGatewayListResponseDLPObject struct{…}` - `Enabled bool` - `Policies []AIGatewayListResponseDLPObjectPolicy` - `ID string` - `Action AIGatewayListResponseDLPObjectPoliciesAction` - `const AIGatewayListResponseDLPObjectPoliciesActionFlag AIGatewayListResponseDLPObjectPoliciesAction = "FLAG"` - `const AIGatewayListResponseDLPObjectPoliciesActionBlock AIGatewayListResponseDLPObjectPoliciesAction = "BLOCK"` - `Check []AIGatewayListResponseDLPObjectPoliciesCheck` - `const AIGatewayListResponseDLPObjectPoliciesCheckRequest AIGatewayListResponseDLPObjectPoliciesCheck = "REQUEST"` - `const AIGatewayListResponseDLPObjectPoliciesCheckResponse AIGatewayListResponseDLPObjectPoliciesCheck = "RESPONSE"` - `Enabled bool` - `Profiles []string` - `Guardrails AIGatewayListResponseGuardrails` - `Prompt AIGatewayListResponseGuardrailsPrompt` - `P1 AIGatewayListResponseGuardrailsPromptP1` - `const AIGatewayListResponseGuardrailsPromptP1Flag AIGatewayListResponseGuardrailsPromptP1 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptP1Block AIGatewayListResponseGuardrailsPromptP1 = "BLOCK"` - `S1 AIGatewayListResponseGuardrailsPromptS1` - `const AIGatewayListResponseGuardrailsPromptS1Flag AIGatewayListResponseGuardrailsPromptS1 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS1Block AIGatewayListResponseGuardrailsPromptS1 = "BLOCK"` - `S10 AIGatewayListResponseGuardrailsPromptS10` - `const AIGatewayListResponseGuardrailsPromptS10Flag AIGatewayListResponseGuardrailsPromptS10 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS10Block AIGatewayListResponseGuardrailsPromptS10 = "BLOCK"` - `S11 AIGatewayListResponseGuardrailsPromptS11` - `const AIGatewayListResponseGuardrailsPromptS11Flag AIGatewayListResponseGuardrailsPromptS11 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS11Block AIGatewayListResponseGuardrailsPromptS11 = "BLOCK"` - `S12 AIGatewayListResponseGuardrailsPromptS12` - `const AIGatewayListResponseGuardrailsPromptS12Flag AIGatewayListResponseGuardrailsPromptS12 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS12Block AIGatewayListResponseGuardrailsPromptS12 = "BLOCK"` - `S13 AIGatewayListResponseGuardrailsPromptS13` - `const AIGatewayListResponseGuardrailsPromptS13Flag AIGatewayListResponseGuardrailsPromptS13 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS13Block AIGatewayListResponseGuardrailsPromptS13 = "BLOCK"` - `S2 AIGatewayListResponseGuardrailsPromptS2` - `const AIGatewayListResponseGuardrailsPromptS2Flag AIGatewayListResponseGuardrailsPromptS2 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS2Block AIGatewayListResponseGuardrailsPromptS2 = "BLOCK"` - `S3 AIGatewayListResponseGuardrailsPromptS3` - `const AIGatewayListResponseGuardrailsPromptS3Flag AIGatewayListResponseGuardrailsPromptS3 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS3Block AIGatewayListResponseGuardrailsPromptS3 = "BLOCK"` - `S4 AIGatewayListResponseGuardrailsPromptS4` - `const AIGatewayListResponseGuardrailsPromptS4Flag AIGatewayListResponseGuardrailsPromptS4 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS4Block AIGatewayListResponseGuardrailsPromptS4 = "BLOCK"` - `S5 AIGatewayListResponseGuardrailsPromptS5` - `const AIGatewayListResponseGuardrailsPromptS5Flag AIGatewayListResponseGuardrailsPromptS5 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS5Block AIGatewayListResponseGuardrailsPromptS5 = "BLOCK"` - `S6 AIGatewayListResponseGuardrailsPromptS6` - `const AIGatewayListResponseGuardrailsPromptS6Flag AIGatewayListResponseGuardrailsPromptS6 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS6Block AIGatewayListResponseGuardrailsPromptS6 = "BLOCK"` - `S7 AIGatewayListResponseGuardrailsPromptS7` - `const AIGatewayListResponseGuardrailsPromptS7Flag AIGatewayListResponseGuardrailsPromptS7 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS7Block AIGatewayListResponseGuardrailsPromptS7 = "BLOCK"` - `S8 AIGatewayListResponseGuardrailsPromptS8` - `const AIGatewayListResponseGuardrailsPromptS8Flag AIGatewayListResponseGuardrailsPromptS8 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS8Block AIGatewayListResponseGuardrailsPromptS8 = "BLOCK"` - `S9 AIGatewayListResponseGuardrailsPromptS9` - `const AIGatewayListResponseGuardrailsPromptS9Flag AIGatewayListResponseGuardrailsPromptS9 = "FLAG"` - `const AIGatewayListResponseGuardrailsPromptS9Block AIGatewayListResponseGuardrailsPromptS9 = "BLOCK"` - `Response AIGatewayListResponseGuardrailsResponse` - `P1 AIGatewayListResponseGuardrailsResponseP1` - `const AIGatewayListResponseGuardrailsResponseP1Flag AIGatewayListResponseGuardrailsResponseP1 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseP1Block AIGatewayListResponseGuardrailsResponseP1 = "BLOCK"` - `S1 AIGatewayListResponseGuardrailsResponseS1` - `const AIGatewayListResponseGuardrailsResponseS1Flag AIGatewayListResponseGuardrailsResponseS1 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS1Block AIGatewayListResponseGuardrailsResponseS1 = "BLOCK"` - `S10 AIGatewayListResponseGuardrailsResponseS10` - `const AIGatewayListResponseGuardrailsResponseS10Flag AIGatewayListResponseGuardrailsResponseS10 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS10Block AIGatewayListResponseGuardrailsResponseS10 = "BLOCK"` - `S11 AIGatewayListResponseGuardrailsResponseS11` - `const AIGatewayListResponseGuardrailsResponseS11Flag AIGatewayListResponseGuardrailsResponseS11 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS11Block AIGatewayListResponseGuardrailsResponseS11 = "BLOCK"` - `S12 AIGatewayListResponseGuardrailsResponseS12` - `const AIGatewayListResponseGuardrailsResponseS12Flag AIGatewayListResponseGuardrailsResponseS12 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS12Block AIGatewayListResponseGuardrailsResponseS12 = "BLOCK"` - `S13 AIGatewayListResponseGuardrailsResponseS13` - `const AIGatewayListResponseGuardrailsResponseS13Flag AIGatewayListResponseGuardrailsResponseS13 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS13Block AIGatewayListResponseGuardrailsResponseS13 = "BLOCK"` - `S2 AIGatewayListResponseGuardrailsResponseS2` - `const AIGatewayListResponseGuardrailsResponseS2Flag AIGatewayListResponseGuardrailsResponseS2 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS2Block AIGatewayListResponseGuardrailsResponseS2 = "BLOCK"` - `S3 AIGatewayListResponseGuardrailsResponseS3` - `const AIGatewayListResponseGuardrailsResponseS3Flag AIGatewayListResponseGuardrailsResponseS3 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS3Block AIGatewayListResponseGuardrailsResponseS3 = "BLOCK"` - `S4 AIGatewayListResponseGuardrailsResponseS4` - `const AIGatewayListResponseGuardrailsResponseS4Flag AIGatewayListResponseGuardrailsResponseS4 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS4Block AIGatewayListResponseGuardrailsResponseS4 = "BLOCK"` - `S5 AIGatewayListResponseGuardrailsResponseS5` - `const AIGatewayListResponseGuardrailsResponseS5Flag AIGatewayListResponseGuardrailsResponseS5 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS5Block AIGatewayListResponseGuardrailsResponseS5 = "BLOCK"` - `S6 AIGatewayListResponseGuardrailsResponseS6` - `const AIGatewayListResponseGuardrailsResponseS6Flag AIGatewayListResponseGuardrailsResponseS6 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS6Block AIGatewayListResponseGuardrailsResponseS6 = "BLOCK"` - `S7 AIGatewayListResponseGuardrailsResponseS7` - `const AIGatewayListResponseGuardrailsResponseS7Flag AIGatewayListResponseGuardrailsResponseS7 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS7Block AIGatewayListResponseGuardrailsResponseS7 = "BLOCK"` - `S8 AIGatewayListResponseGuardrailsResponseS8` - `const AIGatewayListResponseGuardrailsResponseS8Flag AIGatewayListResponseGuardrailsResponseS8 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS8Block AIGatewayListResponseGuardrailsResponseS8 = "BLOCK"` - `S9 AIGatewayListResponseGuardrailsResponseS9` - `const AIGatewayListResponseGuardrailsResponseS9Flag AIGatewayListResponseGuardrailsResponseS9 = "FLAG"` - `const AIGatewayListResponseGuardrailsResponseS9Block AIGatewayListResponseGuardrailsResponseS9 = "BLOCK"` - `IsDefault bool` - `LogManagement int64` - `LogManagementStrategy AIGatewayListResponseLogManagementStrategy` - `const AIGatewayListResponseLogManagementStrategyStopInserting AIGatewayListResponseLogManagementStrategy = "STOP_INSERTING"` - `const AIGatewayListResponseLogManagementStrategyDeleteOldest AIGatewayListResponseLogManagementStrategy = "DELETE_OLDEST"` - `Logpush bool` - `LogpushPublicKey string` - `Otel []AIGatewayListResponseOtel` - `Authorization string` - `Headers map[string, string]` - `URL string` - `ContentType AIGatewayListResponseOtelContentType` - `const AIGatewayListResponseOtelContentTypeJson AIGatewayListResponseOtelContentType = "json"` - `const AIGatewayListResponseOtelContentTypeProtobuf AIGatewayListResponseOtelContentType = "protobuf"` - `RateLimitingTechnique AIGatewayListResponseRateLimitingTechnique` - `const AIGatewayListResponseRateLimitingTechniqueFixed AIGatewayListResponseRateLimitingTechnique = "fixed"` - `const AIGatewayListResponseRateLimitingTechniqueSliding AIGatewayListResponseRateLimitingTechnique = "sliding"` - `RetryBackoff AIGatewayListResponseRetryBackoff` Backoff strategy for retry delays - `const AIGatewayListResponseRetryBackoffConstant AIGatewayListResponseRetryBackoff = "constant"` - `const AIGatewayListResponseRetryBackoffLinear AIGatewayListResponseRetryBackoff = "linear"` - `const AIGatewayListResponseRetryBackoffExponential AIGatewayListResponseRetryBackoff = "exponential"` - `RetryDelay int64` Delay between retry attempts in milliseconds (0-5000) - `RetryMaxAttempts int64` Maximum number of retry attempts for failed requests (1-5) - `StoreID string` - `Stripe AIGatewayListResponseStripe` - `Authorization string` - `UsageEvents []AIGatewayListResponseStripeUsageEvent` - `Payload string` - `WorkersAIBillingMode AIGatewayListResponseWorkersAIBillingMode` Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. - `const AIGatewayListResponseWorkersAIBillingModePostpaid AIGatewayListResponseWorkersAIBillingMode = "postpaid"` - `Zdr bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/ai_gateway" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.AIGateway.List(context.TODO(), ai_gateway.AIGatewayListParams{ AccountID: cloudflare.F("3ebbcb006d4d46d7bb6a8c7f14676cb0"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### 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" ] }, "guardrails": { "prompt": { "P1": "FLAG", "S1": "FLAG", "S10": "FLAG", "S11": "FLAG", "S12": "FLAG", "S13": "FLAG", "S2": "FLAG", "S3": "FLAG", "S4": "FLAG", "S5": "FLAG", "S6": "FLAG", "S7": "FLAG", "S8": "FLAG", "S9": "FLAG" }, "response": { "P1": "FLAG", "S1": "FLAG", "S10": "FLAG", "S11": "FLAG", "S12": "FLAG", "S13": "FLAG", "S2": "FLAG", "S3": "FLAG", "S4": "FLAG", "S5": "FLAG", "S6": "FLAG", "S7": "FLAG", "S8": "FLAG", "S9": "FLAG" } }, "is_default": true, "log_management": 10000, "log_management_strategy": "STOP_INSERTING", "logpush": true, "logpush_public_key": "xxxxxxxxxxxxxxxx", "otel": [ { "authorization": "authorization", "headers": { "foo": "string" }, "url": "https://example.com", "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 } ```