> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supertoneapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create cloned voice

> サンプル音声ファイルをアップロードして新しいカスタムボイスを登録します。

<Note>
  このドキュメントは英語の原文から自動翻訳されています。表現に不自然な箇所がある場合があります。正確な内容は[英語の原文](/en/api-reference/endpoints/create-cloned-voice)もあわせてご確認ください。
</Note>

アップロードされた音声サンプルからボイスをクローニングし、アカウント上にカスタムボイスとして登録します。返された `voice_id` はプリセットボイスと同じ TTS エンドポイントから直ちに呼び出せます。

<Note>
  **API 経由の** ボイスクローニングは Free プランではご利用いただけません。Free プランのアカウントでは [Supertone Play](https://play.supertone.ai) でクローニングが可能です。
</Note>

## エンドポイント

```http theme={"dark"}
POST https://supertoneapi.com/v1/custom-voices/cloned-voice
```

`multipart/form-data` として送信してください。

## リクエストボディ

| Field         | Required | Description                                          |
| ------------- | :------: | ---------------------------------------------------- |
| `files`       |     ✅    | クローニング元の音声サンプルです。**WAV または MP3、3 MB 未満** である必要があります。 |
| `name`        |     ✅    | ボイス名です。最大 100 文字。                                    |
| `description` |     —    | 自由記述の説明です。                                           |

## サンプル品質のヒント

クローン品質を最大化するためのポイント:

* 背景ノイズが少なく、話者が 1 人のクリーンな音声を使用してください。
* 5〜30 秒程度あれば十分です。
* モノラルを推奨します。サンプルレートは高くても問題ありません。

## レスポンス

割り当てられた `voice_id` を含む、新しいカスタムボイスオブジェクトを返します。この ID を保存し、[音声生成](/ja/api-reference/endpoints/text-to-speech) に渡して利用してください。

## エラー

| Status                       | Cause                                      |
| ---------------------------- | ------------------------------------------ |
| `400 Bad Request`            | `files` または `name` が欠落、もしくは `name` が長すぎます。 |
| `413 Payload Too Large`      | 音声ファイルが 3 MB を超えています。                      |
| `415 Unsupported Media Type` | ファイルが WAV でも MP3 でもありません。                  |
| `403 Forbidden`              | Free プランのアカウントです（API 経由のクローニングは許可されていません）。 |

## 関連項目

<CardGroup cols={2}>
  <Card title="Docs: Custom voices" icon="microphone" href="/ja/docs/core-concepts/custom-voices">
    SDK サンプル付きのライフサイクル解説。
  </Card>

  <Card title="Custom voice example" icon="lightbulb" href="/ja/docs/examples/custom-voice-tts">
    クローン作成からリスト、呼び出しまでのエンドツーエンド例。
  </Card>
</CardGroup>


## OpenAPI

````yaml /openapi.json post /v1/custom-voices/cloned-voice
openapi: 3.0.0
info:
  title: Supertone Public API
  description: >-
    Supertone API is a RESTful API for using our state-of-the-art AI voice
    models.
  version: 0.9.6
  contact: {}
servers:
  - url: https://supertoneapi.com
    description: Production
security: []
tags:
  - name: voices
    description: Voice Library API endpoints
  - name: custom_voices
    description: Custom Voice Management API endpoints
  - name: text_to_speech
    description: Text-to-Speech API endpoints
  - name: usage
    description: Usage Analytics API endpoints
paths:
  /v1/custom-voices/cloned-voice:
    post:
      tags:
        - custom_voices
      summary: Create cloned voice
      description: Creates a custom (cloned) voice from uploaded audio files.
      operationId: create_cloned_voice
      parameters: []
      requestBody:
        required: true
        description: Audio file and voice metadata
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: string
                  format: binary
                  description: >-
                    Audio file to clone voice from (all common audio formats
                    accepted, max 3MB)
                name:
                  type: string
                  description: Name of the cloned voice
                description:
                  type: string
                  description: Description of the cloned voice
              required:
                - files
                - name
      responses:
        '200':
          description: Successfully created cloned voice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomVoiceResponse'
        '400':
          description: 'Bad Request: Invalid file or request data'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: 'Unauthorized: Invalid API key'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: >-
            Forbidden: Insufficient tier access (STARTER tier or higher
            required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '404':
          description: 'Not Found: No custom voices found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '413':
          description: 'Payload Too Large: File size exceeds 3MB limit'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeErrorResponse'
        '415':
          description: 'Unsupported Media Type: Invalid audio file format'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeErrorResponse'
        '429':
          description: 'Rate Limit Exceeded: Too many requests (10 per 60 seconds)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
        '500':
          description: 'Internal Server Error: Failed to get custom voices'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - api-key: []
components:
  schemas:
    CreateCustomVoiceResponse:
      type: object
      properties:
        voice_id:
          type: string
          description: Unique identifier for the created voice
          example: voice_123456789
      required:
        - voice_id
    BadRequestErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          type: string
          description: Bad request error message
          example: Invalid request data
      required:
        - status
        - message
    UnauthorizedErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          description: Unauthorized error details
          example:
            message: Invalid API Key
            error: Unauthorized
            statusCode: 401
          allOf:
            - $ref: '#/components/schemas/ErrorMessageData'
      required:
        - status
        - message
    ForbiddenErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          description: Forbidden error details
          example:
            message: Permission denied
            error: Forbidden
            statusCode: 403
          allOf:
            - $ref: '#/components/schemas/ErrorMessageData'
      required:
        - status
        - message
    NotFoundErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          description: Not found error details
          example:
            message: Voice not found
            error: Not Found
            statusCode: 404
          allOf:
            - $ref: '#/components/schemas/ErrorMessageData'
      required:
        - status
        - message
    PayloadTooLargeErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          description: Payload too large error details
          example:
            message: File too large
            error: Payload Too Large
            statusCode: 413
          allOf:
            - $ref: '#/components/schemas/ErrorMessageData'
      required:
        - status
        - message
    UnsupportedMediaTypeErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          type: string
          description: Unsupported media type error message
          example: >-
            Unsupported audio format. Supported formats: WAV, MP3. Received:
            application/json
      required:
        - status
        - message
    TooManyRequestsErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          description: Too many requests error details
          example:
            message: rate limit exceeded
            error: Too Many Requests
            statusCode: 429
          allOf:
            - $ref: '#/components/schemas/ErrorMessageData'
      required:
        - status
        - message
    InternalServerErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
        message:
          description: Internal server error details
          example:
            message: Failed to convert text to speech
            error: Internal Server Error
            statusCode: 500
          allOf:
            - $ref: '#/components/schemas/ErrorMessageData'
      required:
        - status
        - message
    ErrorMessageData:
      type: object
      properties:
        message:
          type: string
          description: Error message
          example: Invalid API Key
        error:
          type: string
          description: Error type
          example: Unauthorized
        status_code:
          type: number
          description: HTTP status code
          example: 401
      required:
        - message
        - error
        - status_code
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-sup-api-key

````