---
title: "テンプレートの見た目を直す（自分のものだけ）"
method: PATCH
path: "/api/v1/agent/templates/{templateId}/style"
tags: ["agent"]
---

# テンプレートの見た目を直す（自分のものだけ）

`PATCH /api/v1/agent/templates/{templateId}/style`

## Request

- Base URL: `https://app.yukkurigen.com`
- URL: `https://app.yukkurigen.com/api/v1/agent/templates/{templateId}/style`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Path parameters

- `templateId` string, required

## Request body

- object
  - `name` string
  - `subtitle` object
    - `look` 'bold' | 'box' | 'box-outline' | 'box-speaker-outline' | 'frame', nullable: bold=白の太字に話者の色の太フチ・箱なし（color・fontWeight・outline・backgroundColor・lineHeight は効かない）/ box=箱に文字（フチなし）/ box-outline=箱＋outlineColor のフチ / box-speaker-outline=箱＋話者の色のフチ / frame=白い箱に黒い文字。null でプロジェクトの既定に戻す。yukkuri-talk・tohoku-ahiru-talk を元にしたものだけ
    - `fontSize` integer, nullable: null で既定に戻す
    - `color` string: #rrggbb・#rrggbbaa・rgb(r,g,b)・rgba(r,g,b,a)
    - `fontWeight` 400 | 700 | 900
    - `outlineColor` string: #rrggbb・#rrggbbaa・rgb(r,g,b)・rgba(r,g,b,a)
    - `outlineWidth` number
    - `backgroundColor` string, nullable: null で話者の色の半透明
    - `backgroundPadding` number
    - `backgroundBorderRadius` number
    - `textAlign` 'left' | 'center' | 'right'
    - `letterSpacing` number
    - `lineHeight` number
    - `shadowColor` string: UserTemplate のみ
    - `shadowBlur` number: UserTemplate のみ
    - `animation` 'none' | 'fade' | 'typewriter' | 'slide-up' | 'bounce' | 'pop' | 'slide-left' | 'wave' | 'blur-in' | 'zoom-in': UserTemplate のみ
    - `speakerName` 'none' | 'inline' | 'above' | 'badge'
  - `characters` object[]
    - `slot` string, required
    - `flip` boolean: 自作キャラにだけ効く（組み込みのキャラは自動で向かい合わせる）。yukkuri-talk 系は不可
    - `voiceOnly` boolean
  - `camera` object: yukkuri-talk 系は不可
    - `zoomScale` number
    - `backgroundBlurOnZoom` boolean
  - `bgm` object: volume と ducking のどちらか（両方でもよい）
    - `volume` number: BGM の音量（0.3 が標準。0.6 で約 +6dB、0.15 で約 -6dB）
    - `ducking` boolean: true で話している間だけ BGM を下げる（約 -10dB。話し始めの 0.15 秒前から下げ、話し終わりから 0.4 秒で戻す。行の間が約 0.55 秒以下なら下げたまま）。間・アイキャッチ・話の前後では元の大きさ。既定 false。プロジェクトの bgmDucking（PATCH /projects/{id}/settings）があればそちらが勝つ
  - `background` object: プロジェクト・行に背景が無いときの既定。https のみ・内部アドレス不可。imageUrl と videoUrl はどちらか片方
    - `imageUrl` string, nullable
    - `videoUrl` string, nullable
    - `color` string: UserTemplate のみ

## Response `200`

直した

- object
  - `templateId` string, required
  - `note` string
  - `basedOn` string, nullable
  - `name` string
  - `style` TemplateStyle, required: テンプレートの見た目（描かれている値）。描き手は元の組み込みで決まる: yukkuri-talk / tohoku-ahiru-talk を元にしたものはその組み込み、それ以外（白紙・ほかの組み込みの複製）は UserTemplate。unsupported はそのテンプレートでは描かれない項目
    - `subtitle` object, required
      - `look` 'bold' | 'box' | 'box-outline' | 'box-speaker-outline' | 'frame', nullable: 行の字幕の描き方の既定。null はプロジェクトの既定（AI で作った動画は bold）。UserTemplate では常に null（書式をそのまま描く）
      - `fontSize` integer: 基本の文字サイズ（px、横長 1920 幅で）。render_mp4 / プロジェクトの fontSize があればそちらが勝つ
      - `color` string: #rrggbb・#rrggbbaa・rgb(r,g,b)・rgba(r,g,b,a)
      - `fontWeight` integer
      - `outlineColor` string: #rrggbb・#rrggbbaa・rgb(r,g,b)・rgba(r,g,b,a)
      - `outlineWidth` number
      - `backgroundColor` string, nullable: 箱の色。null は話者の色の半透明
      - `backgroundPadding` number
      - `backgroundBorderRadius` number
      - `textAlign` 'left' | 'center' | 'right'
      - `letterSpacing` number
      - `lineHeight` number
      - `shadowColor` string: UserTemplate のみ
      - `shadowBlur` number: UserTemplate のみ
      - `animation` string: UserTemplate のみ
      - `speakerName` 'none' | 'inline' | 'above' | 'badge'
    - `characters` object[], required
      - `slot` string, required
      - `label` string
      - `character` string
      - `flip` boolean: 左右反転（yukkuri-talk 系には無い）
      - `voiceOnly` boolean, required
    - `camera` object: yukkuri-talk 系には無い（寄りは固定）
      - `zoomScale` number
      - `backgroundBlurOnZoom` boolean
    - `bgm` object, required
      - `volume` number: 0〜1（0.3 が標準）
      - `ducking` boolean: 話している間だけ BGM を下げるか（既定 false）
    - `background` object, required
      - `imageUrl` string, nullable
      - `videoUrl` string, nullable
      - `color` string: UserTemplate のみ
    - `unsupported` string[], required: このテンプレートでは描かれない項目（PATCH に渡すと 400 unsupported_field）
  - `notes` string[]: 効かない組み合わせの知らせ（例: look が bold のときの color）

## Other responses

- `400`: 値が正しくない（invalid_request。issues に項目）・描かれない項目（unsupported_field）・無い枠（unknown_slot）・使えない URL（invalid_url）・組み込み（system_template）・中身の無いテンプレート（empty_template）
- `401`: 未認証
- `403`: 権限不足（projects:write）
- `404`: 自分のテンプレートが無い（template_not_found）

## Changes

- **2026-10-20** `ba5f36b016da`: 20 warning, 12 info
  - added the new `already_subscribed` enum value to the `code` response property for the response status `400`
  - added the new `already_subscribed` enum value to the `code` response property for the response status `401`
  - added the new `already_subscribed` enum value to the `code` response property for the response status `403`
  - added the new `already_subscribed` enum value to the `code` response property for the response status `404`
  - …28 more

[Operation history](https://skmtc.dev/yukkurigen/apis/yukkurigen-ai-operated-api/changes/api/v1/agent/templates/:templateId/style/patch.md)

---

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