AI Gateway
List gateways
Get a gateway
Create a gateway
Update a gateway
Delete a gateway
ModelsExpand Collapse
class AIGatewayListResponse: …
Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.
Requires customer-provided provider credentials and prevents fallback to Unified Billing.
fedramp_level: Optional[Literal["fedramp-medium", "fedramp-high"]]FedRAMP compliance level: fedramp-medium or fedramp-high.
FedRAMP compliance level: fedramp-medium or fedramp-high.
fedramp_mode: Optional[Literal["prefer", "require"]]FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
retry_backoff: Optional[Literal["constant", "linear", "exponential"]]Backoff strategy for retry delays
Backoff strategy for retry delays
Delay between retry attempts in milliseconds (0-60000)
Maximum number of retry attempts for failed requests (1-5)
spend_limits: Optional[SpendLimits]
Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.
workers_ai_billing_mode: Optional[Literal["postpaid", "unified"]]Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
class AIGatewayGetResponse: …
Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.
Requires customer-provided provider credentials and prevents fallback to Unified Billing.
fedramp_level: Optional[Literal["fedramp-medium", "fedramp-high"]]FedRAMP compliance level: fedramp-medium or fedramp-high.
FedRAMP compliance level: fedramp-medium or fedramp-high.
fedramp_mode: Optional[Literal["prefer", "require"]]FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
retry_backoff: Optional[Literal["constant", "linear", "exponential"]]Backoff strategy for retry delays
Backoff strategy for retry delays
Delay between retry attempts in milliseconds (0-60000)
Maximum number of retry attempts for failed requests (1-5)
spend_limits: Optional[SpendLimits]
Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.
workers_ai_billing_mode: Optional[Literal["postpaid", "unified"]]Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
class AIGatewayCreateResponse: …
Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.
Requires customer-provided provider credentials and prevents fallback to Unified Billing.
fedramp_level: Optional[Literal["fedramp-medium", "fedramp-high"]]FedRAMP compliance level: fedramp-medium or fedramp-high.
FedRAMP compliance level: fedramp-medium or fedramp-high.
fedramp_mode: Optional[Literal["prefer", "require"]]FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
retry_backoff: Optional[Literal["constant", "linear", "exponential"]]Backoff strategy for retry delays
Backoff strategy for retry delays
Delay between retry attempts in milliseconds (0-60000)
Maximum number of retry attempts for failed requests (1-5)
spend_limits: Optional[SpendLimits]
Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.
workers_ai_billing_mode: Optional[Literal["postpaid", "unified"]]Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
class AIGatewayUpdateResponse: …
Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.
Requires customer-provided provider credentials and prevents fallback to Unified Billing.
fedramp_level: Optional[Literal["fedramp-medium", "fedramp-high"]]FedRAMP compliance level: fedramp-medium or fedramp-high.
FedRAMP compliance level: fedramp-medium or fedramp-high.
fedramp_mode: Optional[Literal["prefer", "require"]]FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
retry_backoff: Optional[Literal["constant", "linear", "exponential"]]Backoff strategy for retry delays
Backoff strategy for retry delays
Delay between retry attempts in milliseconds (0-60000)
Maximum number of retry attempts for failed requests (1-5)
spend_limits: Optional[SpendLimits]
Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.
workers_ai_billing_mode: Optional[Literal["postpaid", "unified"]]Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
class AIGatewayDeleteResponse: …
Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.
Requires customer-provided provider credentials and prevents fallback to Unified Billing.
fedramp_level: Optional[Literal["fedramp-medium", "fedramp-high"]]FedRAMP compliance level: fedramp-medium or fedramp-high.
FedRAMP compliance level: fedramp-medium or fedramp-high.
fedramp_mode: Optional[Literal["prefer", "require"]]FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
FedRAMP enforcement mode. “prefer” prioritizes compliant connectors but allows fallback. “require” strictly filters.
retry_backoff: Optional[Literal["constant", "linear", "exponential"]]Backoff strategy for retry delays
Backoff strategy for retry delays
Delay between retry attempts in milliseconds (0-60000)
Maximum number of retry attempts for failed requests (1-5)
spend_limits: Optional[SpendLimits]
Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.
workers_ai_billing_mode: Optional[Literal["postpaid", "unified"]]Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.
Controls how Workers AI inference calls routed through this gateway are billed. ‘postpaid’ bills the account directly through Workers AI; ‘unified’ deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.