International relations theory has borrowed important intuitions from Olson's static public-goods model (hegemonic stability) and the repeated prisoners’ dilemma (theories of international cooperation), and arguments often combine implications from both models. We develop a general, repeated public-goods model. We then allow the qualitative dimensions of cooperation to emerge endogenously: agreements can have broad or narrow membership and entail deep or shallow commitments; they can be multilateral or discriminatory; they can be ad hoc or institutionalized. We find that the relationship between the distribution of power and international cooperation is complex: a large leading state forms a narrow coalition of intensive contributors, and builds institutions, while a smaller leading state forms a broader coalition that makes shallow contributions, and is more inclined to multilateralism.