List jobs
Code Mode: praxis.media.libraries.jobs.list
HTTP: GET /media/v1/libraries/{library_id}/jobs
List the batch and generation jobs of a library, newest first, to find a job whose id you lost or to watch several takes at once. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Each entry is the same Job that GET /media/v1/libraries/{library_id}/jobs/{job_id} returns, with outputs, failures and usage.
Signature
praxis.media.libraries.jobs.list(args:{path:{library_id:string};query?:{status?:"queued"|"in_progress"|"running"|"completed"|"completed_with_errors"|"failed"|"cancelled"|"canceled";pipeline_run_id?:string;limit?:number;cursor?:string}}):Promise<{/** Jobs returned in this page. */ data:Array<{/** Job identifier: job_ followed by 32 lowercase hexadecimal characters. pattern: ^job_[0-9a-f]{32}$ e.g. "job_b562f087623c4756b43813e3dce670ba" */ id:string;/** Identifier of the library the job runs in; the produced assets land here. */ library_id:string;/** Batch operation: tag adds labels, untag removes labels, set_context replaces custom metadata, move changes asset_folder, and delete removes selected assets. */ action:"tag"|"untag"|"set_context"|"move"|"delete"|"reprocess"|"generate";/** Where the job is. */ status:"queued"|"in_progress"|"running"|"completed"|"completed_with_errors"|"failed"|"cancelled"|"canceled";/** Category of media this job produces. */ type?:"image"|"video"|"speech"|"music"|"sound_effect"|"voice";/** The operation this job performs: generate for a plain text-to-image or text-to-video job, or the edit operation an image edit applied to its source asset. */ operation?:"generate"|"clone"|"tag"|"untag"|"set_context"|"move"|"delete"|"reprocess"|"variations"|"upscale"|"outpaint"|"inpaint"|"erase"|"replace_object"|"recolor"|"remove_background"|"replace_background"|"to_video"|"extend"|"edit"|"lip_sync"|"frame"|"to_gif"|"voice_change"|"resynthesize";/** Asset this job edits, present on an image edit job and omitted on generation jobs. */ source_asset_id?:string;/** Fraction of this job already processed, from 0 to 1. */ progress?:number;/** Why a queued generation job has not started yet. */ queue_reason?:"concurrency"|"provider_throttled"|"provider_queue";/** Present while the job waits for a slot (queue_reason concurrency): its place in line among the waiting jobs of its type in this library, 1 for the next to start */ queue_position?:number;/** Generation job: number of outputs requested (images or videos; text segments for speech). */ total:number;/** Number of outputs or items successfully processed; failed ones are counted separately. */ done:number;/** Number of outputs or items that could not be produced or processed. */ failed:number;/** Always present, including an empty array before any item failure or when all items succeed. */ failures:Array<{/** Identifier supplied for the failed item; it may identify a missing asset. */ asset_id?:string;/** Zero-based output index for a failed video-generation item. */ index?:number;/** Domain error code explaining the individual item failure. */ code:"LIBRARY_NOT_FOUND"|"ASSET_NOT_FOUND"|"WORK_NOT_FOUND"|"REVISION_CONFLICT"|"JOB_NOT_FOUND"|"UNDERSTANDING_NOT_FOUND"|"ASSET_VERSION_CHANGED"|"LIBRARY_INVALID_STATE"|"INVALID_PARAMS"|"INVALID_EXPRESSION"|"UNSUPPORTED"|"NOT_IMPLEMENTED"|"FILE_TOO_LARGE"|"FILE_EMPTY"|"FILE_NOT_READY"|"UNSUPPORTED_MEDIA"|"FETCH_FAILED"|"LIMIT_EXCEEDED"|"CHUNK_INVALID"|"RATE_LIMITED"|"CAPACITY"|"UPSTREAM_FAILED"|"CONTENT_REJECTED"|"GENERATION_FAILED"|"BINDING_READ_ONLY"|"OPERATION_NOT_SUPPORTED"|"MODEL_PENDING"|"REFERENCE_TYPE_MISMATCH"|"CONSENT_REQUIRED"|"LIBRARY_IS_DEFAULT"|"JOB_INVALID_STATE"|"VOICE_TRAINING"|"INSUFFICIENT_BALANCE";/** The upstream model service’s finer reason for this failure, such as MODEL_PROTOCOL_LINE_UNAVAILABLE or VOICE_SAMPLE_REJECTED. */ detail_code?:string;/** Request id of the model call that failed, the same id shown in the model request log, so the failure can be traced there. */ model_request_id?:string;/** The model service’s own words for this failure, for a person to read, for example why moderation refused an input. */ message?:string}>;/** Generation intent recorded on the earliest video jobs; newer generation jobs describe themselves with type and operation instead. */ intent?:string;/** Model that produced the outputs of a generation job; omitted for batch jobs. */ model?:string;/** The performance tier that actually served this job’s model, present only when the request named a tier instead of a model. */ tier?:"economy"|"balanced"|"quality";/** Per-output results of a generation job, in index order: one entry per requested image or video, and one per text segment for speech. */ outputs?:Array<{/** Zero-based position of this output in the requested count. */ index:number;/** State of this requested output. */ status:"pending"|"succeeded"|"failed";/** Short-lived signed URL for previewing this output; read the Job again to obtain a fresh URL. */ preview_url?:string;/** Seed for this output, when the model returned one; it may be absent. */ seed?:number|null;/** Present only on a job written before ADR-094 §2, when outputs were candidates with a retention window. */ expires_at?:string;/** Library asset identifier for this output once the library has stored it. */ asset_id?:string;/** Console page that shows this output in the media library, present once asset_id is. */ viewer_url?:string}>;/** What this job has been charged, as US dollars in a decimal string with six decimals, for example 0.042300. */ usage?:{/** US dollars as a decimal string with six decimals, for example 0.042300; never a floating-point number. */ amount:string;/** Currency code for amount; USD. */ currency:string};/** Time the job was created, in UTC. */ created_at:string;/** Time the job reached a terminal status, or null while queued or running. */ finished_at:string|null;/** Automation run (its root run) that started this job. */ pipeline_run_id?:string;/** Generation jobs only: the elements the job’s request expanded, each with the version read when the job was created; absent when none were. */ elements?:Array<{/** Element asset the generation expanded, in the same library as the output. */ asset_id:string;/** Element version read when the job was created. */ version:number;/** Kind of element. */ material_type:"character"|"product"|"scene"|"brand"}>;/** Present on a completed align job: how the two recordings line up, with offset_seconds and confidence. */ result?:{/** How many seconds later the reference asset starts, relative to the source asset the route named; positive means the reference comes later, so a caller holding b */ offset_seconds:number;/** How sure the alignment is, from 0 to 1; a low value means the two recordings share little to correlate. */ confidence:number}}>;/** Cursor for the next page, or null when there are no more jobs. */ next_cursor:string|null}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| library_id | path | string | yes | Library ID returned by creation. |
| status | query | “queued” | “in_progress” | “running” | “completed” | “completed_with_errors” | “failed” | “cancelled” | “canceled” | no | Filter jobs by their current status. |
| pipeline_run_id | query | string | no | Return only the jobs started by this automation run (its root run), so one pipeline run reads as one batch. |
| limit | query | number | no | Maximum entries in this page, from 1 through 100; defaults to 100. |
| cursor | query | string | no | Job id from the previous page’s next_cursor; omit for the first page. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | Successful response. |
| 400 | application/json | A selector, cursor, limit or other parameter is invalid; correct the reported field before retrying. |
| 402 | application/json | Request failed; see the error code reference. |
| 403 | application/json | This credential has read-only access to the library; use a write-capable binding for mutations. |
| 404 | application/json | The library or asset is missing, deleted or belongs to another tenant; verify its identifier and owner. |
| 409 | application/json | Request failed; see the error code reference. |
| 413 | application/json | The file exceeds an input limit; provide a smaller source file. |
| 415 | application/json | This media format is unsupported; provide a supported format. |
| 422 | application/json | Request failed; see the error code reference. |
| 429 | application/json | A rate limit was reached; wait before retrying. |
| 501 | application/json | The requested operation is unsupported; choose a supported method. |
| 502 | application/json | Request failed; see the error code reference. |
| 503 | application/json | Historical projections are still being initialized, or library storage is temporarily unavailable; retry shortly and check failureSummary counts_complete. |