@@ -6437,6 +6437,181 @@ paths:
64376437 }
64386438 ```
64396439
6440+ /queue/cancel :
6441+ post :
6442+ description : Cancel a pending or running job. Returns the job status after the
6443+ cancellation attempt.
6444+ requestBody :
6445+ content :
6446+ application/json :
6447+ schema :
6448+ $ref : " #/components/schemas/QueueCancelRequest"
6449+ description : Cancel request
6450+ required : true
6451+ responses :
6452+ " 200 " :
6453+ description : Successfully canceled
6454+ content :
6455+ application/json :
6456+ schema :
6457+ $ref : " #/components/schemas/QueueCancelResponse"
6458+ " 400 " :
6459+ description : Invalid request
6460+ content :
6461+ application/json :
6462+ schema :
6463+ $ref : " #/components/schemas/QueueError"
6464+ " 404 " :
6465+ description : Request not found
6466+ content :
6467+ application/json :
6468+ schema :
6469+ $ref : " #/components/schemas/QueueError"
6470+ " 409 " :
6471+ description : Job could not be canceled (already completed/failed)
6472+ content :
6473+ application/json :
6474+ schema :
6475+ $ref : " #/components/schemas/QueueCancelResponse"
6476+ " 500 " :
6477+ description : Internal server error
6478+ content :
6479+ application/json :
6480+ schema :
6481+ $ref : " #/components/schemas/QueueError"
6482+ summary : Cancel a queued job
6483+ tags :
6484+ - Queue
6485+ /queue/metrics :
6486+ get :
6487+ description : Get the current queue statistics including pending and running job
6488+ counts.
6489+ parameters :
6490+ - description : Model name to get metrics for
6491+ in : query
6492+ name : model
6493+ required : true
6494+ schema :
6495+ type : string
6496+ responses :
6497+ " 200 " :
6498+ description : Queue metrics
6499+ content :
6500+ application/json :
6501+ schema :
6502+ additionalProperties : true
6503+ type : object
6504+ " 400 " :
6505+ description : Invalid request
6506+ content :
6507+ application/json :
6508+ schema :
6509+ $ref : " #/components/schemas/QueueError"
6510+ " 401 " :
6511+ description : Unauthorized
6512+ content :
6513+ application/json :
6514+ schema :
6515+ $ref : " #/components/schemas/QueueError"
6516+ " 500 " :
6517+ description : Internal server error
6518+ content :
6519+ application/json :
6520+ schema :
6521+ $ref : " #/components/schemas/QueueError"
6522+ summary : Get queue metrics
6523+ tags :
6524+ - Queue
6525+ /queue/status :
6526+ get :
6527+ description : Check the status of a job using request_id and model query parameters.
6528+ parameters :
6529+ - description : Request ID
6530+ in : query
6531+ name : request_id
6532+ required : true
6533+ schema :
6534+ type : string
6535+ - description : Model name
6536+ in : query
6537+ name : model
6538+ required : true
6539+ schema :
6540+ type : string
6541+ responses :
6542+ " 200 " :
6543+ description : Status information
6544+ content :
6545+ application/json :
6546+ schema :
6547+ $ref : " #/components/schemas/QueueJobStatusResponse"
6548+ " 400 " :
6549+ description : Invalid request
6550+ content :
6551+ application/json :
6552+ schema :
6553+ $ref : " #/components/schemas/QueueError"
6554+ " 401 " :
6555+ description : Unauthorized
6556+ content :
6557+ application/json :
6558+ schema :
6559+ $ref : " #/components/schemas/QueueError"
6560+ " 404 " :
6561+ description : Request not found
6562+ content :
6563+ application/json :
6564+ schema :
6565+ $ref : " #/components/schemas/QueueError"
6566+ " 500 " :
6567+ description : Internal server error
6568+ content :
6569+ application/json :
6570+ schema :
6571+ $ref : " #/components/schemas/QueueError"
6572+ summary : Get job status
6573+ tags :
6574+ - Queue
6575+ /queue/submit :
6576+ post :
6577+ description : Submit a new job to the queue. Returns a request ID that can be
6578+ used to check status.
6579+ requestBody :
6580+ content :
6581+ application/json :
6582+ schema :
6583+ $ref : " #/components/schemas/QueueJobRequest"
6584+ description : Job request
6585+ required : true
6586+ responses :
6587+ " 200 " :
6588+ description : Successfully queued request
6589+ content :
6590+ application/json :
6591+ schema :
6592+ $ref : " #/components/schemas/QueueJobResponse"
6593+ " 400 " :
6594+ description : Invalid request
6595+ content :
6596+ application/json :
6597+ schema :
6598+ $ref : " #/components/schemas/QueueError"
6599+ " 401 " :
6600+ description : Unauthorized
6601+ content :
6602+ application/json :
6603+ schema :
6604+ $ref : " #/components/schemas/QueueError"
6605+ " 500 " :
6606+ description : Internal server error
6607+ content :
6608+ application/json :
6609+ schema :
6610+ $ref : " #/components/schemas/QueueError"
6611+ summary : Submit a queued job
6612+ tags :
6613+ - Queue
6614+
64406615components :
64416616 securitySchemes :
64426617 bearerAuth :
@@ -11351,3 +11526,87 @@ components:
1135111526 type : string
1135211527 x-enum-varnames :
1135311528 - VolumeTypeReadOnly
11529+ QueueError :
11530+ properties :
11531+ code :
11532+ type : string
11533+ message :
11534+ type : string
11535+ param :
11536+ type : string
11537+ type :
11538+ type : string
11539+ type : object
11540+ QueueCancelRequest :
11541+ properties :
11542+ model :
11543+ type : string
11544+ request_id :
11545+ type : string
11546+ required :
11547+ - model
11548+ - request_id
11549+ type : object
11550+ QueueCancelResponse :
11551+ properties :
11552+ status :
11553+ type : string
11554+ type : object
11555+ QueueJobRequest :
11556+ properties :
11557+ info :
11558+ additionalProperties : true
11559+ type : object
11560+ model :
11561+ description : Required model identifier
11562+ type : string
11563+ payload :
11564+ additionalProperties : true
11565+ type : object
11566+ priority :
11567+ type : integer
11568+ required :
11569+ - model
11570+ - payload
11571+ type : object
11572+ QueueJobResponse :
11573+ properties :
11574+ error :
11575+ $ref : " #/components/schemas/QueueError"
11576+ requestId :
11577+ type : string
11578+ type : object
11579+ QueueJobStatusResponse :
11580+ properties :
11581+ claimed_at :
11582+ type : string
11583+ created_at :
11584+ type : string
11585+ done_at :
11586+ type : string
11587+ info :
11588+ additionalProperties : true
11589+ type : object
11590+ inputs :
11591+ additionalProperties : true
11592+ type : object
11593+ model :
11594+ type : string
11595+ outputs :
11596+ additionalProperties : true
11597+ type : object
11598+ priority :
11599+ description : Additional fields for test compatibility
11600+ type : integer
11601+ request_id :
11602+ type : string
11603+ retries :
11604+ type : integer
11605+ status :
11606+ description : this should be the enum, but isn't for backwards compatability
11607+ type : string
11608+ warnings :
11609+ items :
11610+ type : string
11611+ type : array
11612+ type : object
0 commit comments