  APIs are increasingly becoming new business assets for organizations and
consequently, API functionality and its pricing should be precisely defined for
customers. Pricing is typically composed by different plans that specify a
range of limitations, e.g., a Free plan allows 100 monthly requests while a
Gold plan has 10000 requests per month. In this context, the OpenAPI
Specification (OAS) has emerged to model the functional part of an API,
becoming a de facto industry standard and boosting a rich ecosystem of
vendor-neutral tools to assist API providers and consumers. In contrast, there
is no proposal for modeling API pricings (i.e. their plans and limitations) and
this lack hinders the creation of tools that can leverage this information. To
deal with this gap, this paper presents a pricing modeling framework that
includes: (a) Pricing4APIs model, a comprehensive and rigorous model of API
pricings, along SLA4OAI, a serialization that extends OAS; (b) an operation to
validate the description of API pricings, with a toolset (sla4oai-analyzer)
that has been developed to automate this operation. Additionally, we analyzed
268 real-world APIs to assess the expressiveness of our proposal and created a
representative dataset of 54 pricing models to validate our framework.
