{"openapi":"3.1.0","info":{"title":"Embedded Routing Stack","version":"1.0.0"},"paths":{"/customers":{"get":{"operationId":"customers_list_customers","summary":"List customers","tags":["customers"],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"origin_id","in":"query","description":"Look up a customer by your own ID: returns the customer whose origin_id matches, so you can resolve it to the Merge UUID without storing the mapping.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customers_list_customers_Response_200"}}}}},"security":[{"BearerAuth":[]}]},"post":{"operationId":"customers_create_customer","summary":"Create customer","tags":["customers"],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"origin_id":{"type":"string"},"key_usage_default":{"$ref":"#/components/schemas/CustomersPostRequestBodyContentApplicationJsonSchemaKeyUsageDefault"}},"required":["name","origin_id"]}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}":{"get":{"operationId":"customers_get_customer","summary":"Get customer","tags":["customers"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"operationId":"customers_delete_customer","summary":"Delete customer","tags":["customers"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"security":[{"BearerAuth":[]}]},"patch":{"operationId":"customers_update_customer","summary":"Update customer","tags":["customers"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"key_usage_default":{"$ref":"#/components/schemas/CustomersCustomerIdPatchRequestBodyContentApplicationJsonSchemaKeyUsageDefault"},"status":{"$ref":"#/components/schemas/CustomersCustomerIdPatchRequestBodyContentApplicationJsonSchemaStatus"}}}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/routing-policies":{"get":{"operationId":"routingPolicies_list_routing_policies","summary":"List routing policies","tags":["routingPolicies"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routing_policies_list_routing_policies_Response_200"}}}}},"security":[{"BearerAuth":[]}]},"post":{"operationId":"routingPolicies_create_routing_policy","summary":"Create routing policy","tags":["routingPolicies"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingPolicy"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"],"description":"Optional free-text description"},"strategy":{"$ref":"#/components/schemas/CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaStrategy"},"is_default":{"type":"boolean"},"allowed_providers":{"type":"array","items":{"type":"string"}},"allowed_models":{"type":"array","items":{"type":"string"}},"priority_order":{"type":"array","items":{"$ref":"#/components/schemas/CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaPriorityOrderItems"}},"axis":{"$ref":"#/components/schemas/CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaAxis","description":"Optimization axis for INTELLIGENT policies (the objective the router optimizes for). Must be omitted for PRIORITY. Defaults to COST when omitted."}},"required":["name","strategy"]}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/routing-policies/{policy_id}":{"get":{"operationId":"routingPolicies_get_routing_policy","summary":"Get routing policy","tags":["routingPolicies"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"policy_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingPolicy"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"operationId":"routingPolicies_delete_routing_policy","summary":"Delete routing policy","tags":["routingPolicies"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"policy_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"security":[{"BearerAuth":[]}]},"patch":{"operationId":"routingPolicies_update_routing_policy","summary":"Update routing policy","tags":["routingPolicies"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"policy_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingPolicy"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"],"description":"Optional free-text description"},"strategy":{"$ref":"#/components/schemas/CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaStrategy","description":"To change routing, send strategy plus its matching fields (all-or-nothing); otherwise the update is metadata-only"},"is_default":{"type":"boolean"},"allowed_providers":{"type":"array","items":{"type":"string"}},"allowed_models":{"type":"array","items":{"type":"string"}},"priority_order":{"type":"array","items":{"$ref":"#/components/schemas/CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaPriorityOrderItems"}},"axis":{"$ref":"#/components/schemas/CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaAxis","description":"Optimization axis for INTELLIGENT policies (the objective the router optimizes for). Must be omitted for PRIORITY. Defaults to COST when omitted."}}}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/keys":{"get":{"operationId":"customerKeys_list_customer_keys","summary":"List keys","description":"The customer's usable key per vendor: the customer's own key if they have one, else your organization's key, else Merge-managed. Vendors without a usable key under the customer's key mode are omitted.","tags":["customerKeys"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer_keys_list_customer_keys_Response_200"}}}}},"security":[{"BearerAuth":[]}]},"post":{"operationId":"customerKeys_add_customer_key","summary":"Add provider key","tags":["customerKeys"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerKey"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"vendor":{"type":"string"},"api_key":{"type":"string","description":"Write-only, never returned."}},"required":["vendor","api_key"]}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/keys/{key_id}":{"delete":{"operationId":"customerKeys_delete_customer_key","summary":"Delete provider key","tags":["customerKeys"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/api-keys":{"get":{"operationId":"customerApiKeys_list_customer_api_keys","summary":"List API keys","description":"The customer's gateway API keys (metadata only; secrets are never readable).","tags":["customerApiKeys"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer_API_keys_list_customer_api_keys_Response_200"}}}}},"security":[{"BearerAuth":[]}]},"post":{"operationId":"customerApiKeys_create_customer_api_key","summary":"Mint API key","description":"Mint a Merge Gateway API key scoped to this customer. The raw key is returned ONCE, in `key`. Requires an organization-level access key. Max 5 keys per customer.","tags":["customerApiKeys"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAPIKeyCreated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"spending_limit":{"type":"number","format":"double","description":"Per-key spend cap over reset_period, independent of the customer's budget."},"reset_period":{"$ref":"#/components/schemas/CustomersCustomerIdApiKeysPostRequestBodyContentApplicationJsonSchemaResetPeriod","description":"Requires spending_limit."},"rate_limit_rpm":{"type":"integer"},"rate_limit_tpm":{"type":"integer"}}}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/api-keys/{key_id}":{"delete":{"operationId":"customerApiKeys_delete_customer_api_key","summary":"Revoke API key","description":"Revoke a key. Rotation is create-then-delete so the customer never loses access mid-swap.","tags":["customerApiKeys"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/budgets":{"get":{"operationId":"budgets_list_budgets","summary":"List budgets","tags":["budgets"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budgets_list_budgets_Response_200"}}}}},"security":[{"BearerAuth":[]}]},"post":{"operationId":"budgets_create_budget","summary":"Create budget","tags":["budgets"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"spending_limit":{"type":"number","format":"double"},"reset_period":{"$ref":"#/components/schemas/CustomersCustomerIdBudgetsPostRequestBodyContentApplicationJsonSchemaResetPeriod"},"spending_limit_type":{"$ref":"#/components/schemas/CustomersCustomerIdBudgetsPostRequestBodyContentApplicationJsonSchemaSpendingLimitType"}},"required":["spending_limit","reset_period","spending_limit_type"]}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/budgets/{budget_id}":{"get":{"operationId":"budgets_get_budget","summary":"Get budget","tags":["budgets"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"budget_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"operationId":"budgets_delete_budget","summary":"Delete budget","tags":["budgets"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"budget_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"security":[{"BearerAuth":[]}]},"patch":{"operationId":"budgets_update_budget","summary":"Update budget","tags":["budgets"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"budget_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"spending_limit":{"type":"number","format":"double"},"reset_period":{"$ref":"#/components/schemas/CustomersCustomerIdBudgetsBudgetIdPatchRequestBodyContentApplicationJsonSchemaResetPeriod"},"spending_limit_type":{"$ref":"#/components/schemas/CustomersCustomerIdBudgetsBudgetIdPatchRequestBodyContentApplicationJsonSchemaSpendingLimitType"}}}}}},"security":[{"BearerAuth":[]}]}},"/customers/{customer_id}/usage":{"get":{"operationId":"usage_get_customer_usage","summary":"Get customer usage","tags":["usage"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","required":false,"schema":{"type":"string"}},{"name":"end","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUsage"}}}}},"security":[{"BearerAuth":[]}]}}},"tags":[{"name":"customers"},{"name":"routingPolicies"},{"name":"customerKeys"},{"name":"customerApiKeys"},{"name":"budgets"},{"name":"usage"}],"servers":[{"url":"https://api-gateway.merge.dev/v1","description":"https://api-gateway.merge.dev/v1"}],"components":{"schemas":{"CustomerKeyUsageDefault":{"type":"string","enum":["USE_ANY","PREFER_BYOK","BYOK_ONLY"],"title":"CustomerKeyUsageDefault"},"CustomerStatus":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"An inactive customer's requests are rejected.","title":"CustomerStatus"},"Customer":{"type":"object","properties":{"id":{"type":"string","description":"Merge UUID. Use as customer at request time."},"origin_id":{"type":"string","description":"Your unique id for the customer (immutable)."},"name":{"type":"string"},"routing_policies":{"type":"array","items":{"type":"string"},"description":"Array of the customer's routing policy UUIDs."},"budgets":{"type":"array","items":{"type":"string"},"description":"Array of the customer's budget UUIDs."},"byok_configurations":{"type":"array","items":{"type":"string"},"description":"Array of the customer's provider key UUIDs."},"key_usage_default":{"$ref":"#/components/schemas/CustomerKeyUsageDefault"},"status":{"$ref":"#/components/schemas/CustomerStatus","description":"An inactive customer's requests are rejected."},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"}},"title":"Customer"},"Customers_list_customers_Response_200":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"title":"Customers_list_customers_Response_200"},"CustomersPostRequestBodyContentApplicationJsonSchemaKeyUsageDefault":{"type":"string","enum":["USE_ANY","PREFER_BYOK","BYOK_ONLY"],"title":"CustomersPostRequestBodyContentApplicationJsonSchemaKeyUsageDefault"},"CustomersCustomerIdPatchRequestBodyContentApplicationJsonSchemaKeyUsageDefault":{"type":"string","enum":["USE_ANY","PREFER_BYOK","BYOK_ONLY"],"title":"CustomersCustomerIdPatchRequestBodyContentApplicationJsonSchemaKeyUsageDefault"},"CustomersCustomerIdPatchRequestBodyContentApplicationJsonSchemaStatus":{"type":"string","enum":["ACTIVE","INACTIVE"],"title":"CustomersCustomerIdPatchRequestBodyContentApplicationJsonSchemaStatus"},"RoutingPolicyStrategy":{"type":"string","enum":["PRIORITY","INTELLIGENT"],"title":"RoutingPolicyStrategy"},"RoutingPolicyPriorityOrderItems":{"type":"object","properties":{"model":{"type":"string"},"priority":{"type":"integer"}},"title":"RoutingPolicyPriorityOrderItems"},"RoutingPolicyAxis":{"type":"string","enum":["COST","PERFORMANCE","CAPABILITY"],"description":"Optimization axis the router optimizes for. Set for INTELLIGENT policies; null for PRIORITY.","title":"RoutingPolicyAxis"},"RoutingPolicy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Optional free-text description"},"strategy":{"$ref":"#/components/schemas/RoutingPolicyStrategy"},"is_default":{"type":"boolean","description":"Used when a request names no explicit policy."},"allowed_providers":{"type":["array","null"],"items":{"type":"string"}},"allowed_models":{"type":["array","null"],"items":{"type":"string"}},"priority_order":{"type":["array","null"],"items":{"$ref":"#/components/schemas/RoutingPolicyPriorityOrderItems"}},"axis":{"oneOf":[{"$ref":"#/components/schemas/RoutingPolicyAxis"},{"type":"null"}],"description":"Optimization axis the router optimizes for. Set for INTELLIGENT policies; null for PRIORITY."},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"}},"title":"RoutingPolicy"},"Routing_policies_list_routing_policies_Response_200":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RoutingPolicy"}},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"title":"Routing policies_list_routing_policies_Response_200"},"CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaStrategy":{"type":"string","enum":["PRIORITY","INTELLIGENT"],"title":"CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaStrategy"},"CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaPriorityOrderItems":{"type":"object","properties":{"model":{"type":"string"},"priority":{"type":"integer"}},"title":"CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaPriorityOrderItems"},"CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaAxis":{"type":"string","enum":["COST","PERFORMANCE","CAPABILITY"],"description":"Optimization axis for INTELLIGENT policies (the objective the router optimizes for). Must be omitted for PRIORITY. Defaults to COST when omitted.","title":"CustomersCustomerIdRoutingPoliciesPostRequestBodyContentApplicationJsonSchemaAxis"},"CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaStrategy":{"type":"string","enum":["PRIORITY","INTELLIGENT"],"description":"To change routing, send strategy plus its matching fields (all-or-nothing); otherwise the update is metadata-only","title":"CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaStrategy"},"CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaPriorityOrderItems":{"type":"object","properties":{"model":{"type":"string"},"priority":{"type":"integer"}},"title":"CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaPriorityOrderItems"},"CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaAxis":{"type":"string","enum":["COST","PERFORMANCE","CAPABILITY"],"description":"Optimization axis for INTELLIGENT policies (the objective the router optimizes for). Must be omitted for PRIORITY. Defaults to COST when omitted.","title":"CustomersCustomerIdRoutingPoliciesPolicyIdPatchRequestBodyContentApplicationJsonSchemaAxis"},"CustomerKeyKeyOwnership":{"type":"string","enum":["MERGE","ORGANIZATION","CUSTOMER"],"description":"The resolved key's owner: CUSTOMER, ORGANIZATION, or MERGE. Vendors without a usable key under the customer's key mode are omitted from the list.","title":"CustomerKeyKeyOwnership"},"CustomerKey":{"type":"object","properties":{"id":{"type":"string"},"vendor":{"type":"string","description":"Provider slug, e.g. openai."},"key_ownership":{"oneOf":[{"$ref":"#/components/schemas/CustomerKeyKeyOwnership"},{"type":"null"}],"description":"The resolved key's owner: CUSTOMER, ORGANIZATION, or MERGE. Vendors without a usable key under the customer's key mode are omitted from the list."},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"}},"title":"CustomerKey"},"Customer_keys_list_customer_keys_Response_200":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomerKey"}},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"title":"Customer keys_list_customer_keys_Response_200"},"CustomerAPIKey":{"type":"object","properties":{"id":{"type":"string","description":"Key identifier; pass to DELETE."},"customer":{"type":"string","description":"The customer this key is bound to (immutable)."},"name":{"type":["string","null"]},"key_prefix":{"type":"string"},"is_active":{"type":"boolean"},"spending_limit":{"type":["number","null"],"format":"double"},"reset_period":{"type":["string","null"]},"rate_limit_rpm":{"type":["integer","null"]},"rate_limit_tpm":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"}},"description":"A Merge Gateway API key scoped to one customer. Distinct from CustomerKey, which is the customer's own provider credential.","title":"CustomerAPIKey"},"Customer_API_keys_list_customer_api_keys_Response_200":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAPIKey"}},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"title":"Customer API keys_list_customer_api_keys_Response_200"},"CustomersCustomerIdApiKeysPostRequestBodyContentApplicationJsonSchemaResetPeriod":{"type":"string","enum":["daily","weekly","monthly"],"description":"Requires spending_limit.","title":"CustomersCustomerIdApiKeysPostRequestBodyContentApplicationJsonSchemaResetPeriod"},"CustomerAPIKeyCreated":{"type":"object","properties":{"id":{"type":"string","description":"Key identifier; pass to DELETE."},"customer":{"type":"string","description":"The customer this key is bound to (immutable)."},"name":{"type":["string","null"]},"key_prefix":{"type":"string"},"is_active":{"type":"boolean"},"spending_limit":{"type":["number","null"],"format":"double"},"reset_period":{"type":["string","null"]},"rate_limit_rpm":{"type":["integer","null"]},"rate_limit_tpm":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"key":{"type":"string","description":"The raw secret. Shown only in this response; store it now."}},"required":["key"],"description":"A Merge Gateway API key scoped to one customer. Distinct from CustomerKey, which is the customer's own provider credential.","title":"CustomerAPIKeyCreated"},"BudgetResetPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY","YEARLY"],"title":"BudgetResetPeriod"},"BudgetSpendingLimitType":{"type":"string","enum":["HARD","SOFT"],"description":"HARD blocks over-budget requests; SOFT alerts only.","title":"BudgetSpendingLimitType"},"Budget":{"type":"object","properties":{"id":{"type":"string"},"spending_limit":{"type":"number","format":"double","description":"USD, greater than 0."},"reset_period":{"$ref":"#/components/schemas/BudgetResetPeriod"},"spending_limit_type":{"$ref":"#/components/schemas/BudgetSpendingLimitType","description":"HARD blocks over-budget requests; SOFT alerts only."},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"}},"title":"Budget"},"Budgets_list_budgets_Response_200":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Budget"}},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"title":"Budgets_list_budgets_Response_200"},"CustomersCustomerIdBudgetsPostRequestBodyContentApplicationJsonSchemaResetPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY","YEARLY"],"title":"CustomersCustomerIdBudgetsPostRequestBodyContentApplicationJsonSchemaResetPeriod"},"CustomersCustomerIdBudgetsPostRequestBodyContentApplicationJsonSchemaSpendingLimitType":{"type":"string","enum":["HARD","SOFT"],"title":"CustomersCustomerIdBudgetsPostRequestBodyContentApplicationJsonSchemaSpendingLimitType"},"CustomersCustomerIdBudgetsBudgetIdPatchRequestBodyContentApplicationJsonSchemaResetPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY","YEARLY"],"title":"CustomersCustomerIdBudgetsBudgetIdPatchRequestBodyContentApplicationJsonSchemaResetPeriod"},"CustomersCustomerIdBudgetsBudgetIdPatchRequestBodyContentApplicationJsonSchemaSpendingLimitType":{"type":"string","enum":["HARD","SOFT"],"title":"CustomersCustomerIdBudgetsBudgetIdPatchRequestBodyContentApplicationJsonSchemaSpendingLimitType"},"CustomerUsagePerModelItems":{"type":"object","properties":{"model":{"type":"string"},"spend":{"type":"number","format":"double"}},"title":"CustomerUsagePerModelItems"},"CustomerUsagePerProviderItems":{"type":"object","properties":{"provider":{"type":"string"},"spend":{"type":"number","format":"double"}},"title":"CustomerUsagePerProviderItems"},"CustomerUsagePerRoutingPolicyItems":{"type":"object","properties":{"routing_policy":{"type":"string"},"spend":{"type":"number","format":"double"}},"title":"CustomerUsagePerRoutingPolicyItems"},"CustomerUsage":{"type":"object","properties":{"customer_byok_spend":{"type":"number","format":"double","description":"Spend billed against the customer's own provider keys (USD)"},"organization_byok_spend":{"type":"number","format":"double","description":"Spend billed against your organization's provider keys (USD)"},"merge_spend":{"type":"number","format":"double","description":"Spend billed against Merge-managed credentials (USD). The three spend fields are disjoint; their sum is the customer's total spend for the range."},"request_count":{"type":"integer","description":"Number of requests in the range"},"per_model":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUsagePerModelItems"},"description":"Spend broken down per model, sorted by spend descending"},"per_provider":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUsagePerProviderItems"},"description":"Spend broken down per provider, sorted by spend descending"},"per_routing_policy":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUsagePerRoutingPolicyItems"},"description":"Spend broken down per routing policy, sorted by spend descending"}},"title":"CustomerUsage"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Your production key sent as a bearer token."}}}}