@@ -6836,8 +6836,12 @@ paths:
68366836
68376837 /queue/cancel :
68386838 post :
6839- description : Cancel a pending or running job. Returns the job status after the
6840- cancellation attempt.
6839+ description : |
6840+ Cancel a pending job. Only jobs in pending status can be canceled.
6841+ Running jobs cannot be stopped. Returns the job status after the
6842+ attempt. If the job is not pending, returns 409 with the current status
6843+ unchanged.
6844+ operationId : cancelQueueJob
68416845 requestBody :
68426846 content :
68436847 application/json :
@@ -6881,8 +6885,8 @@ paths:
68816885 - Queue
68826886 /queue/metrics :
68836887 get :
6884- description : Get the current queue statistics including pending and running job
6885- counts.
6888+ description : Get the current queue statistics for a model, including pending and running job counts.
6889+ operationId : getQueueMetrics
68866890 parameters :
68876891 - description : Model name to get metrics for
68886892 in : query
@@ -6896,8 +6900,7 @@ paths:
68966900 content :
68976901 application/json :
68986902 schema :
6899- additionalProperties : true
6900- type : object
6903+ $ref : " #/components/schemas/QueueMetricsResponse"
69016904 " 400 " :
69026905 description : Invalid request
69036906 content :
@@ -6921,15 +6924,16 @@ paths:
69216924 - Queue
69226925 /queue/status :
69236926 get :
6924- description : Check the status of a job using request_id and model query parameters.
6927+ description : Poll the current status of a previously submitted job. Provide the request_id and model as query parameters.
6928+ operationId : getQueueJobStatus
69256929 parameters :
6926- - description : Request ID
6930+ - description : Request ID returned from the submit endpoint
69276931 in : query
69286932 name : request_id
69296933 required : true
69306934 schema :
69316935 type : string
6932- - description : Model name
6936+ - description : Model name the job was submitted to
69336937 in : query
69346938 name : model
69356939 required : true
@@ -6971,8 +6975,12 @@ paths:
69716975 - Queue
69726976 /queue/submit :
69736977 post :
6974- description : Submit a new job to the queue. Returns a request ID that can be
6975- used to check status.
6978+ description : |
6979+ Submit a new job to the queue for asynchronous processing. Jobs are
6980+ processed in strict priority order (higher priority first, FIFO within
6981+ the same priority). Returns a request ID that can be used to poll status
6982+ or cancel the job.
6983+ operationId : submitQueueJob
69766984 requestBody :
69776985 content :
69786986 application/json :
@@ -12398,41 +12406,84 @@ components:
1239812406 QueueError :
1239912407 properties :
1240012408 code :
12409+ description : Machine-readable error code
1240112410 type : string
1240212411 message :
12412+ description : Human-readable error message
1240312413 type : string
1240412414 param :
12415+ description : The parameter that caused the error, if applicable
1240512416 type : string
1240612417 type :
12418+ description : Error category (e.g. "invalid_request_error", "not_found_error")
1240712419 type : string
1240812420 type : object
12421+ QueueMetricsResponse :
12422+ type : object
12423+ required :
12424+ - messages_running
12425+ - messages_waiting
12426+ - total_jobs
12427+ properties :
12428+ messages_running :
12429+ description : Number of jobs currently being processed
12430+ type : integer
12431+ messages_waiting :
12432+ description : Number of jobs waiting to be claimed by a worker
12433+ type : integer
12434+ total_jobs :
12435+ description : Total number of active jobs (waiting + running)
12436+ type : integer
1240912437 QueueCancelRequest :
1241012438 properties :
1241112439 model :
12440+ description : Model identifier the job was submitted to
1241212441 type : string
1241312442 request_id :
12443+ description : The request ID returned from the submit endpoint
1241412444 type : string
1241512445 required :
1241612446 - model
1241712447 - request_id
1241812448 type : object
1241912449 QueueCancelResponse :
12450+ type : object
12451+ required :
12452+ - status
1242012453 properties :
1242112454 status :
12455+ description : |
12456+ Job status after the cancel attempt. Only pending jobs can be
12457+ canceled. If the job is already running, done, or failed, the status
12458+ is returned unchanged.
1242212459 type : string
12423- type : object
12460+ enum :
12461+ - canceled
12462+ - running
12463+ - done
12464+ - failed
1242412465 QueueJobRequest :
1242512466 properties :
1242612467 info :
12468+ description : |
12469+ Arbitrary JSON metadata stored with the job and returned in status
12470+ responses. The model and system may add or update keys during
12471+ processing.
1242712472 additionalProperties : true
1242812473 type : object
1242912474 model :
1243012475 description : Required model identifier
1243112476 type : string
1243212477 payload :
12478+ description : Freeform model input. Passed unchanged to the model. Contents are model-specific.
1243312479 additionalProperties : true
1243412480 type : object
1243512481 priority :
12482+ default : 0
12483+ description : |
12484+ Job priority. Higher values are processed first (strict priority
12485+ ordering). Jobs with equal priority are processed in submission
12486+ order (FIFO).
1243612487 type : integer
1243712488 required :
1243812489 - model
@@ -12443,38 +12494,71 @@ components:
1244312494 error :
1244412495 $ref : " #/components/schemas/QueueError"
1244512496 requestId :
12497+ description : Unique identifier for the submitted job. Use this to poll status or cancel.
1244612498 type : string
1244712499 type : object
1244812500 QueueJobStatusResponse :
12501+ required :
12502+ - request_id
12503+ - model
12504+ - status
1244912505 properties :
1245012506 claimed_at :
12507+ description : Timestamp when a worker claimed the job
12508+ format : date-time
1245112509 type : string
1245212510 created_at :
12511+ description : Timestamp when the job was created
12512+ format : date-time
1245312513 type : string
1245412514 done_at :
12515+ description : Timestamp when the job completed (done or failed)
12516+ format : date-time
1245512517 type : string
1245612518 info :
12519+ description : |
12520+ Job metadata. Contains keys from the submit request, plus any
12521+ modifications from the model or system (e.g. progress, retry
12522+ history).
1245712523 additionalProperties : true
1245812524 type : object
1245912525 inputs :
12526+ description : Freeform model input, as submitted
1246012527 additionalProperties : true
1246112528 type : object
1246212529 model :
12530+ description : Model identifier the job was submitted to
1246312531 type : string
1246412532 outputs :
12533+ description : Freeform model output, populated when the job reaches done status. Contents are model-specific.
1246512534 additionalProperties : true
1246612535 type : object
1246712536 priority :
12468- description : Additional fields for test compatibility
12537+ description : Job priority. Higher values are processed first.
1246912538 type : integer
1247012539 request_id :
12540+ description : The request ID that was returned from the submit endpoint
1247112541 type : string
1247212542 retries :
12543+ description : |
12544+ Number of times this job has been retried. Workers set a claim
12545+ timeout and must send periodic status updates to keep the job alive.
12546+ If no update is received within the timeout, the job is returned to
12547+ the queue and retried. After 3 retries the job is permanently
12548+ failed. Jobs explicitly failed by the model are not retried.
1247312549 type : integer
1247412550 status :
12475- description : this should be the enum, but isn't for backwards compatability
12551+ description : |
12552+ Current job status. Transitions: pending → running → done/failed. A pending job may also be canceled.
12553+ enum :
12554+ - pending
12555+ - running
12556+ - done
12557+ - failed
12558+ - canceled
1247612559 type : string
1247712560 warnings :
12561+ description : Non-fatal messages about the request (e.g. deprecation notices)
1247812562 items :
1247912563 type : string
1248012564 type : array
0 commit comments