-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Add unified jobs API with /api/jobs endpoints #11054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Kosinkadink
merged 28 commits into
Comfy-Org:master
from
ric-yu:feature/unified-jobs-api
Dec 18, 2025
Merged
Add unified jobs API with /api/jobs endpoints #11054
Kosinkadink
merged 28 commits into
Comfy-Org:master
from
ric-yu:feature/unified-jobs-api
Dec 18, 2025
+918
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ae57e94 to
c4b7a84
Compare
57fd19f to
c860cc6
Compare
Contributor
Author
|
Rebasing |
bigcat88
reviewed
Dec 5, 2025
Member
|
Can you test this properly? The endpoint doesn't work after I run a regular workflow. |
Contributor
Author
Fixed an issue with preview as text. This endpoint has been working for me otherwise, but I'm stuck with testing light workflows since I'm on a Mac |
c5c3db7 to
1f7c1a9
Compare
1371f61 to
ed61899
Compare
Contributor
Author
|
rebasing |
Kosinkadink
approved these changes
Dec 18, 2025
lrivera
pushed a commit
to Research-Warrant/ComfyUI
that referenced
this pull request
Jan 8, 2026
* feat: create a /jobs api to return queue and history jobs
* update unused vars
* include priority
* create jobs helper file
* fix ruff
* update how we set error message
* include execution error in both responses
* rename error -> failed, fix output shape
* re-use queue and history functions
* set workflow id
* allow srot by exec duration
* fix tests
* send priority and remove error msg
* use ws messages to get start and end times
* revert main.py fully
* refactor: move all /jobs business logic to jobs.py
* fix failing test
* remove some tests
* fix non dict nodes
* address comments
* filter by workflow id and remove null fields
* add clearer typing - remove get("..") or ..
* refactor query params to top get_job(s) doc, add remove_sensitive_from_queue
* add brief comment explaining why we skip animated
* comment that format field is for frontend backward compatibility
* fix whitespace
---------
Co-authored-by: Jedrzej Kosinski <[email protected]>
Co-authored-by: guill <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/jobsendpoint with filtering, sorting, and paginationpending,in_progress,completed,errorcreate_timeorexecution_timelimit/offsetGET /api/jobs/{job_id}for single job details with full outputsexecution_timein history for completed jobsoutputs_countandpreview_outputin job responsestype=output, supports images/video/audio/3D)Motivation
Currently
/queueand/historyare separate endpoints with different response shapes. This unified API provides:outputs_count,preview_output) for list views without fetching full outputsTest plan
pytest tests/execution/test_execution.py -v/api/jobsreturns jobs from queue and history on https://www.github.com/Comfy-Org/ComfyUI_frontend/commit/a57ea57a09a274efdc8444b949452509d7cf49de/api/jobs/{id}returns full job with outputsexecution_timeis tracked for completed jobs