---
title: "批量设置电台播放模式"
method: POST
path: "/songs/batch-radio-mode"
tags: ["歌曲管理"]
---

# 批量设置电台播放模式

`POST /songs/batch-radio-mode`

## Request

- Base URL: `https://localhost:58091/api/v1`
- URL: `https://localhost:58091/api/v1/songs/batch-radio-mode`
- Auth: API key in header `Authorization`

按 ID 列表批量设置电台播放模式。radio_mode 支持空字符串（自动）、hls、flv、audio_only；is_video 省略时保留各电台原值，仅音频模式始终清除视频内容。不存在的 ID 静默跳过，非电台歌曲或无效模式会拒绝整批更新。

## Request body

- ModelsBatchUpdateRadioModeRequest
  - `ids` integer[]: 要设置模式的电台 ID 列表
  - `is_video` boolean: 是否同步设置视频内容，省略时保留原值
  - `radio_mode` '' | 'hls' | 'flv' | 'audio_only': 电台播放模式

## Response `200`

更新成功

- ModelsBatchUpdateRadioModeResponse
  - `updated` integer: 实际更新的电台数量（不存在的 ID 静默跳过）

## Other responses

- `400`: 请求数据错误或包含非电台歌曲
- `500`: 更新失败

## Changes

- **2026-11-20** `4a3707d2bfbc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/songloft-org/apis/songloft-api/changes/songs/batch-radio-mode/post.md)

---

[API](https://skmtc.dev/songloft-org/apis/songloft-api.md) - [All operations](https://skmtc.dev/songloft-org/apis/songloft-api/llms.txt) - [OpenAPI document](https://skmtc.dev/songloft-org/apis/songloft-api/revisions/5bc05f13fffd?raw)
