@@ -6488,6 +6488,181 @@ paths:
64886488 }
64896489 ```
64906490
6491+ /queue/cancel :
6492+ post :
6493+ description : Cancel a pending or running job. Returns the job status after the
6494+ cancellation attempt.
6495+ requestBody :
6496+ content :
6497+ application/json :
6498+ schema :
6499+ $ref : " #/components/schemas/QueueCancelRequest"
6500+ description : Cancel request
6501+ required : true
6502+ responses :
6503+ " 200 " :
6504+ description : Successfully canceled
6505+ content :
6506+ application/json :
6507+ schema :
6508+ $ref : " #/components/schemas/QueueCancelResponse"
6509+ " 400 " :
6510+ description : Invalid request
6511+ content :
6512+ application/json :
6513+ schema :
6514+ $ref : " #/components/schemas/QueueError"
6515+ " 404 " :
6516+ description : Request not found
6517+ content :
6518+ application/json :
6519+ schema :
6520+ $ref : " #/components/schemas/QueueError"
6521+ " 409 " :
6522+ description : Job could not be canceled (already completed/failed)
6523+ content :
6524+ application/json :
6525+ schema :
6526+ $ref : " #/components/schemas/QueueCancelResponse"
6527+ " 500 " :
6528+ description : Internal server error
6529+ content :
6530+ application/json :
6531+ schema :
6532+ $ref : " #/components/schemas/QueueError"
6533+ summary : Cancel a queued job
6534+ tags :
6535+ - Queue
6536+ /queue/metrics :
6537+ get :
6538+ description : Get the current queue statistics including pending and running job
6539+ counts.
6540+ parameters :
6541+ - description : Model name to get metrics for
6542+ in : query
6543+ name : model
6544+ required : true
6545+ schema :
6546+ type : string
6547+ responses :
6548+ " 200 " :
6549+ description : Queue metrics
6550+ content :
6551+ application/json :
6552+ schema :
6553+ additionalProperties : true
6554+ type : object
6555+ " 400 " :
6556+ description : Invalid request
6557+ content :
6558+ application/json :
6559+ schema :
6560+ $ref : " #/components/schemas/QueueError"
6561+ " 401 " :
6562+ description : Unauthorized
6563+ content :
6564+ application/json :
6565+ schema :
6566+ $ref : " #/components/schemas/QueueError"
6567+ " 500 " :
6568+ description : Internal server error
6569+ content :
6570+ application/json :
6571+ schema :
6572+ $ref : " #/components/schemas/QueueError"
6573+ summary : Get queue metrics
6574+ tags :
6575+ - Queue
6576+ /queue/status :
6577+ get :
6578+ description : Check the status of a job using request_id and model query parameters.
6579+ parameters :
6580+ - description : Request ID
6581+ in : query
6582+ name : request_id
6583+ required : true
6584+ schema :
6585+ type : string
6586+ - description : Model name
6587+ in : query
6588+ name : model
6589+ required : true
6590+ schema :
6591+ type : string
6592+ responses :
6593+ " 200 " :
6594+ description : Status information
6595+ content :
6596+ application/json :
6597+ schema :
6598+ $ref : " #/components/schemas/QueueJobStatusResponse"
6599+ " 400 " :
6600+ description : Invalid request
6601+ content :
6602+ application/json :
6603+ schema :
6604+ $ref : " #/components/schemas/QueueError"
6605+ " 401 " :
6606+ description : Unauthorized
6607+ content :
6608+ application/json :
6609+ schema :
6610+ $ref : " #/components/schemas/QueueError"
6611+ " 404 " :
6612+ description : Request not found
6613+ content :
6614+ application/json :
6615+ schema :
6616+ $ref : " #/components/schemas/QueueError"
6617+ " 500 " :
6618+ description : Internal server error
6619+ content :
6620+ application/json :
6621+ schema :
6622+ $ref : " #/components/schemas/QueueError"
6623+ summary : Get job status
6624+ tags :
6625+ - Queue
6626+ /queue/submit :
6627+ post :
6628+ description : Submit a new job to the queue. Returns a request ID that can be
6629+ used to check status.
6630+ requestBody :
6631+ content :
6632+ application/json :
6633+ schema :
6634+ $ref : " #/components/schemas/QueueJobRequest"
6635+ description : Job request
6636+ required : true
6637+ responses :
6638+ " 200 " :
6639+ description : Successfully queued request
6640+ content :
6641+ application/json :
6642+ schema :
6643+ $ref : " #/components/schemas/QueueJobResponse"
6644+ " 400 " :
6645+ description : Invalid request
6646+ content :
6647+ application/json :
6648+ schema :
6649+ $ref : " #/components/schemas/QueueError"
6650+ " 401 " :
6651+ description : Unauthorized
6652+ content :
6653+ application/json :
6654+ schema :
6655+ $ref : " #/components/schemas/QueueError"
6656+ " 500 " :
6657+ description : Internal server error
6658+ content :
6659+ application/json :
6660+ schema :
6661+ $ref : " #/components/schemas/QueueError"
6662+ summary : Submit a queued job
6663+ tags :
6664+ - Queue
6665+
64916666components :
64926667 securitySchemes :
64936668 bearerAuth :
@@ -11402,3 +11577,87 @@ components:
1140211577 type : string
1140311578 x-enum-varnames :
1140411579 - VolumeTypeReadOnly
11580+ QueueError :
11581+ properties :
11582+ code :
11583+ type : string
11584+ message :
11585+ type : string
11586+ param :
11587+ type : string
11588+ type :
11589+ type : string
11590+ type : object
11591+ QueueCancelRequest :
11592+ properties :
11593+ model :
11594+ type : string
11595+ request_id :
11596+ type : string
11597+ required :
11598+ - model
11599+ - request_id
11600+ type : object
11601+ QueueCancelResponse :
11602+ properties :
11603+ status :
11604+ type : string
11605+ type : object
11606+ QueueJobRequest :
11607+ properties :
11608+ info :
11609+ additionalProperties : true
11610+ type : object
11611+ model :
11612+ description : Required model identifier
11613+ type : string
11614+ payload :
11615+ additionalProperties : true
11616+ type : object
11617+ priority :
11618+ type : integer
11619+ required :
11620+ - model
11621+ - payload
11622+ type : object
11623+ QueueJobResponse :
11624+ properties :
11625+ error :
11626+ $ref : " #/components/schemas/QueueError"
11627+ requestId :
11628+ type : string
11629+ type : object
11630+ QueueJobStatusResponse :
11631+ properties :
11632+ claimed_at :
11633+ type : string
11634+ created_at :
11635+ type : string
11636+ done_at :
11637+ type : string
11638+ info :
11639+ additionalProperties : true
11640+ type : object
11641+ inputs :
11642+ additionalProperties : true
11643+ type : object
11644+ model :
11645+ type : string
11646+ outputs :
11647+ additionalProperties : true
11648+ type : object
11649+ priority :
11650+ description : Additional fields for test compatibility
11651+ type : integer
11652+ request_id :
11653+ type : string
11654+ retries :
11655+ type : integer
11656+ status :
11657+ description : this should be the enum, but isn't for backwards compatability
11658+ type : string
11659+ warnings :
11660+ items :
11661+ type : string
11662+ type : array
11663+ type : object
0 commit comments