Bento Sync API

Retrieve your saves, collections, saved pools and followed tags from Bento Sync. This page describes the endpoints and the JSON data returned by the server.

Base URL: https://api.bentoapp.net

DataEndpoint
SavesGET /api/collections/saves/records
CollectionsGET /api/collections/post_collections/records
PoolsGET /api/collections/saved_pools/records
FollowsGET /api/collections/tag_follows/records

Examples use synthetic data. Server validation and access rules apply.

Authentication

Sign in with your Bento account. Use your username or email as identity and your password as password. A booru API key does not authenticate you with Bento.

POST/api/bento/auth-with-identity
curl --request POST 'https://api.bentoapp.net/api/bento/auth-with-identity' \
  --header 'Content-Type: application/json' \
  --data '{"identity":"YOUR_USERNAME","password":"YOUR_PASSWORD"}'
{
  "token": "<session-token>",
  "record": {
    "id": "exampleuser0001",
    "handle": "demo",
    "verified": true
  }
}

The response includes token and your account profile in record; the example is shortened. Send the token as Authorization: <session-token>, without an additional Bearer prefix. Use record.id as your account ID in owner filters.

Refresh a valid session with POST /api/collections/users/auth-refresh. Sign in again after HTTP 401. Treat tokens like passwords; keep them out of URLs and shared scripts.

Saves

Saved posts with metadata, tags and media URLs. The API does not return downloaded image or video files.

GET/api/collections/saves/records
curl --get 'https://api.bentoapp.net/api/collections/saves/records' \
  --header 'Authorization: YOUR_SESSION_TOKEN' \
  --data-urlencode 'filter=user = "YOUR_USER_ID"' \
  --data-urlencode 'page=1' --data-urlencode 'perPage=100'

Shortened example response:

{
  "page": 1,
  "perPage": 100,
  "totalItems": 1,
  "totalPages": 1,
  "items": [
    {
      "id": "example00000001",
      "user": "exampleuser0001",
      "post_key": "example.org#123",
      "host": "example.org",
      "post_id": "123",
      "rating": "s",
      "tags": [
        "landscape"
      ],
      "payload": {
        "id": 123
      },
      "thumb_url": "https://example.org/thumb/123.jpg",
      "file_url": "https://example.org/files/123.jpg"
    }
  ]
}

post_key identifies a post as host#post_id. payload is a JSON object containing the saved post data. rating can be s, q, e, i or n.

Collections

Your personal collections, including names and ordered post keys. Shared encrypted collections use separate endpoints.

GET/api/collections/post_collections/records
curl --get 'https://api.bentoapp.net/api/collections/post_collections/records' \
  --header 'Authorization: YOUR_SESSION_TOKEN' \
  --data-urlencode 'filter=user = "YOUR_USER_ID"' \
  --data-urlencode 'page=1' --data-urlencode 'perPage=100'

Shortened example response:

{
  "page": 1,
  "perPage": 100,
  "totalItems": 1,
  "totalPages": 1,
  "items": [
    {
      "id": "example00000003",
      "user": "exampleuser0001",
      "client_id": "<collection-client-id>",
      "name": "Landscapes",
      "keys": [
        "example.org#123"
      ],
      "made_at": "2026-10-01 12:00:00.000Z",
      "sort": 0
    }
  ]
}

keys contains the collection’s saves as ordered post_key values. Fetch the corresponding post data from saves. client_id is the local collection ID; id is the server record ID.

Pools

Your saved pools, including descriptions, post counts, seen state and the stored pool JSON.

GET/api/collections/saved_pools/records
curl --get 'https://api.bentoapp.net/api/collections/saved_pools/records' \
  --header 'Authorization: YOUR_SESSION_TOKEN' \
  --data-urlencode 'filter=user = "YOUR_USER_ID"' \
  --data-urlencode 'page=1' --data-urlencode 'perPage=100'

Shortened example response:

{
  "page": 1,
  "perPage": 100,
  "totalItems": 1,
  "totalPages": 1,
  "items": [
    {
      "id": "example00000004",
      "user": "exampleuser0001",
      "pool_key": "example.org#7",
      "host": "example.org",
      "pool_id": 7,
      "server_type": "danbooru",
      "name": "Landscape series",
      "description": "A saved pool",
      "post_count": 2,
      "payload": {
        "id": 7,
        "post_ids": [
          123,
          124
        ]
      },
      "seen_at": "2026-10-05 00:00:00.000Z"
    }
  ]
}

pool_key is host#pool_id. payload contains the source booru’s pool JSON, whose fields depend on the source. Post files are fetched from that booru. Separately, POST /api/bento/pools reads the server’s pool cache for one of your booru accounts. It requires background checks; ready=false means the cache is not ready or is stale.

Follows

Your followed tags and their source scope.

GET/api/collections/tag_follows/records
curl --get 'https://api.bentoapp.net/api/collections/tag_follows/records' \
  --header 'Authorization: YOUR_SESSION_TOKEN' \
  --data-urlencode 'filter=user = "YOUR_USER_ID"' \
  --data-urlencode 'page=1' --data-urlencode 'perPage=100'

