---
title: "Upsert an AI cache result"
method: PUT
path: "/reader/books/{book_id}/ai/cache"
tags: ["AI"]
---

# Upsert an AI cache result

`PUT /reader/books/{book_id}/ai/cache`

Create or update an AI cache entry (client → server sync)

## Path parameters

- `book_id` string, required

## Request body

- SchemaAiResult
  - `book_id` string
  - `cache_key` string
  - `content` string
  - `ctime` integer
  - `id` integer
  - `result_type` string
  - `user_id` integer
  - `utime` integer

## Response `200`

OK

- SchemaAiResult
  - `book_id` string
  - `cache_key` string
  - `content` string
  - `ctime` integer
  - `id` integer
  - `result_type` string
  - `user_id` integer
  - `utime` integer

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/lxpio/apis/omnigram-api.md) · [All operations](https://skmtc.net/lxpio/apis/omnigram-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lxpio/omnigram-api/versions/58911ffb3093/schema)
