> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 音楽Finetuneを取得

GET https://api.elevenlabs.io/v1/music/finetunes

アクセス可能な音楽Finetune（自分のもの、ワークスペースで共有されたもの、ElevenLabsがキュレーションしたもの）を、任意のフィルタリング、ソート、カーソルページネーション付きで一覧表示します。

Reference: https://elevenlabs.io/docs/api-reference/music/finetunes/list

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Query parameters

- `cursor` (string, optional, nullable) — 次のページを取得するために使用します。カーソルはレスポンスで返されます。
- `page_size` (integer, optional, default: 50) — 返すFinetuneの数です。最大150、デフォルトは50です。
- `visibility` (enum, optional, nullable) — 公開範囲でフィルタリングします。'private'は非公開のFinetune、'workspace'はワークスペースで共有されたFinetune、'public'は公開Finetune（現在はElevenLabsがキュレーションしたFinetune）を返します。省略すると、アクセス可能なすべてのFinetuneを返します。
  - Allowed values: `private`, `workspace`, `public`
- `created_by` (enum, optional, nullable) — 作成者でフィルターします。'self'は自分が作成したFinetune、'workspace'はワークスペースのチームメンバーが作成したFinetune、'elevenlabs'はElevenLabsがキュレーションしたFinetuneを返します。省略すると、すべての作成者によるFinetuneを返します。
  - Allowed values: `self`, `workspace`, `elevenlabs`
- `sort` (enum, optional, default: created_at) — フィールドで並べ替えます（created_atまたはname）。
  - Allowed values: `created_at`, `name`
- `sort_direction` (enum, optional, default: desc) — 並べ替え方向（ascまたはdesc）
  - Allowed values: `asc`, `desc`

## Response

### 200

成功レスポンス。

- `finetunes` (list of MusicFinetuneResponseModel, required) — このページのFinetune。
- `next_cursor` (string, required, nullable) — 次のページを取得する際に`cursor`として渡すカーソル。結果がこれ以上ない場合は`null`です。
- `has_more` (boolean, required) — このページ以降にさらにFinetuneがあるかどうか。

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### MusicFinetuneResponseModel

- `id` (string, required) — Finetuneの一意の識別子。
- `name` (string, required) — Finetuneの名前。
- `tags` (list of string, required) — Finetuneに関連付けられたタグ。
- `model_id` (string, required) — Finetuneのトレーニングに使用したベース音楽モデル。
- `created_at` (string, required) — Finetuneが作成された日時（UTC）。
- `visibility` (enum, required) — このFinetuneにアクセスできるユーザー。`private`（自分のみ）、`workspace`（ワークスペースのメンバー）、`public`（ElevenLabsがキュレーションし、全員が利用可能）。
  - Allowed values: `private`, `workspace`, `public`
- `created_by` (enum, required) — Finetuneを作成したユーザー。`self`、`workspace`、または`elevenlabs`。
  - Allowed values: `self`, `workspace`, `elevenlabs`
- `status` (enum, required) — トレーニングのライフサイクルステータス：pending、in_progress、completed、failed、blocked。
  - Allowed values: `pending`, `in_progress`, `completed`, `failed`, `blocked`
- `training_progress` (double, required) — 0.0～1.0のトレーニング進行状況。
- `primary_genre` (string, optional, nullable) — Finetuneの主な音楽ジャンル。
- `failure_reason` (enum, optional, nullable) — 該当する場合、Finetuneが失敗またはブロックされた理由。
  - Allowed values: `audio_processing_failed`, `copyright_violation`, `training_failed`

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "finetunes": [
    {
      "id": "string",
      "name": "string",
      "tags": [
        "string"
      ],
      "model_id": "music_v1",
      "created_at": "2024-01-15T09:30:00Z",
      "visibility": "private",
      "created_by": "self",
      "status": "pending",
      "training_progress": 1.1,
      "primary_genre": "string",
      "failure_reason": "audio_processing_failed"
    }
  ],
  "next_cursor": "string",
  "has_more": true
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/music/finetunes"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/music/finetunes';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/music/finetunes"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/music/finetunes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/music/finetunes")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/music/finetunes');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/music/finetunes");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/music/finetunes")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```