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

# Database

> All Images AI local sync: searchable entities, `.search()` filters, and operators.

The All Images AI plugin syncs data locally. Use `corsair.allimagesai.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Downloaded Images

Path: `allimagesai.db.downloadedImages.search`

```ts theme={null}
const rows = await corsair.allimagesai.db.downloadedImages.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field             | Type     | Operators                                  |
| ----------------- | -------- | ------------------------------------------ |
| `entity_id`       | `string` | equals, contains, startsWith, endsWith, in |
| `id`              | `string` | equals, contains, startsWith, endsWith, in |
| `url`             | `string` | equals, contains, startsWith, endsWith, in |
| `url_full`        | `string` | equals, contains, startsWith, endsWith, in |
| `url_upscale`     | `string` | equals, contains, startsWith, endsWith, in |
| `url_upscale_uhd` | `string` | equals, contains, startsWith, endsWith, in |
| `downloaded_at`   | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Image Generations

Path: `allimagesai.db.imageGenerations.search`

```ts theme={null}
const rows = await corsair.allimagesai.db.imageGenerations.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field          | Type     | Operators                                  |
| -------------- | -------- | ------------------------------------------ |
| `entity_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `id`           | `string` | equals, contains, startsWith, endsWith, in |
| `name`         | `string` | equals, contains, startsWith, endsWith, in |
| `prompt`       | `string` | equals, contains, startsWith, endsWith, in |
| `status`       | `number` | equals, gt, gte, lt, lte, in               |
| `process_mode` | `string` | equals, contains, startsWith, endsWith, in |
| `nb_images`    | `number` | equals, gt, gte, lt, lte, in               |
| `created_at`   | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Webhooks

Path: `allimagesai.db.webhooks.search`

```ts theme={null}
const rows = await corsair.allimagesai.db.webhooks.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `id`         | `string` | equals, contains, startsWith, endsWith, in |
| `url`        | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
