Credibility, experience rating and more recently the so-called a posterior ratemaking in insurance consists in the determination of premiums that account for both the policyholders’ attributes and their claim history. The models designed for such purposes are known as credibility models and fall under the same framework of Bayesian inference in statistics. Most of the data-driven models used for this task are mathematically intractable due to their complex structure, and therefore credibility premiums must be obtained via numerical methods e.g simulation via Markov Chain Monte Carlo. However, such methods are computationally expensive and even prohibitive for large portfolios when these must be applied at the policyholder level. In addition, these computations are ``black-box" procedures for actuaries as there is no clear expression showing how the claim history of policyholders is used to upgrade their premiums. In this paper, we address these challenges and propose a methodology to derive a closed-form expression to compute credibility premiums for any given Bayesian model. We do so by introducing a credibility index, that works as an efficient summary statistic of the claim history of a policyholder, and illustrate how it can be used as the main input to approximate any credibility formula. The closed-form solution can be used to reduce the computational burden of a posteriori ratemaking for large portfolios via the same idea of surrogate modeling, and also provides a transparent way of computing premiums from which practical interpretations and risk assessments can be performed.