ai-dock / comfyui

ComfyUI docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
404 stars 145 forks source link

How to use /rp-api/runsync on pod model. #47

Open ultimatech-cn opened 4 months ago

ultimatech-cn commented 4 months ago

I deployed the image on runpod by adding GPU Pod. I can access comfyUI directly by browser. But I was confused how to access it by api mode. The following statement in doc. Could anyone kindly explained it , or provide some sample code for me.

ComfyUI RP API
This service is available on port 8188 and is used to test the [RunPod serverless](https://link.ai-dock.org/runpod-serverless) API.

You can access the api directly at /rp-api/runsync or you can use the Swager/openAPI playground at /rp-api.

There are several [example payloads](https://github.com/ai-dock/comfyui/tree/main/build/COPY_ROOT/opt/serverless/docs/example_payloads) included in this repository.

Your help is most appreciated.

robballantyne commented 4 months ago

@ultimatech-cn when you've opened the ComfyUI URL, you can manually append rp-api to load the API playground. It should look something like this:

https://xxxx-8188.proxy.runpod.net/rp-api

I'll eventually add a link to this to make it a little easier to find.

ultimatech-cn commented 4 months ago

Thanks a lot. I will try it.

ultimatech-cn commented 4 months ago

@robballantyne I have another question for that. Why the api is design to call the webhook, not response the output directly like serverless api? and any webhook sample available in this repo? I am totally new for the development of API