foundation model apis