---
title: "儲存用戶偏好設定"
method: PUT
path: "/api/v1/public/preferences"
tags: ["public-api"]
---

# 儲存用戶偏好設定

`PUT /api/v1/public/preferences`

## Request

- Base URL: `https://api.slidemaster.tw` (the document declares no server; this is the origin it was published from)
- URL: `https://api.slidemaster.tw/api/v1/public/preferences`
- Auth: none declared

儲存或更新用戶偏好。僅傳入需更新的欄位，未傳入的欄位不受影響。
    Agent 在偵測到用戶偏好（如指定風格、語音、語言）時應自動呼叫此 API。

    可設定的偏好：
    - style: 簡報風格 (professional / playful / minimalist)
    - tts_provider: 語音供應商 (gemini / cosyvoice / azure)
    - tts_voice: 語音名稱
    - language: 語言 (zh-TW / zh-CN / en / ja)
    - image_size: 圖片解析度 (1K / 2K / 4K)
    - slides_count: 預設投影片數量

## Headers

- `Authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- PublicPreferencesUpdateRequest
  - `style` 'professional' | 'playful' | 'minimalist', nullable
  - `tts_provider` 'gemini' | 'cosyvoice' | 'azure', nullable
  - `tts_voice` string, nullable
  - `language` 'zh-TW' | 'zh-CN' | 'en' | 'ja', nullable
  - `image_size` '1K' | '2K' | '4K', nullable
  - `slides_count` integer, nullable

## Response `200`

Successful Response

- PublicPreferencesResponse
  - `style` string, nullable
  - `tts_provider` string, nullable
  - `tts_voice` string, nullable
  - `language` string, nullable
  - `image_size` string, nullable
  - `slides_count` integer, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api.md) · [All operations](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api/revisions/a964c005977e?raw)
