---
title: "Konnect Metering & Billing"
url: "https://nov18-dev.movespot.fyi/apis/konnect-metering-billing-private-0/versions/6e18e75c-446e-4fe4-8c39-2ccdd58e22a9"
---

# Konnect Metering & Billing

OpenAPI specification document.

```json
{"openapi":"3.0.0","info":{"title":"Konnect Metering & Billing","version":"0.0.1","contact":{"name":"Kong","url":"https://cloud.konghq.com"},"description":"Konnect Metering & Billing API."},"servers":[{"url":"https://us.api.konghq.com/v3","description":"United-States Production region"},{"url":"https://eu.api.konghq.com/v3","description":"Europe Production region"},{"url":"https://au.api.konghq.com/v3","description":"Australia Production region"},{"url":"https://me.api.konghq.com/v3","description":"Middle-East Production region"},{"url":"https://in.api.konghq.com/v3","description":"India Production region"},{"url":"https://sg.api.konghq.com/v3","description":"Singapore Production region"}],"paths":{"/openmeter/currencies":{"get":{"operationId":"list-currencies","summary":"List currencies","description":"List currencies supported by the billing system.","parameters":[{"$ref":"#/components/parameters/PagePaginationQuery"},{"name":"filter","in":"query","description":"Filter currencies returned in the response.\n\nTo filter currencies by type add the following query param: filter[type]=custom","required":false,"schema":{"$ref":"#/components/schemas/ListCurrenciesParamsFilter"},"style":"deepObject"}],"responses":{"200":{"description":"Page paginated response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrencyPagePaginatedResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter Billing"]}},"/openmeter/currencies/custom":{"post":{"operationId":"create-custom-currency","summary":"Create custom currency","description":"Create a custom currency.\nThis operation allows defining your own custom currency for billing purposes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCurrencyCustomRequest"}}}},"responses":{"201":{"description":"CurrencyCustom created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCurrencyCustom"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter Billing"]}},"/openmeter/currencies/custom/{currencyId}/cost-bases":{"get":{"operationId":"list-cost-bases","summary":"List cost bases","description":"List cost bases for a currency.\nFor custom currencies, there can be multiple cost bases with different `effective_from` dates.","parameters":[{"name":"currencyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}},{"name":"filter","in":"query","description":"Filter cost bases returned in the response.\n\nTo filter cost bases by fiat currency code add the following query param: filter[fiat_code]=USD","required":false,"schema":{"$ref":"#/components/schemas/ListCostBasesParamsFilter"},"style":"deepObject"},{"$ref":"#/components/parameters/PagePaginationQuery"}],"responses":{"200":{"description":"Page paginated response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostBasisPagePaginatedResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["OpenMeter Billing"]},"post":{"operationId":"create-cost-basis","summary":"Create cost basis","description":"Create a cost basis for a currency.","parameters":[{"name":"currencyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCostBasisRequest"}}}},"responses":{"201":{"description":"CostBasis created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCostBasis"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter Billing"]}},"/openmeter/features/{featureId}/cost/query":{"post":{"operationId":"query-feature-cost","summary":"Query feature cost","description":"Query the cost of a feature.","parameters":[{"name":"featureId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryRequest"}}}},"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCostQueryResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["OpenMeter Features"]}},"/openmeter/llm-cost/overrides":{"get":{"operationId":"list-llm-cost-overrides","summary":"List LLM cost overrides","description":"List per-namespace price overrides.","parameters":[{"name":"filter","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ListLLMCostPricesParamsFilter"},"style":"deepObject"},{"$ref":"#/components/parameters/PagePaginationQuery"}],"responses":{"200":{"description":"Page paginated response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricePagePaginatedResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter LLM Cost"]},"post":{"operationId":"create-llm-cost-override","summary":"Create LLM cost override","description":"Create a per-namespace price override.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMCostOverrideCreate"}}}},"responses":{"201":{"description":"Price created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMCostPrice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter LLM Cost"]}},"/openmeter/llm-cost/overrides/{priceId}":{"delete":{"operationId":"delete-llm-cost-override","summary":"Delete LLM cost override","description":"Delete a per-namespace price override.","parameters":[{"name":"priceId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"responses":{"204":{"description":"Deleted response."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["OpenMeter LLM Cost"]}},"/openmeter/llm-cost/prices":{"get":{"operationId":"list-llm-cost-prices","summary":"List LLM cost prices","description":"List global LLM cost prices.\nReturns prices with overrides applied if any.","parameters":[{"name":"filter","in":"query","description":"Filter prices.","required":false,"schema":{"$ref":"#/components/schemas/ListLLMCostPricesParamsFilter"},"style":"deepObject"},{"name":"sort","in":"query","description":"Sort prices returned in the response.\nSupported sort attributes are:\n- `id`\n- `provider.id`\n- `model.id` (default)\n- `effective_from`\n- `effective_to`\n\nThe `asc` suffix is optional as the default sort order is ascending.\nThe `desc` suffix is used to specify a descending order.","required":false,"schema":{"$ref":"#/components/schemas/SortQuery"},"explode":false,"style":"form"},{"$ref":"#/components/parameters/PagePaginationQuery"}],"responses":{"200":{"description":"Page paginated response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricePagePaginatedResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter LLM Cost"]}},"/openmeter/llm-cost/prices/{priceId}":{"get":{"operationId":"get-llm-cost-price","summary":"Get LLM cost price","description":"Get a specific LLM cost price by ID.\nReturns the price with overrides applied if any.","parameters":[{"name":"priceId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMCostPrice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["OpenMeter LLM Cost"]}},"/openmeter/meters/{meterId}":{"post":{"operationId":"query-meter","summary":"Query meter","description":"Query a meter for usage.","parameters":[{"name":"meterId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryRequest"}}}},"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["Meters"]}},"/openmeter/tax-codes":{"post":{"operationId":"create-tax-code","summary":"Create tax code","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxCodeRequest"}}}},"responses":{"201":{"description":"TaxCode created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTaxCode"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter Tax"]},"get":{"operationId":"list-tax-codes","summary":"List tax codes","parameters":[{"$ref":"#/components/parameters/PagePaginationQuery"},{"name":"include_deleted","in":"query","description":"Include deleted tax codes in the response.","required":false,"schema":{"type":"boolean"},"explode":false,"style":"form"}],"responses":{"200":{"description":"Page paginated response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCodePagePaginatedResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"tags":["OpenMeter Tax"]}},"/openmeter/tax-codes/{taxCodeId}":{"get":{"operationId":"get-tax-code","summary":"Get tax code","parameters":[{"name":"taxCodeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"responses":{"200":{"description":"TaxCode response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTaxCode"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["OpenMeter Tax"]},"put":{"operationId":"upsert-tax-code","summary":"Upsert tax code","parameters":[{"name":"taxCodeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTaxCodeRequest"}}}},"responses":{"200":{"description":"TaxCode upsert response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTaxCode"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"$ref":"#/components/responses/Gone"}},"tags":["OpenMeter Tax"]},"delete":{"operationId":"delete-tax-code","summary":"Delete tax code","parameters":[{"name":"taxCodeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ULID"}}],"responses":{"204":{"description":"Deleted response."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["OpenMeter Tax"]}}},"components":{"parameters":{"PagePaginationQuery":{"name":"page","in":"query","required":false,"description":"Determines which page of the collection to retrieve.","schema":{"type":"object","properties":{"size":{"type":"integer"},"number":{"type":"integer"}}},"style":"deepObject"}},"schemas":{"BillingCostBasis":{"description":"Describes currency basis supported by billing system.","type":"object","properties":{"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","type":"string","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","readOnly":true,"title":"ULID"},"fiat_code":{"description":"The fiat currency code for the cost basis.","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$"},"rate":{"description":"The cost rate for the currency.","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"effective_from":{"description":"An ISO-8601 timestamp representation of the date from which the cost basis is effective.\nIf not provided, it will be effective immediately and will set to `now` by the system.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"created_at":{"description":"An ISO-8601 timestamp representation of entity creation date.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"}},"required":["id","fiat_code","rate"]},"BillingCurrency":{"description":"Fiat or custom currency.","type":"object","discriminator":{"propertyName":"type","mapping":{"fiat":"#/components/schemas/BillingCurrencyFiat","custom":"#/components/schemas/BillingCurrencyCustom"}},"oneOf":[{"$ref":"#/components/schemas/BillingCurrencyFiat"},{"$ref":"#/components/schemas/BillingCurrencyCustom"}]},"BillingCurrencyCodeCustom":{"description":"Custom currency code.\nIt should be a unique code but not conflicting with any existing fiat currency codes.","type":"string","maxLength":24,"minLength":3},"BillingCurrencyCustom":{"description":"Describes custom currency.","type":"object","properties":{"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","type":"string","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","readOnly":true,"title":"ULID"},"type":{"description":"The type of the currency.","type":"string","enum":["custom"],"readOnly":true},"name":{"description":"The name of the currency. It should be a human-readable string that represents the name of the currency, such as \"US Dollar\" or \"Euro\".","type":"string","maxLength":256,"minLength":1},"description":{"description":"Description of the currency.","type":"string","maxLength":256,"minLength":1},"symbol":{"description":"The symbol of the currency. It should be a string that represents the symbol of the currency, such as \"$\" for US Dollar or \"€\" for Euro.","type":"string","minLength":1},"code":{"$ref":"#/components/schemas/BillingCurrencyCodeCustom"},"created_at":{"description":"An ISO-8601 timestamp representation of the custom currency creation date.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"}},"required":["id","type","name","code"]},"BillingCurrencyFiat":{"description":"Currency describes a currency supported by the billing system.","type":"object","properties":{"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","type":"string","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","readOnly":true,"title":"ULID"},"type":{"description":"The type of the currency.","type":"string","enum":["fiat"],"readOnly":true},"name":{"description":"The name of the currency. It should be a human-readable string that represents the name of the currency, such as \"US Dollar\" or \"Euro\".","type":"string","maxLength":256,"minLength":1},"description":{"description":"Description of the currency.","type":"string","maxLength":256,"minLength":1},"symbol":{"description":"The symbol of the currency. It should be a string that represents the symbol of the currency, such as \"$\" for US Dollar or \"€\" for Euro.","type":"string","minLength":1},"code":{"description":"Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$","readOnly":true}},"required":["id","type","name","code"]},"BillingTaxCode":{"description":"Tax codes by provider.","type":"object","properties":{"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","type":"string","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","readOnly":true,"title":"ULID"},"name":{"description":"Display name of the resource.\n\nBetween 1 and 256 characters.","type":"string","maxLength":256,"minLength":1},"description":{"description":"Optional description of the resource.\n\nMaximum 1024 characters.","type":"string","maxLength":1024},"labels":{"$ref":"#/components/schemas/Labels"},"created_at":{"description":"An ISO-8601 timestamp representation of entity creation date.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"},"updated_at":{"description":"An ISO-8601 timestamp representation of entity last update date.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"},"deleted_at":{"description":"An ISO-8601 timestamp representation of entity deletion date.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"},"key":{"$ref":"#/components/schemas/ResourceKey"},"app_mappings":{"description":"Mapping of app types to tax codes.","type":"array","items":{"$ref":"#/components/schemas/BillingTaxCodeAppMapping"},"title":"App type to tax code mappings"}},"required":["id","name","key","app_mappings"]},"BillingTaxCodeAppMapping":{"description":"Mapping of app types to tax codes.","type":"object","properties":{"app_type":{"description":"The app type that the tax code is associated with.","type":"string","enum":["sandbox","stripe","external_invoicing"],"title":"App type"},"tax_code":{"description":"Tax code.","type":"string","title":"Tax code"}},"required":["app_type","tax_code"]},"CostBasisPagePaginatedResponse":{"description":"Page paginated response.","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingCostBasis"}},"meta":{"$ref":"#/components/schemas/PaginatedMeta"}},"required":["data","meta"]},"CreateCostBasisRequest":{"description":"CostBasis create request.","type":"object","properties":{"fiat_code":{"description":"The fiat currency code for the cost basis.","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$"},"rate":{"description":"The cost rate for the currency.","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"effective_from":{"description":"An ISO-8601 timestamp representation of the date from which the cost basis is effective.\nIf not provided, it will be effective immediately and will set to `now` by the system.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"}},"required":["fiat_code","rate"]},"CreateCurrencyCustomRequest":{"description":"CurrencyCustom create request.","type":"object","properties":{"name":{"description":"The name of the currency. It should be a human-readable string that represents the name of the currency, such as \"US Dollar\" or \"Euro\".","type":"string","maxLength":256,"minLength":1},"description":{"description":"Description of the currency.","type":"string","maxLength":256,"minLength":1},"symbol":{"description":"The symbol of the currency. It should be a string that represents the symbol of the currency, such as \"$\" for US Dollar or \"€\" for Euro.","type":"string","minLength":1},"code":{"$ref":"#/components/schemas/BillingCurrencyCodeCustom"}},"required":["name","code"]},"CreateTaxCodeRequest":{"description":"TaxCode create request.","type":"object","properties":{"name":{"description":"Display name of the resource.\n\nBetween 1 and 256 characters.","type":"string","maxLength":256,"minLength":1},"description":{"description":"Optional description of the resource.\n\nMaximum 1024 characters.","type":"string","maxLength":1024},"labels":{"$ref":"#/components/schemas/Labels"},"key":{"$ref":"#/components/schemas/ResourceKey"},"app_mappings":{"description":"Mapping of app types to tax codes.","type":"array","items":{"$ref":"#/components/schemas/BillingTaxCodeAppMapping"},"title":"App type to tax code mappings"}},"required":["name","key","app_mappings"]},"CurrencyPagePaginatedResponse":{"description":"Page paginated response.","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingCurrency"}},"meta":{"$ref":"#/components/schemas/PaginatedMeta"}},"required":["data","meta"]},"FeatureCostQueryResult":{"description":"Result of a feature cost query.","type":"object","properties":{"from":{"description":"Start of the queried period.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"to":{"description":"End of the queried period.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"data":{"description":"The cost data rows.","type":"array","items":{"$ref":"#/components/schemas/FeatureCostQueryRow"}}},"required":["data"]},"FeatureCostQueryRow":{"description":"A row in the result of a feature cost query.","type":"object","properties":{"usage":{"description":"The metered usage value for the period.","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"cost":{"description":"The computed cost amount (usage × unit cost).\nNull when pricing is not available for the given combination of dimensions.","type":"string","nullable":true,"pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"currency":{"description":"The currency code of the cost amount.","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$"},"detail":{"description":"Detail message when cost amount is null, explaining why the cost could not be resolved.","type":"string"},"from":{"description":"The start of the time bucket the value is aggregated over.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"to":{"description":"The end of the time bucket the value is aggregated over.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"dimensions":{"description":"The dimensions the value is aggregated over.\n`subject` and `customer_id` are reserved dimensions.","type":"object","additionalProperties":{"type":"string"}}},"required":["usage","cost","currency","from","to","dimensions"]},"LLMCostOverrideCreate":{"description":"Input for creating a per-namespace price override.\nUnique per provider, model and currency.\nIf an override already exists for the given provider, model and currency, it will be updated.\nIf an override does not exist, it will be created.","type":"object","properties":{"provider":{"description":"Provider/vendor of the model.","type":"string"},"model_id":{"description":"Canonical model identifier.","type":"string"},"model_name":{"description":"Human-readable model name.","type":"string"},"pricing":{"description":"Token pricing data.","type":"object","properties":{"input_per_token":{"description":"Input price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"output_per_token":{"description":"Output price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"cache_read_per_token":{"description":"Cache read price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"cache_write_per_token":{"description":"Cache write price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"reasoning_per_token":{"description":"Reasoning output price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"}},"required":["input_per_token","output_per_token"]},"currency":{"description":"Currency code.","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$"},"effective_from":{"description":"When this override becomes effective.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"effective_to":{"description":"When this override expires.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"}},"required":["provider","model_id","pricing","currency","effective_from"]},"LLMCostPrice":{"description":"An LLM cost price record, representing the cost per token\nfor a specific model from a specific provider.","type":"object","properties":{"id":{"description":"Unique identifier.","type":"string","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","readOnly":true,"title":"ULID"},"provider":{"description":"Provider of the model.","type":"object","properties":{"id":{"description":"Identifier of the provider, e.g., \"openai\", \"anthropic\".","type":"string"},"name":{"description":"Name of the provider, e.g., \"OpenAI\", \"Anthropic\".","type":"string"}},"readOnly":true,"required":["id","name"]},"model":{"description":"The model.","type":"object","properties":{"id":{"description":"Identifier of the model, e.g., \"gpt-4\", \"claude-3-5-sonnet\".","type":"string"},"name":{"description":"Name of the model, e.g., \"GPT-4\", \"Claude 3.5 Sonnet\".","type":"string"}},"readOnly":true,"required":["id","name"]},"pricing":{"description":"Token pricing data.","type":"object","properties":{"input_per_token":{"description":"Input price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"output_per_token":{"description":"Output price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"cache_read_per_token":{"description":"Cache read price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"cache_write_per_token":{"description":"Cache write price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"reasoning_per_token":{"description":"Reasoning output price per token (USD).","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"}},"readOnly":true,"required":["input_per_token","output_per_token"]},"currency":{"description":"Currency code (currently always \"USD\").","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$","readOnly":true},"source":{"description":"Where this price came from.","type":"string","enum":["manual","system"],"readOnly":true},"effective_from":{"description":"When this price becomes effective.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"},"effective_to":{"description":"When this price expires (null = current).","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"},"created_at":{"description":"Creation timestamp.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"},"updated_at":{"description":"Last update timestamp.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","readOnly":true,"title":"RFC3339 Date-Time"}},"required":["id","provider","model","pricing","currency","source","effective_from"]},"ListCostBasesParamsFilter":{"description":"Filter options for listing cost bases.","type":"object","properties":{"fiat_code":{"description":"Filter cost bases by fiat currency code.","type":"string","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$"}}},"ListCurrenciesParamsFilter":{"description":"Filter options for listing currencies.","type":"object","properties":{"type":{"description":"Filter currencies by type.","type":"string","enum":["fiat","custom"]}}},"ListLLMCostPricesParamsFilter":{"description":"Filter options for listing LLM cost prices.","type":"object","properties":{"provider":{"description":"Filter by provider. e.g. ?filter[provider][eq]=openai","type":"object","properties":{"eq":{"description":"The field must match the provided value.","type":"string","x-omitempty":true},"neq":{"description":"The field must not match the provided value.","type":"string","x-omitempty":true},"contains":{"description":"The field must contain the provided value.","type":"string","x-omitempty":true}}},"model_id":{"description":"Filter by model ID. e.g. ?filter[model_id][eq]=gpt-4","type":"object","properties":{"eq":{"description":"The field must match the provided value.","type":"string","x-omitempty":true},"neq":{"description":"The field must not match the provided value.","type":"string","x-omitempty":true},"contains":{"description":"The field must contain the provided value.","type":"string","x-omitempty":true}}},"model_name":{"description":"Filter by model name. e.g. ?filter[model_name][contains]=gpt","type":"object","properties":{"eq":{"description":"The field must match the provided value.","type":"string","x-omitempty":true},"neq":{"description":"The field must not match the provided value.","type":"string","x-omitempty":true},"contains":{"description":"The field must contain the provided value.","type":"string","x-omitempty":true}}},"currency":{"description":"Filter by currency code. e.g. ?filter[currency][eq]=USD","type":"object","properties":{"eq":{"description":"The field must match the provided value.","type":"string","x-omitempty":true},"neq":{"description":"The field must not match the provided value.","type":"string","x-omitempty":true},"contains":{"description":"The field must contain the provided value.","type":"string","x-omitempty":true}}}}},"MeterQueryRequest":{"description":"A meter query request.","type":"object","properties":{"from":{"description":"The start of the period the usage is queried from.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"to":{"description":"The end of the period the usage is queried to.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"granularity":{"description":"The size of the time buckets to group the usage into.\nIf not specified, the usage is aggregated over the entire period.","type":"string","enum":["PT1M","PT1H","P1D","P1M"]},"time_zone":{"description":"The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nThe time zone is used to determine the start and end of the time buckets.\nIf not specified, the UTC timezone will be used.","type":"string","default":"UTC"},"group_by_dimensions":{"description":"The dimensions to group the results by.","type":"array","items":{"type":"string"},"example":["model","type"],"maxItems":100},"filters":{"description":"Filters to apply to the query.","type":"object","properties":{"dimensions":{"description":"Filters to apply to the dimensions of the query.\nFor `subject` and `customer_id` only equals (\"eq\", \"in\") comparisons are supported.","type":"object","additionalProperties":{"$ref":"#/components/schemas/QueryFilterStringMapItem"},"maxProperties":10}}}},"example":{"from":"2023-01-01T00:00:00Z","to":"2023-01-02T00:00:00Z","granularity":"P1D","time_zone":"UTC"}},"MeterQueryResult":{"description":"Meter query result.","type":"object","properties":{"from":{"description":"The start of the period the usage is queried from.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"to":{"description":"The end of the period the usage is queried to.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"data":{"description":"The usage data.\nIf no data is available, an empty array is returned.","type":"array","items":{"$ref":"#/components/schemas/MeterQueryRow"}}},"example":{"from":"2023-01-01T00:00:00Z","to":"2023-01-02T00:00:00Z","data":[{"value":"12.3456","from":"2023-01-01T00:00:00Z","to":"2023-01-02T00:00:00Z","dimensions":{"customer_id":"01G65Z755AFWAKHE12NY0CQ9FH","model":"gpt-4-turbo","type":"input"}}]},"required":["data"]},"MeterQueryRow":{"description":"A row in the result of a meter query.","type":"object","properties":{"value":{"description":"The aggregated value.","type":"string","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$"},"from":{"description":"The start of the time bucket the value is aggregated over.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"to":{"description":"The end of the time bucket the value is aggregated over.","type":"string","format":"date-time","example":"2023-01-01T01:01:01.001Z","title":"RFC3339 Date-Time"},"dimensions":{"description":"The dimensions the value is aggregated over.\n`subject` and `customer_id` are reserved dimensions.","type":"object","additionalProperties":{"type":"string"}}},"example":{"value":"12.3456","from":"2023-01-01T00:00:00Z","to":"2023-01-02T00:00:00Z","dimensions":{"customer_id":"01G65Z755AFWAKHE12NY0CQ9FH","model":"gpt-4-turbo","type":"input"}},"required":["value","from","to","dimensions"]},"PricePagePaginatedResponse":{"description":"Page paginated response.","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LLMCostPrice"}},"meta":{"$ref":"#/components/schemas/PaginatedMeta"}},"required":["data","meta"]},"QueryFilterString":{"description":"A query filter for a string attribute.\nOperators are mutually exclusive, only one operator is allowed at a time.","type":"object","properties":{"eq":{"description":"The attribute equals the provided value.","type":"string"},"neq":{"description":"The attribute does not equal the provided value.","type":"string"},"in":{"description":"The attribute is one of the provided values.","type":"array","items":{"type":"string"},"maxItems":100,"minItems":1},"nin":{"description":"The attribute is not one of the provided values.","type":"array","items":{"type":"string"},"maxItems":100,"minItems":1},"contains":{"description":"The attribute contains the provided value.","type":"string"},"ncontains":{"description":"The attribute does not contain the provided value.","type":"string"},"and":{"description":"Combines the provided filters with a logical AND.","type":"array","items":{"$ref":"#/components/schemas/QueryFilterString"},"maxItems":10,"minItems":1},"or":{"description":"Combines the provided filters with a logical OR.","type":"array","items":{"$ref":"#/components/schemas/QueryFilterString"},"maxItems":10,"minItems":1}},"additionalProperties":{"not":{}},"maxProperties":1,"minProperties":1,"title":"Query String Filter"},"QueryFilterStringMapItem":{"description":"A query filter for an item in a string map attribute.\nOperators are mutually exclusive, only one operator is allowed at a time.","type":"object","properties":{"exists":{"description":"The attribute exists.","type":"boolean"},"eq":{"description":"The attribute equals the provided value.","type":"string"},"neq":{"description":"The attribute does not equal the provided value.","type":"string"},"in":{"description":"The attribute is one of the provided values.","type":"array","items":{"type":"string"},"maxItems":100,"minItems":1},"nin":{"description":"The attribute is not one of the provided values.","type":"array","items":{"type":"string"},"maxItems":100,"minItems":1},"contains":{"description":"The attribute contains the provided value.","type":"string"},"ncontains":{"description":"The attribute does not contain the provided value.","type":"string"},"and":{"description":"Combines the provided filters with a logical AND.","type":"array","items":{"$ref":"#/components/schemas/QueryFilterString"},"maxItems":10,"minItems":1},"or":{"description":"Combines the provided filters with a logical OR.","type":"array","items":{"$ref":"#/components/schemas/QueryFilterString"},"maxItems":10,"minItems":1}},"additionalProperties":{"not":{}},"maxProperties":1,"minProperties":1,"title":"Query String Map Item Filter"},"ResourceKey":{"description":"A key is a unique string that is used to identify a resource.","type":"string","example":"resource_key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Resource Key"},"TaxCodePagePaginatedResponse":{"description":"Page paginated response.","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingTaxCode"}},"meta":{"$ref":"#/components/schemas/PaginatedMeta"}},"required":["data","meta"]},"ULID":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","type":"string","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","title":"ULID"},"UpsertTaxCodeRequest":{"description":"TaxCode upsert request.","type":"object","properties":{"name":{"description":"Display name of the resource.\n\nBetween 1 and 256 characters.","type":"string","maxLength":256,"minLength":1},"description":{"description":"Optional description of the resource.\n\nMaximum 1024 characters.","type":"string","maxLength":1024},"labels":{"$ref":"#/components/schemas/Labels"},"app_mappings":{"description":"Mapping of app types to tax codes.","type":"array","items":{"$ref":"#/components/schemas/BillingTaxCodeAppMapping"},"title":"App type to tax code mappings"}},"required":["name","app_mappings"]},"Labels":{"description":"Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. \n\nKeys must be of length 1-63 characters, and cannot start with \"kong\", \"konnect\", \"mesh\", \"kic\", or \"_\".\n","type":"object","example":{"env":"test"},"additionalProperties":{"type":"string","pattern":"^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$","minLength":1,"maxLength":63},"maxProperties":50,"title":"Labels"},"PageMeta":{"description":"Contains pagination query parameters and the total number of objects returned.","type":"object","properties":{"number":{"type":"number","example":1},"size":{"type":"number","example":10},"total":{"type":"number","example":100}},"required":["number","size","total"]},"PaginatedMeta":{"description":"returns the pagination information","type":"object","properties":{"page":{"$ref":"#/components/schemas/PageMeta"}},"required":["page"],"title":"PaginatedMeta"},"BaseError":{"description":"standard error","type":"object","properties":{"status":{"description":"The HTTP status code of the error. Useful when passing the response\nbody to child properties in a frontend UI. Must be returned as an integer.\n","type":"integer","readOnly":true},"title":{"description":"A short, human-readable summary of the problem. It should not\nchange between occurences of a problem, except for localization.\nShould be provided as \"Sentence case\" for direct use in the UI.\n","type":"string","readOnly":true},"type":{"description":"The error type.","type":"string","readOnly":true},"instance":{"description":"Used to return the correlation ID back to the user, in the format\nkong:trace:<correlation_id>. This helps us find the relevant logs\nwhen a customer reports an issue.\n","type":"string","readOnly":true},"detail":{"description":"A human readable explanation specific to this occurence of the problem.\nThis field may contain request/entity data to help the user understand\nwhat went wrong. Enclose variable values in square brackets. Should be\nprovided as \"Sentence case\" for direct use in the UI.\n","type":"string","readOnly":true}},"required":["status","title","instance","detail"],"title":"Error"},"InvalidRules":{"description":"invalid parameters rules","type":"string","enum":["required","is_array","is_base64","is_boolean","is_date_time","is_integer","is_null","is_number","is_object","is_string","is_uuid","is_fqdn","is_arn","unknown_property","missing_reference","is_label","matches_regex","invalid","is_supported_network_availability_zone_list","is_supported_network_cidr_block","is_supported_provider_region","type"],"nullable":true,"readOnly":true},"InvalidParameterStandard":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"$ref":"#/components/schemas/InvalidRules"},"source":{"type":"string","example":"body"},"reason":{"type":"string","example":"is a required field","readOnly":true}},"additionalProperties":false,"required":["field","reason"]},"InvalidParameterMinimumLength":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["min_length","min_digits","min_lowercase","min_uppercase","min_symbols","min_items","min"],"nullable":false,"readOnly":true},"minimum":{"type":"integer","example":8},"source":{"type":"string","example":"body"},"reason":{"type":"string","example":"must have at least 8 characters","readOnly":true}},"additionalProperties":false,"required":["field","reason","rule","minimum"]},"InvalidParameterMaximumLength":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["max_length","max_items","max"],"nullable":false,"readOnly":true},"maximum":{"type":"integer","example":8},"source":{"type":"string","example":"body"},"reason":{"type":"string","example":"must not have more than 8 characters","readOnly":true}},"additionalProperties":false,"required":["field","reason","rule","maximum"]},"InvalidParameterChoiceItem":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["enum"],"nullable":false,"readOnly":true},"reason":{"type":"string","example":"is a required field","readOnly":true},"choices":{"type":"array","items":{},"minItems":1,"nullable":false,"readOnly":true,"uniqueItems":true},"source":{"type":"string","example":"body"}},"additionalProperties":false,"required":["field","reason","rule","choices"]},"InvalidParameterDependentItem":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["dependent_fields"],"nullable":true,"readOnly":true},"reason":{"type":"string","example":"is a required field","readOnly":true},"dependents":{"type":"array","items":{},"nullable":true,"readOnly":true,"uniqueItems":true},"source":{"type":"string","example":"body"}},"additionalProperties":false,"required":["field","rule","reason","dependents"]},"InvalidParameters":{"description":"invalid parameters","type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/InvalidParameterStandard"},{"$ref":"#/components/schemas/InvalidParameterMinimumLength"},{"$ref":"#/components/schemas/InvalidParameterMaximumLength"},{"$ref":"#/components/schemas/InvalidParameterChoiceItem"},{"$ref":"#/components/schemas/InvalidParameterDependentItem"}]},"minItems":1,"nullable":false,"uniqueItems":true},"BadRequestError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","required":["invalid_parameters"],"properties":{"invalid_parameters":{"$ref":"#/components/schemas/InvalidParameters"}}}]},"UnauthorizedError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","properties":{"status":{"example":401},"title":{"example":"Unauthorized"},"type":{"example":"https://httpstatuses.com/401"},"instance":{"example":"kong:trace:1234567890"},"detail":{"example":"Invalid credentials"}}}]},"ForbiddenError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","properties":{"status":{"example":403},"title":{"example":"Forbidden"},"type":{"example":"https://httpstatuses.com/403"},"instance":{"example":"kong:trace:1234567890"},"detail":{"example":"Forbidden"}}}]},"NotFoundError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","properties":{"status":{"example":404},"title":{"example":"Not Found"},"type":{"example":"https://httpstatuses.com/404"},"instance":{"example":"kong:trace:1234567890"},"detail":{"example":"Not found"}}}]},"SortQuery":{"description":"The `asc` suffix is optional as the default sort order is ascending.\nThe `desc` suffix is used to specify a descending order.\nMultiple sort attributes may be provided via a comma separated list.\nJSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').\n","type":"string","example":"created_at desc","title":"SortQuery"},"GoneError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","properties":{"status":{"example":410},"title":{"example":"Gone"},"type":{"example":"https://httpstatuses.com/410"},"instance":{"example":"kong:trace:1234567890"},"detail":{"example":"Gone"}}}]}},"examples":{"UnauthorizedExample":{"value":{"status":401,"title":"Unauthorized","instance":"kong:trace:8347343766220159418","detail":"Unauthorized"}},"ForbiddenExample":{"value":{"status":403,"title":"Forbidden","instance":"kong:trace:2723154947768991354","detail":"You do not have permission to perform this action"}},"NotFoundExample":{"value":{"status":404,"title":"Not Found","instance":"kong:trace:6816496025408232265","detail":"Not Found"}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"},"examples":{"UnauthorizedExample":{"$ref":"#/components/examples/UnauthorizedExample"}}}}},"Forbidden":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"},"examples":{"UnauthorizedExample":{"$ref":"#/components/examples/ForbiddenExample"}}}}},"NotFound":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundError"},"examples":{"NotFoundExample":{"$ref":"#/components/examples/NotFoundExample"}}}}},"Gone":{"description":"Gone","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/GoneError"}}}}},"securitySchemes":{"systemAccountAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Token","description":"The system account access token is meant for automations and integrations that are not directly associated with a human identity.\nYou can generate a system account Access Token by creating a system account and then obtaining a system account access token for that account.\nThe access token must be passed in the header of a request, for example:\n`curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer spat_i2Ej...'`\n"},"personalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"Token","description":"The personal access token is meant to be used as an alternative to basic-auth when accessing Konnect via APIs.\nYou can generate a Personal Access Token (PAT) from the [personal access token page](https://cloud.konghq.com/global/account/tokens/) in the Konnect dashboard.\nThe PAT token must be passed in the header of a request, for example:\n`curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer kpat_xgfT...'`\n"},"konnectAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The Konnect access token is meant to be used by the Konnect dashboard and the decK CLI authenticate with.\n"}}},"tags":[{"name":"OpenMeter LLM Cost","description":"LLM cost database providing normalized pricing data for language models across providers. Prices are synced from multiple external sources and auto-confirmed when they agree."},{"name":"OpenMeter Features","description":"Features represent product capabilities backed by meters, with optional per-unit cost configuration."},{"name":"OpenMeter Tax","description":"Tax codes are used to calculate taxes for customers."},{"name":"OpenMeter Billing","description":"Billing manages the billing profiles, currencies, cost bases, and invoices for customers."},{"name":"Meters","description":"Meters specify how to aggregate events for billing and analytics purposes. Meters can be configured with multiple aggregation methods and groupings. Multiple meters can be created for the same event type, enabling flexible metering scenarios."}],"security":[{"systemAccountAccessToken":[]},{"personalAccessToken":[]},{"konnectAccessToken":[]}]}
```
