comfyanonymous / ComfyUI

The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface.
GNU General Public License v3.0
41.25k stars 4.39k forks source link

API documentation #2110

Open kanbekotori opened 7 months ago

kanbekotori commented 7 months ago

Where can I get the documentation for the comfyui api, like what are the urls and descriptions of the parameters and such.

cornpip commented 7 months ago

https://github.com/comfyanonymous/ComfyUI/tree/master/script_examples

DuckyBlender commented 3 months ago

Is there going to be more documented API? Two file examples isn't an API documentation

johnbenac commented 3 months ago

Yes, I want to build a GUI using Vue, that grabs images created in input or output folders, and then lets the users call the API by filling out JSON templates that use the assets already in the comfyUI library.

Say, for example, you want to upscale an image, and you may want to use different models to do the upscale. The GUI would show you all the models that you can use, polled from the models folder, and it will also give you a gallery of images presented on the client on the client machine (What is the API endpoint that will enable this? Is there an API endpoint for this? Can I add one?) and then when the user selects an image on their client machine, it sends the path of that image where it lives on the server in the API call to the server.

What are the API endpoints that will enable this?

I know that there are api endpoint that give you the models. Even just a simple readme that points to the the file where the API endpoints are defined.

johnbenac commented 3 months ago

This file seems somewhat self explanatory:

[ComfyUI](https://github.com/comfyanonymous/ComfyUI/tree/master)/[web](https://github.com/comfyanonymous/ComfyUI/tree/master/web)/[scripts](https://github.com/comfyanonymous/ComfyUI/tree/master/web/scripts) /api.js

DuckyBlender commented 2 months ago

This file seems somewhat self explanatory:

[ComfyUI](https://github.com/comfyanonymous/ComfyUI/tree/master)/[web](https://github.com/comfyanonymous/ComfyUI/tree/master/web)/[scripts](https://github.com/comfyanonymous/ComfyUI/tree/master/web/scripts) /api.js

LLAMA 3 generated documentation based on this file:

Endpoints

GET Endpoints

/prompt

/extensions

/embeddings

/object_info

/queue

/history

/system_stats

/settings

/settings/:id

/userdata/:file

POST Endpoints

/prompt

/interrupt

/users

/settings

/settings/:id

/userdata/:file

DELETE Endpoints

/queue/:id

/history/:id

Note that this documentation only covers the endpoints and methods defined in the provided JavaScript file. There may be additional endpoints or methods not included in this documentation.

JulianKingman commented 2 weeks ago

Would a PR with API documentation be welcome/accepted?