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

# 音声をアップロードしてカバーを作成

> 公開音声 URL をアップロードし、Suno V6 でカバーを作成します

<Info>
  このエンドポイントは公開音声 URL から直接カバーを作成するため、事前に `uploadTask` を呼び出す必要はありません。`task_id` が返されるので、`GET /v1/music/tasks/{task_id}` をポーリングして結果を取得してください。
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.apimart.ai/v1/music/generations/uploadCover \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "suno",
      "version": "v6",
      "audio_url": "https://example.com/reference.mp3",
      "custom": true,
      "instrumental": true,
      "tags": "piano, ambient",
      "duration_s": 120,
      "variety": "normal",
      "audio_format": "m4a"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.apimart.ai/v1/music/generations/uploadCover",
      headers={"Authorization": "Bearer <token>"},
      json={
          "model": "suno",
          "version": "v6",
          "audio_url": "https://example.com/reference.mp3",
          "custom": True,
          "instrumental": True,
          "tags": "piano, ambient",
          "duration_s": 120,
          "audio_format": "m4a",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.apimart.ai/v1/music/generations/uploadCover", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "suno",
      version: "v6",
      audio_url: "https://example.com/reference.mp3",
      custom: true,
      instrumental: true,
      tags: "piano, ambient",
      duration_s: 120,
      audio_format: "m4a"
    })
  });
  console.log(await response.json());
  ```
</RequestExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer Token。[API Key 管理ページ](https://apimart.ai/keys) で API Key を取得してください。
</ParamField>

## Body

<ParamField body="model" type="string" default="suno">
  常に `suno` を指定します。
</ParamField>

<ParamField body="audio_url" type="string" required>
  公開アクセス可能な音声ファイルの直接 HTTP(S) URL。参照元音声は 8 分未満にしてください。ローカルパス、`blob:` URL、ログインが必要なリンクは使用できません。
</ParamField>

<ParamField body="version" type="string" default="v6">
  公開バージョン：`v6` / `v6-wild` / `v6-mini`。既定値は `v6` です。`custom_model_id` を使用する場合は省略してください。
</ParamField>

<ParamField body="custom_model_id" type="string">
  モデル作成タスクが返す完全な UUID。`version` および `persona_id` と同時に指定できません。
</ParamField>

<ParamField body="custom" type="boolean">
  このフィールドは明示的に送信してください。`false` では `gpt_description`、`true` では歌詞とスタイルのフィールドを使用します。
</ParamField>

<ParamField body="instrumental" type="boolean" default="false">
  インストゥルメンタル音声を生成するかどうか。`custom=true` かつこのフィールドが `false` の場合、`prompt` は必須です。
</ParamField>

<ParamField body="gpt_description" type="string">
  インスピレーションの説明。`custom=false` の場合は必須で、最大 3,000 文字です。
</ParamField>

<ParamField body="prompt" type="string">
  カスタム歌詞。最大 5,000 文字。
</ParamField>

<ParamField body="tags" type="string">
  スタイルの説明。最大 1,000 文字。
</ParamField>

<ParamField body="title" type="string">
  タイトル。最大 80 文字。
</ParamField>

<ParamField body="negative_tags" type="string">
  除外するスタイル。
</ParamField>

<ParamField body="style_weight" type="number">
  スタイルの重み。0～1。
</ParamField>

<ParamField body="weirdness" type="number">
  創造性の重み。0～1。
</ParamField>

<ParamField body="audio_weight" type="number">
  音声の重み。0～1。
</ParamField>

<ParamField body="auto_lyrics" type="boolean">
  入力した歌詞を創造的に書き換えるかどうか。
</ParamField>

<ParamField body="vocal_gender" type="string">
  ボーカルの性別：`Male` / `Female`。
</ParamField>

<ParamField body="persona_id" type="string">
  Persona ID。`custom_model_id` と同時に指定できません。
</ParamField>

<ParamField body="duration_s" type="integer">
  目標生成時間。10～360 秒。カスタムモードでのみ使用できます。
</ParamField>

<ParamField body="variety" type="string">
  スタイルの変化：`off` / `normal` / `high` / `extra` / `max`。
</ParamField>

<ParamField body="max_mode" type="boolean" default="false">
  Max モードを有効にします。カスタムモードが必要で、料金は通常価格の 2 倍です。
</ParamField>

<ParamField body="audio_format" type="string">
  出力形式：`mp3` / `m4a` / `wav`。
</ParamField>

## Response

<ResponseField name="code" type="integer">レスポンスステータスコード。</ResponseField>

<ResponseField name="data" type="array">
  送信結果。`data[0].task_id` を取得し、タスク照会 API をポーリングしてください。
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "code": 200,
    "data": [
      {"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
    ]
  }
  ```
</ResponseExample>
