> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnifence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List jobs

> Retrieve a paginated, filterable list of moderation jobs for your account.

<Note>
  Requires the `job:read` scope. Requests without this scope receive a `403 FORBIDDEN` response. See
  [authentication](/authentication#scopes).
</Note>

Jobs are returned newest-first (`created_at` descending) and scoped to your account. Use `limit`
(max 100) and `offset` to page through results; `total` in the response is the unpaginated count.

## Filters

| Parameter  | Description                                                             |
| ---------- | ----------------------------------------------------------------------- |
| `type`     | Job modality — `prompt`, `image`, or `video` (`pre`/`post` are legacy). |
| `decision` | Moderation outcome — `pass` or `reject`.                                |
| `status`   | Job status — see below.                                                 |
| `search`   | Prefix-match on `job_id`.                                               |
| `from`     | Inclusive lower bound on `created_at` (ISO 8601).                       |
| `to`       | Exclusive upper bound on `created_at` (ISO 8601).                       |

## Status filter

`status` accepts a comma-separated list of one or more job statuses:

| Status       | Meaning                                         |
| ------------ | ----------------------------------------------- |
| `queued`     | Accepted, waiting for a worker.                 |
| `processing` | Running through the moderation pipeline.        |
| `completed`  | Finished — see `is_prohibited` for the outcome. |
| `failed`     | Terminated with an error before a decision.     |

`queued` and `processing` are the in-flight states; `completed` and `failed` are terminal. To list
every job still in flight, request both:

```
GET /api/v1/jobs?status=queued,processing
```

An unknown status value returns `400 INVALID_REQUEST`.

## Polling for completion

Webhooks are the primary, low-latency way to learn that a job finished — register one when you
submit, or via [register webhook](/api-reference/endpoint/register-webhook). Webhook delivery is
best-effort, so use this endpoint as a cheap **reconciliation** safety net rather than your primary
signal:

* Poll `GET /api/v1/jobs?status=queued,processing` on an interval. One request covers every
  outstanding job, regardless of how many you have in flight — far cheaper than polling each job
  individually with [get job status](/api-reference/endpoint/get-job).
* A job that drops out of the in-flight list has reached a terminal state. Fetch the terminal set
  (`status=completed,failed`, optionally narrowed with `from`) to pick up any outcome whose webhook
  was missed.
* Keep the interval modest — every request counts toward your rate limit. Webhooks carry the fast
  path; reconciliation only needs to catch stragglers.

## Example

```bash theme={null}
curl -G "https://api.omnifence.ai/api/v1/jobs" \
  -H "Authorization: Bearer $API_KEY" \
  --data-urlencode "status=queued,processing" \
  --data-urlencode "limit=100"
```


## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/jobs
openapi: 3.1.0
info:
  title: Omnifence API
  description: >-
    Content moderation API. Clients submit images or videos which pass through a
    classification pipeline and receive a pass/reject decision.
  version: 1.0.0
  contact:
    email: support@omnifence.ai
servers:
  - url: http://localhost:3051
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: System
    description: Health and diagnostics
  - name: Moderation
    description: Submit moderation jobs
  - name: Jobs
    description: Query job status and progress
  - name: Usage
    description: Billing and usage data
  - name: Webhooks
    description: Webhook registration
  - name: Account
    description: Authenticated client account settings
  - name: Billing
    description: Customer-facing billing balance and ledger
  - name: Admin
    description: Platform administration (requires admin:config scope)
paths:
  /api/v1/jobs:
    get:
      tags:
        - Jobs
      summary: List jobs
      description: >-
        Retrieve a paginated list of moderation jobs scoped to your client
        account.
      operationId: listJobs
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
        - schema:
            type: string
            enum:
              - pre
              - post
              - prompt
              - chat
              - image
              - video
              - generate
          in: query
          name: type
          required: false
          description: >-
            Filter by job modality. `prompt`, `chat`, `image`, `video` are the
            active moderation modalities; `generate` is a generation job;
            `pre`/`post` are legacy types kept for historical jobs.
        - schema:
            type: string
            enum:
              - pass
              - reject
          in: query
          name: decision
          required: false
          description: Filter by moderation decision.
        - schema:
            type: string
          in: query
          name: status
          required: false
          description: >-
            Filter by job status. Comma-separated list of: queued, processing,
            completed, failed. Example: `status=queued,processing` returns all
            in-flight jobs — useful for low-cost reconciliation polling
            alongside webhooks.
        - schema:
            type: string
            maxLength: 64
          in: query
          name: search
          required: false
          description: Prefix-match filter on job_id.
        - schema:
            type: string
            format: date-time
          in: query
          name: from
          required: false
          description: Inclusive lower bound on job created_at (ISO 8601).
        - schema:
            type: string
            format: date-time
          in: query
          name: to
          required: false
          description: Exclusive upper bound on job created_at (ISO 8601).
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobs:
                    type: array
                    items:
                      type: object
                      properties:
                        is_prohibited:
                          type:
                            - 'null'
                            - boolean
                        job_id:
                          type: string
                          format: uuid
                        type:
                          type: string
                          enum:
                            - pre
                            - post
                            - prompt
                            - chat
                            - image
                            - video
                            - generate
                        status:
                          type: string
                          enum:
                            - queued
                            - processing
                            - completed
                            - failed
                        created_at:
                          type: string
                          format: date-time
                        completed_at:
                          type:
                            - 'null'
                            - string
                          format: date-time
                      required:
                        - job_id
                        - type
                        - status
                        - is_prohibited
                        - created_at
                        - completed_at
                  total:
                    type: integer
                  limit:
                    type: integer
                  offset:
                    type: integer
                required:
                  - jobs
                  - total
                  - limit
                  - offset
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from the Omnifence dashboard

````