Architecture for API calls