R
RunPod10mo ago
koolteche

API Wrapper

curl -X POST https://api.runpod.ai/v2/stable-diffusion-v1/run \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \ -d '{"input": {"prompt": "a cute magical flying dog, fantasy art drawn by disney concept artists"}}' I wanted to know, is it okay to call the apis straight away from the app with the auth token in the header or do I have to call these apis via some node layer or aws lambda?
2 Replies
ashleyk
ashleyk10mo ago
Don't expose your API key within a web application otherwise people can use it to launch pods and all kinds of things. Rather use a backend in between your frontend and RunPod using Node etc so that your API key doesn't get leaked.
koolteche
kooltecheOP10mo ago
Alright. Thank you! @ashleyk
Want results from more Discord servers?
Add your server