How foundation models, APIs, and applications layer together