---
title: "Serving"
description: "Documents and images in one application file. Insert, search, delete over HTTP."
pattern: "serving"
url: "https://pixeltable.com/recipes/serving"
---

# Serving

Documents and images in one application file. Insert, search, delete over HTTP.

- **Pattern:** serving
- **Cloud deploy:** yes
- **Scaffold:** `uvx pixeltable-new myapp`

## Tables

### documents

| Column | Type |
| --- | --- |
| title | String |
| body | String |
| source_id | String |

### images

| Column | Type |
| --- | --- |
| image | Image |
| label | String |

## Routes

- `INSERT /api/ingest/document` (table: documents)
- `INSERT /api/ingest/image` (table: images)
- `QUERY /api/search`

## Sample calls

### Insert a document

```sh
curl -X POST "$PIXELTABLE_API_URL/api/ingest/document" -H "Authorization: Bearer $PIXELTABLE_API_KEY" -H "Content-Type: application/json" -d '{"title": "readme", "body": "Pixeltable is declarative multimodal data infrastructure.", "source_id": "api-001"}'
```

Source: https://github.com/pixeltable/pixeltable-starter-kit/blob/main/serving
