Design the front door of a cloud platform: every API call a customer makes hits the gateway first, which validates the caller's API key and hands the authorized call to the upstream service it was aimed at.
Completed calls report usage records back through the gateway so billing can meter each account.