Shortened example response:

{
  "page": 1,
  "perPage": 100,
  "totalItems": 1,
  "totalPages": 1,
  "items": [
    {
      "id": "example00000005",
      "user": "exampleuser0001",
      "tag": "landscape",
      "scope": ""
    }
  ]
}

tag is the followed tag. scope is a host, or empty for all sources. This list contains tags, not posts. Read the server’s following-feed post metadata from GET /api/collections/following_snapshots/records. These temporary snapshots contain payload in the source booru’s JSON format and fetched_at as the fetch time. The server updates them when background checks are enabled.

Retrieve all records

Lists return page, perPage, totalItems, totalPages and items. Increase page until you reach totalPages. One response may not contain your entire library.

Always filter personal lists by user = "<account-id>". Ordinary lists may include other users’ data depending on profile sharing. The explorer applies this filter automatically. sort is optional, for example -updated for recently changed records. Access rules can also produce empty items.

JavaScript example for all four lists
async function listOwn(collection, token, accountID) {
  const items = [];
  for (let page = 1; ; page++) {
    const query = new URLSearchParams({
      page: String(page), perPage: '100',
      filter: `user = "${accountID}"`
    });
    const response = await fetch(
      `https://api.bentoapp.net/api/collections/${collection}/records?${query}`,
      { headers: { Authorization: token } }
    );
    const result = await response.json();
    if (!response.ok) throw new Error(result.message || `HTTP ${response.status}`);
    items.push(...result.items);
    if (page >= result.totalPages) return items;
  }
}
const token = 'YOUR_SESSION_TOKEN';
const accountID = 'YOUR_USER_ID';
const saves = await listOwn('saves', token, accountID);
const collections = await listOwn('post_collections', token, accountID);
const pools = await listOwn('saved_pools', token, accountID);
const follows = await listOwn('tag_follows', token, accountID);

API explorer

The default request lists your saves. Choose another collection to read collections, pools or follows. Examples require no login; a live request starts only when you click “Send request”.

API explorerNot signed in
Sign in to Bento

Sign-in requests go directly to api.bentoapp.net. The session stays in memory only until this page is closed or reloaded.

Use an existing token

Request

Example · no request sent

Tokens and booru credentials are hidden in the response. Code examples use placeholders. Sessions and response data are not persisted.

Other API functions

Other endpoints and write requests

Beyond the four library lists, the server provides record access, change queries and batches. Write permissions and required fields depend on the collection.

POST /api/batch

General record batches follow normal collection rules. The current Bento app sends at most 50 operations per packet, with at least 200 ms between packet starts.

{
  "requests": [
    {
      "method": "POST",
      "url": "/api/collections/tag_follows/records",
      "body": {
        "user": "YOUR_USER_ID",
        "tag": "landscape",
        "scope": ""
      }
    }
  ]
}

Response: an array of {status, body} per operation. Inspect errors before retrying.

Incremental device sync

GET /api/bento/sync-manifest returns opaque domain tokens for comparison. Start the change stream with GET /api/bento/sync-changes/{collection}?after=0. Keep a separate cursor for each account and collection.

When hasMore=true, send the returned cursor as after and keep the same until boundary. Omit until for the next refresh. Insert or replace records; remove local copies when deleted=true. Persist changes and cursors together. The journal returns current record state, not a historical snapshot.

{
  "version": 1,
  "cursor": 43,
  "until": 43,
  "hasMore": false,
  "changes": [
    {
      "seq": 43,
      "id": "example00000001",
      "key": "example.org#123",
      "deleted": true,
      "record": null
    }
  ]
}

After 409, reset the cursor and build a complete replacement mirror before applying it. Older servers returning 404/501 may require fully paginated, owner-filtered lists instead. Other errors are not a reason to fall back to a full sync.

Other data types and encryption
CollectionContents

Booru credentials are encrypted at rest but returned in readable form to their owner. Personal library metadata is not end-to-end encrypted. Messages and shared collections use a separate E2EE protocol. Post downloads and image caches stay on the device; upload drafts can include media.

Errors and limits

HTTPMeaning and action
400Invalid login, parameters or fields. Check validation errors.
401Session is invalid or expired. Sign in again.
403 / 404Access denied, or record/endpoint unavailable. Access rules can hide other users’ data as 404.
409For change queries: cursor is outside the journal. Rebuild the local mirror.
413Request too large. Split saves batches into smaller packets; maximum 4 MiB.
429Observe Retry-After as seconds or an HTTP date. Keep pending changes and retry with increasing delays.
5xxServer error. Retry later. Some endpoints may be absent from older deployments.
{
  "status": 400,
  "message": "Invalid cursor",
  "data": {}
}

This is a typical PocketBase error envelope. Bento endpoints may return other fields, such as errorKey for a rejected saves batch. The entire saves batch is then rolled back. HTTP 204 has no response body.

Browser clients need CORS permission for their origin, HTTP methods and the Authorization header. For network or CORS failures, the explorer cannot display a confirmed server response.