---
title: "手元の音（BGM・効果音）を置く署名付き PUT URL を出す"
method: POST
path: "/api/v1/assets/audio-uploads"
tags: ["assets"]
---

# 手元の音（BGM・効果音）を置く署名付き PUT URL を出す

`POST /api/v1/assets/audio-uploads`

## Request

- Base URL: `https://app.yukkurigen.com`
- URL: `https://app.yukkurigen.com/api/v1/assets/audio-uploads`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Request body

- object
  - `fileName` string, required: ファイル名。置き場所の名前に使う（英数字と . _ - 以外は _ に置き換える）
  - `mimeType` 'audio/mpeg' | 'audio/wav' | 'audio/ogg', required: ファイルの形式（mp3 は audio/mpeg）。PUT の Content-Type にもこの値を付ける
  - `fileSize` integer, required: ファイルのバイト数（ちょうどの値）。bgm は 30MB・sfx は 5MB まで
  - `kind` 'bgm' | 'sfx', required: bgm（行の bgm に書く曲）/ sfx（行の effect に書く効果音）

## Response `200`

アップロード先

- object
  - `data` object
    - `key` string: 確定（confirm）に渡す値
    - `uploadUrl` string, uri: PUT する署名付き URL（1時間）
    - `method` 'PUT'
    - `headers` object: PUT に付けるヘッダ（Content-Type）
    - `fileSize` integer
    - `kind` 'bgm' | 'sfx'
    - `expiresAt` string, date-time
    - `expiresInSeconds` integer
    - `examples` object: PUT のコマンド例。<FILE_PATH> を手元のファイルのパスに置き換える
      - `curl` string
      - `powershell` string
    - `next` string

## Other responses

- `400`: リクエスト不正（code: validation_error。形式が mp3 / wav / ogg でない・種類ごとの上限を超えた など）
- `401`: 認証エラー（code: unauthenticated）
- `403`: スコープ不足（code: insufficient_scope。projects:write が必要）
- `429`: レート上限（code: rate_limited）またはストレージ容量の上限（code: quota_exceeded。current と limit が付く）
- `500`: アップロード先を用意できなかった（code: internal_error）。押さえた容量は外してある

## Changes

- **2026-10-20** `ba5f36b016da`: 25 warning, 15 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 `429`
  - …36 more

[Operation history](https://skmtc.dev/yukkurigen/apis/yukkurigen-ai-operated-api/changes/api/v1/assets/audio-uploads/post.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)
