separate API and bases