> 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.

# ユーザーを取得

GET https://api.elevenlabs.io/v1/user

ユーザーに関する情報を取得します。

Reference: https://elevenlabs.io/docs/api-reference/user/get

## 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)

## Response

### 200

成功レスポンス。

- `user_id` (string, required) — ユーザーの一意の識別子です。
- `workspace_id` (string, required) — このユーザーのAPIキーが属するワークスペースの一意の識別子。
- `subscription` (SubscriptionResponseModel, required) — ユーザーのサブスクリプションの詳細。
- `is_onboarding_completed` (boolean, required) — ユーザーのオンボーディングが完了しているかどうか。
- `is_onboarding_checklist_completed` (boolean, required) — ユーザーのオンボーディングチェックリストが完了しているかどうか。
- `created_at` (integer, required) — ユーザー作成時のUnixタイムスタンプです。Unixタイムスタンプの追加前に作成されたユーザーの場合は0です。
- `seat_type` (enum, required) — ユーザーのシートタイプ。
  - Allowed values: `workspace_admin`, `workspace_member`, `workspace_lite_member`
- `is_new_user` (boolean, required, deprecated) — ユーザーが新規かどうか。このフィールドは非推奨であり、今後削除されます。代わりに「created_at」を使用してください。
- `can_use_delayed_payment_methods` (boolean, required, deprecated) — このフィールドは非推奨であり、今後のメジャーバージョンで削除されます。代わりにsubscription.trust_on_invoice_creationを使用してください。
- `show_compliance_terms` (boolean, optional, default: false) — オンボーディング中にコンプライアンス規約（利用規約、プライバシーポリシー、生体情報に関する同意）を表示するかどうか。マーケティングサイトから登録するユーザーに設定します。
- `first_name` (string, optional, nullable) — ユーザーの名。
- `is_api_key_hashed` (boolean, optional, default: false) — ユーザーのAPIキーがハッシュ化されているかどうか。
- `xi_api_key_preview` (string, optional, nullable) — ユーザーのAPIキーのプレビュー。
- `referral_link_code` (string, optional, nullable) — ユーザーの紹介リンクコード。
- `partnerstack_partner_default_link` (string, optional, nullable) — ユーザーのPartnerstackパートナーのデフォルトリンク。

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### SubscriptionResponseModel

- `tier` (string, required) — ユーザーのサブスクリプションのティアです。
- `character_count` (integer, required) — ユーザーが使用した文字数。
- `character_limit` (integer, required) — 現在の請求期間に許可される最大文字数。
- `max_character_limit_extension` (integer, required, nullable) — 非推奨：`max_credit_limit_extension`を使用してください。文字数上限を超過できる最大文字数。ワークスペース管理者が管理します。
- `max_credit_limit_extension` (SubscriptionResponseModelMaxCreditLimitExtension, required) — クレジット上限を超過できる最大クレジット数。ワークスペース管理者が管理します。`"unlimited"`は上限なし、`0`は従量課金が無効であることを意味します。
- `can_extend_character_limit` (boolean, required) — ワークスペースが超過分（従量課金）を利用できるかどうか。
- `allowed_to_extend_character_limit` (boolean, required) — 非推奨：`max_credit_limit_extension != 0`を使用してください。ユーザーに文字数上限の拡張が許可されているかどうか。
- `voice_slots_used` (integer, required) — ユーザーが使用した音声スロット数。
- `professional_voice_slots_used` (integer, required) — 使用中のプロフェッショナル音声スロット数。統合請求では、グループ内のすべてのワークスペースを対象としたグループ全体の数です。現在のワークスペースのみの数はprofessional_voice_slots_used_in_workspaceを参照してください。
- `professional_voice_slots_used_in_workspace` (integer, required) — 現在のワークスペースで使用中のプロフェッショナル音声スロット数。統合請求では、professional_voice_slots_usedはグループ内のすべてのワークスペースを対象に集計しますが、これは現在のワークスペースのみを対象に集計します。
- `voice_limit` (integer, required) — ユーザーに許可される音声スロットの最大数。
- `voice_add_edit_counter` (integer, required) — ユーザーが使用した音声の追加・編集回数。
- `professional_voice_limit` (integer, required) — ユーザーに許可されるプロフェッショナル音声の最大数。
- `can_extend_voice_limit` (boolean, required) — ユーザーが音声数の上限を拡張できるかどうか。
- `can_use_instant_voice_cloning` (boolean, required) — ユーザーがインスタントボイスクローンを使用できるかどうか。
- `can_use_professional_voice_cloning` (boolean, required) — ユーザーがプロフェッショナルボイスクローンを使用できるかどうか。
- `current_overage` (Price, required) — 現在の従量制超過料金。
- `status` (enum, required) — ユーザーのサブスクリプションのステータス。
  - Allowed values: `trialing`, `active`, `incomplete`, `past_due`, `free`, `free_disabled`
- `next_character_count_reset_unix` (integer, optional, nullable) — 次回の文字数カウントのリセット日時を示すUnixタイムスタンプです。
- `max_voice_add_edits` (integer, optional, nullable) — ユーザーに許可される音声の追加・編集の最大数。
- `currency` (enum, optional, nullable) — ユーザーのサブスクリプションの通貨。
  - Allowed values: `usd`, `eur`, `inr`, `pln`, `gbp`
- `billing_period` (enum, optional, nullable) — ユーザーのサブスクリプションの請求期間。
  - Allowed values: `monthly_period`, `3_month_period`, `6_month_period`, `annual_period`
- `character_refresh_period` (enum, optional, nullable) — ユーザーのサブスクリプションにおける文字数の更新期間。
  - Allowed values: `monthly_period`, `3_month_period`, `6_month_period`, `annual_period`

### ValidationError

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

### SubscriptionResponseModelMaxCreditLimitExtension

クレジット上限を超過できる最大クレジット数。ワークスペース管理者が管理します。`"unlimited"`は上限なし、`0`は従量課金が無効であることを意味します。

### Price

通貨と金額のペア。

- `amount` (string, required)
- `currency` (enum, required)
  - Allowed values: `usd`, `eur`, `inr`, `pln`, `gbp`

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "user_id": "1234567890",
  "workspace_id": "0987654321",
  "subscription": {
    "tier": "trial",
    "character_count": 17231,
    "character_limit": 100000,
    "max_character_limit_extension": 10000,
    "max_credit_limit_extension": 10000,
    "can_extend_character_limit": false,
    "allowed_to_extend_character_limit": false,
    "voice_slots_used": 1,
    "professional_voice_slots_used": 0,
    "professional_voice_slots_used_in_workspace": 0,
    "voice_limit": 120,
    "voice_add_edit_counter": 212,
    "professional_voice_limit": 1,
    "can_extend_voice_limit": false,
    "can_use_instant_voice_cloning": true,
    "can_use_professional_voice_cloning": true,
    "current_overage": {
      "amount": "0",
      "currency": "usd"
    },
    "status": "free",
    "next_character_count_reset_unix": 1738356858,
    "max_voice_add_edits": 230,
    "currency": "usd",
    "billing_period": "monthly_period",
    "character_refresh_period": "monthly_period"
  },
  "is_onboarding_completed": true,
  "is_onboarding_checklist_completed": true,
  "created_at": 1753999199,
  "seat_type": "workspace_member",
  "is_new_user": false,
  "can_use_delayed_payment_methods": false,
  "show_compliance_terms": false,
  "first_name": "John",
  "is_api_key_hashed": false
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/user"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/user';
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/user"

	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/user")

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/user")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/user");
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/user")! 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()
```