API v1 preview

# Sync and reconcile models

Page through models and keep a local catalog current.

## Page through models

List models returns owned, non-deleted models ordered by updated_at then id, oldest first, by default. Use sort=-created_at for a newest-first library that does not reorder on inspection updates. Use models:read. Pages default to 20, up to 100. Follow next_cursor while has_more is true; keep the sort, limit and filters unchanged.

Every public list returns data, has_more and next_cursor. There is no total count; cursors do not support jumping to a page number.

List models

```
# cURL: fetch one page using a server-side key with models:read.
curl --fail-with-body --get "${API_BASE_URL%/}/api/v1/models" \
  --header "Authorization: Bearer $OTTOMFG_API_KEY" \
  --data-urlencode "limit=20"
# If has_more is true, repeat with --data-urlencode "cursor=$NEXT_CURSOR",
# setting NEXT_CURSOR to the response's next_cursor. Keep filters unchanged.
# Optional filters: --data-urlencode "external_id=design-123"
# or --data-urlencode "updated_since=2026-09-21T00:00:00Z".
# Pages are live; deduplicate by id and updated_at when syncing.
# Optional status filter, e.g. ready,action_required (OR). Omit status for full synchronization.
```

## Synchronize updates

external_id matches exactly. status accepts comma-separated values: processing, ready, action_required, failed. updated_since is an inclusive RFC 3339 timestamp; filters combine with AND.

For incremental sync, omit status, overlap the updated_since window, and deduplicate by id and updated_at. A status filter can miss a model that leaves the selected state.

## Reconcile deletions

updated_since never returns deleted models or tombstones. Reconcile cached IDs against every page of an unfiltered list at least daily. Confirm each missing ID with Get a model before removing it locally; pages can change during a scan. Repeat interrupted scans. A 404 means the model is unavailable to your account.

[List models reference](https://ottomfg.com/docs/list-models.md)

API v1 preview

Source: https://ottomfg.com/docs/sync
