You would need to use the Stable Diffusion API and get app and/or auth tokens from them and connect directly. I’m sure there’s plenty of examples on their API page, and once you understand the process, to do it in Unity you would use UnityWebRequest.
Here’s general pointers on this sort of networking stuff: