{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a pricing rule that sets per-token costs for models matched on a custom provider. AI Gateway uses these rules to calculate request costs.","properties":{"path":{"type":"object","properties":{"account_id":{"type":"string","examples":["3ebbcb006d4d46d7bb6a8c7f14676cb0"]}},"required":["account_id"],"additionalProperties":false},"body":{"type":"object","properties":{"account_provider_id":{"description":"ID of the custom provider that the pricing rule applies to.","type":"string","format":"uuid"},"cost_in":{"type":"number"},"cost_out":{"type":"number"},"cost_type":{"type":"string","default":"tokens"},"enable":{"type":"boolean"},"model":{"type":"string"},"model_rule":{"type":"string","default":"equals","enum":["equals","starts-with","contains"]},"token_pricing":{"type":"object","properties":{"input_audio_tokens":{"type":"number"},"input_cache_creation_tokens":{"type":"number"},"input_cached_tokens":{"type":"number"},"input_image_count":{"type":"number"},"input_image_tokens":{"type":"number"},"input_text_tokens":{"type":"number"},"input_tokens":{"type":"number"},"input_video_tokens":{"type":"number"},"output_image_count":{"type":"number"},"output_reasoning_tokens":{"type":"number"},"output_tokens":{"type":"number"},"total_tokens":{"type":"number"}}}},"required":["account_provider_id","model"]}},"required":["path"],"additionalProperties":false},"name":"Create a custom provider pricing rule","id":"cloudflare.aig-config-create-account-provider-cost","example":{"path":{"account_id":"3ebbcb006d4d46d7bb6a8c7f14676cb0"}},"maxRequests":1,"summary":false}}