Skip to content

Conversation

boriselec
Copy link

new api method: /status
it returns
{
"status": "done",
"position_in_queue": null,
"filename": "RimWorld_ArtAI_00003_.png"
}

I'm working on a mod which generates images (https://github.com/boriselec/RimWorld_ArtAi). I have a lot of requests to implement integration with local providers.

The current api is a bit awkward to work with. Now the loop is: /prompt to put in queue -> /history to check status -> /image to get image. There is no way to get position in queue unless to parse /queue output.

I suggest a new /status by prompt_id to get status, position and filename.

Don't look at the code too closely, I generated it with llm and haven't reviewed it. It works though.
I will rewrite it if you're willing to accept the new route.

@christian-byrne
Copy link
Collaborator

Have you tried listening for status messages over websocket per example in https://github.com/comfyanonymous/ComfyUI/blob/master/script_examples/websockets_api_example.py#L29-L57

@boriselec
Copy link
Author

boriselec commented Sep 22, 2025

Thank you, I can do that.
However, I would still prefer HTTP over WebSockets, as it's much easier to implement clients.

@christian-byrne
Copy link
Collaborator

Valid point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants