# Fetch and map a single voice by id

Operation ID: `connectors.elevenlabsGetVoice`

Fetch and map a single voice by id. Calls ElevenLabs through the HealthCloud connector gateway.

## Public method

`getVoice`

Signature: `connectors.elevenlabs.createClient(config).getVoice(body)`

Return type: `Promise<ElevenLabsGetVoiceResult>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`POST /connectors/elevenlabs/get-voice`

## Path parameters

None.

## Query parameters

None.

## Body parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `body` | [`ElevenlabsGetVoiceRequest`](../models/ElevenlabsGetVoiceRequest.md) | Yes |  |  |  | No |  |

Request model: [`ElevenlabsGetVoiceRequest`](../models/ElevenlabsGetVoiceRequest.md)

## Request example

```json
{
  "api_key": "example-api-key",
  "mode": "sandbox",
  "voice_id": "example-voice_id"
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`ElevenLabsVoice`](../models/ElevenLabsVoice.md) | application/json | Successful response |

## Success response examples

### 200

```json
{
  "category": "premade",
  "description": "Easy going and perfect for casual conversations.",
  "fine_tuning": {
    "is_allowed_to_fine_tune": true,
    "language": "en",
    "manual_verification_requested": false,
    "max_verification_attempts": 5,
    "message": {
      "eleven_flash_v2": "Done!",
      "eleven_flash_v2_5": "Done!",
      "eleven_v2_5_flash": "Done!",
      "eleven_v2_flash": "Done!"
    },
    "next_max_verification_attempts_reset_unix_ms": 1700000000000,
    "progress": {
      "eleven_flash_v2": 1,
      "eleven_flash_v2_5": 1,
      "eleven_v2_5_flash": 1,
      "eleven_v2_flash": 1
    },
    "state": {
      "eleven_flash_v2": "fine_tuned",
      "eleven_flash_v2_5": "fine_tuned",
      "eleven_multilingual_v2": "fine_tuned",
      "eleven_turbo_v2": "fine_tuned",
      "eleven_turbo_v2_5": "failed",
      "eleven_v2_5_flash": "fine_tuned",
      "eleven_v2_flash": "fine_tuned"
    },
    "verification_attempts_count": 0,
    "verification_failures": []
  },
  "high_quality_base_model_ids": [
    "eleven_v2_flash"
  ],
  "labels": {
    "accent": "american",
    "age": "middle_aged",
    "descriptive": "classy",
    "gender": "male",
    "language": "en",
    "use_case": "conversational"
  },
  "name": "Roger - Laid-Back, Casual, Resonant",
  "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/CwhRBWXzGAHq8TQ4Fs17/58ee3ff5-f6f2-4628-93b8-e38eb31806",
  "settings": {
    "similarity_boost": 0.75,
    "speed": 1,
    "stability": 0.5,
    "style": 0,
    "use_speaker_boost": true
  },
  "voice_id": "example-voice_id"
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Connector validation rejected the payload, or a required field was missing or of the wrong type. |
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The HealthCloud bearer token is missing or invalid, or the vendor rejected the supplied connector credentials. |
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The connector failed unexpectedly. |
| `502` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The vendor returned an application or transport-level failure. |
| `504` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | The vendor did not respond within the connector timeout. |

## Error examples

### 400 — Invalid request

```json
{
  "error": "Invalid request"
}
```

### 401 — Authorization required

```json
{
  "error": "Authorization required"
}
```

### 500 — Internal error

```json
{
  "error": "Internal error"
}
```

### 502 — Upstream vendor error

```json
{
  "error": "Upstream vendor error"
}
```

### 504 — Upstream timeout

```json
{
  "error": "Upstream timeout"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const body = {
  "api_key": "example-api-key",
  "mode": "sandbox",
  "voice_id": "example-voice_id"
};

const result = await connectors.elevenlabs.createClient(config).getVoice(body);
```

## cURL

```bash
curl -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"api_key":"example-api-key","mode":"sandbox","voice_id":"example-voice_id"}' \
  'https://dev-api-connectors.health.cloud/connectors/elevenlabs/get-voice'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
