Question about APIs

Hi,

I’m very new here and have a lot to learn. I understand there are thousands of models here that can be downloaded and hosted locally. For example - Stable Diffusion v1.5 Model Card. But there is also a functional API that works right here on Hugging Face, does that mean this is an example of the API you would have back to your own hosted instance? Or can you just get an API to the Hugging Face instance?

Thanks so much!