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

# Get a voice

> Read a voice visible to the Nixflex account and its compatibility with an optional agent language. A successful read does not guarantee compatibility.

**FIXED · agent** For a different inbound opening on each number, use Dynamic greeting and put the opening in that number’s custom\_prompt. Fixed welcome\_message text, spoken language, pickup delay and general call timezone are shared agent settings. Use separate agents when those must differ. A booking timezone changes calendar times only.

**NOT OFFERED → do this instead · number** A number cannot override fixed agent settings. Use its dynamic opening for business-specific wording. Use different agents for different fixed settings.

**YOU CAN CHANGE · agent** Choose the supported catalogue voice and an eligible route. Select manual speech terms or configure structured values to extract from transcripts.

**SCOPE · number** Choose a complete primary and backup voice pair on the number. It overrides the agent pair as a whole. To use the saved agent pair, set voice\_pair\_inherit to true. Setting the older voice\_id field can clear the agent’s catalogue key, and a pair that is only partly set can be unavailable. Never choose by alias precedence.

Group numbers by the knowledge and agent settings their customers need. Attribute each customer’s usage to its verified business number.

Agents are unlimited. There is no fee per agent. Customers pay only for usage (minutes and texts). Many customers can use one shared agent, each with its own number and number prompt. Use separate agents only for different knowledge or agent settings. List page size, knowledge-base quotas and simultaneous-call limits do not cap agent count.

For a different greeting per business, keep Dynamic greeting on (the default) and put the opening line in that number’s custom\_prompt. For example, “Start every call with: Thank you for calling Oak and Stone”.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#agents-voices)

Read a voice visible to this account and its compatibility with an optional agent language. A successful read can return selectable: false; read the reason before using the voice.

Method: **GET** · Success: **200** · Scope: **Owning account**

**The important part**

* Keep the exact voice key from the catalogue.
* A missing or unavailable voice needs a deliberate alternative, not a guessed key.

[Business guide](https://docs.nixflex.com/guides/business/your-own-voice.md) · [Developer guide](https://docs.nixflex.com/concepts/voices.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Authentication

Send `Authorization: Bearer KEY_ID:KEY_SECRET` using the owning account’s server-side credential.

## Request fields

| Field | Type | Required | Default | Limits and meaning |
| - | - | - | - | - |
| `voice_key` (path) | string | Yes | None | Voice key returned by List voices. Lookup is case-insensitive. |
| `agent_id` (query) | string | No | Omitted | Optional owned agent whose saved language provides the compatibility context. Ignored when agent\_language is supplied. |
| `agent_language` (query) | string | No | Omitted | Optional supported language code or multi for a draft agent. Takes precedence over agent\_id. |

Do not send a request body.

agent\_language takes precedence over agent\_id. Without either, selectable reflects availability and approved languages, not a particular agent. A fixed-language agent needs approval for that language; a multi-language agent uses its server-derived language set. Preview absence is separate from availability. Accent language, locale and label can each be null; keep unknown metadata as null.

## Response fields

`200 OK` returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.

| Field | Type | Meaning |
| - | - | - |
| `voice_key` | string | Stable neutral catalog identifier; use this value when selecting a voice. |
| `displayName` | string | Display label, not an identifier. |
| `gender` | string | Catalog gender label. Allowed: `"male"`, `"female"`, `"unknown"`. |
| `nativeLanguage` | string or null | Native language code, when known. |
| `locale` | string or null | Locale label, when known. |
| `accents` | array of object | Available accent labels. |
| `accents[].language` | string or null | Accent language. Null when not supplied in the catalog. |
| `accents[].locale` | string or null | Accent locale. |
| `accents[].label` | string or null | Neutral accent label. Null when not supplied in the catalog. |
| `languages` | array of string | Languages approved for this voice. |
| `origin` | string | Standard catalog or a connection belonging to this account. Allowed: `"standard"`, `"connected"`. |
| `availability` | string | Current catalog availability. Allowed: `"active"`, `"temporarily_unavailable"`, `"unavailable"`. |
| `selectable` | boolean | Whether a new selection is compatible with the supplied agent context. |
| `incompatibilityReason` | string or null | Reason when not selectable: voice\_unavailable, voice\_temporarily\_unavailable, no\_approved\_languages, native\_language\_not\_in\_multi\_set or language\_not\_approved. These are response values, not HTTP errors. |
| `previewLanguage` | string or null | Preview language, or null when no preview exists. |
| `previewStatus` | string | Preview state; none when no preview is available. |
| `previewUrl` | string or null | Preview URL when present. Null does not imply that the voice is unavailable. |

## Example request

Raw HTTP base URL: `https://api.nixflex.com/v1`. Node and Python SDK base URL: `https://api.nixflex.com`. The SDK adds `/v1`. Keep `NIXFLEX_API_KEY` in your private process environment. The shell examples use Bash syntax. SDK and CLI examples require Node/CLI 0.11.0 or later and Python 0.4.0 or later. Set `NXF_VOICE_KEY` to the intended account-owned identifiers or approved recipient before running.

```bash cURL theme={"dark"}
curl --request GET \
  --url "https://api.nixflex.com/v1/voices/$NXF_VOICE_KEY?agent_language=multi" \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node theme={"dark"}
import Nixflex from 'nixflex';
const baseUrl = 'https://api.nixflex.com';
const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl,maxRetries:0});
const result = await client.voices.get(process.env.NXF_VOICE_KEY, {agent_language:"multi"});
// Handle result privately; do not log secrets or call content.
```

```python Python theme={"dark"}
import os, json
from pathlib import Path
from nixflex import Nixflex
base_url = "https://api.nixflex.com"
with Nixflex(os.environ["NIXFLEX_API_KEY"], base_url=base_url,max_retries=0) as client:
    result = client.voices.get(os.environ["NXF_VOICE_KEY"], agent_language="multi")
# AsyncNixflex supports the same calls with await (and async with).
```

```bash CLI theme={"dark"}
nixflex voices get "$NXF_VOICE_KEY" --agent-language multi --base-url https://api.nixflex.com --json
```

## Example response

Illustrative `200` response. Identifiers and values are examples; some optional or compatibility fields are omitted.

```json Response theme={"dark"}
{
  "voice_key": "00000000-0000-4000-8000-000000000001",
  "displayName": "Example voice",
  "gender": "female",
  "nativeLanguage": "en",
  "locale": "en-GB",
  "accents": [],
  "languages": [
    "en"
  ],
  "origin": "standard",
  "availability": "active",
  "selectable": true,
  "incompatibilityReason": null,
  "previewLanguage": null,
  "previewStatus": "none",
  "previewUrl": null
}
```

## Errors

Failures return an `error` object with `code`, `message`, `doc_url` and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.

| Status | Code | Meaning | What to do |
| - | - | - | - |
| 404 | [`voice_not_found`](https://docs.nixflex.com/api-reference/errors#voice_not_found) | The voice is unknown or not visible to this account. | Select a key from this account’s catalog. |
| 400 | [`invalid_agent_language`](https://docs.nixflex.com/api-reference/errors#invalid_agent_language) | The agent language context is invalid. | Use a supported code or multi. |
| 400 | [`agent_not_found`](https://docs.nixflex.com/api-reference/errors#agent_not_found) | The supplied agent context could not be read for this account. | Use an owned agent ID or a draft language. |
| 503 | [`catalog_unavailable`](https://docs.nixflex.com/api-reference/errors#catalog_unavailable) | The catalog is not loaded. | Retry the read after recovery. |
| 401 | [`unauthorized`](https://docs.nixflex.com/api-reference/errors#unauthorized) | The credential is missing or invalid. | Check the full account credential. |
| 429 | [`rate_limit_exceeded`](https://docs.nixflex.com/api-reference/errors#rate_limit_exceeded) | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |

## Retry and idempotency

This is a read-only request. Retry transient connection or server failures with bounded backoff; respect Retry-After for 429. Do not retry validation or ownership errors unchanged. A later read can return newer state.

## Related endpoints

* [List voices](https://docs.nixflex.com/api-reference/voices/get-voices.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md#error-envelope)


## OpenAPI

````yaml api-reference/public.openapi.json GET /voices/{voice_key}
openapi: 3.1.0
info:
  title: Nixflex public API
  version: 1.0.0
  description: >-
    Nixflex API reference for agents, calls, messaging, knowledge, organisations
    and integrations. Authenticate with the owning account and follow each
    operation’s permissions, response and retry contract.
servers:
  - url: https://api.nixflex.com/v1
security:
  - bearerAuth: []
paths:
  /voices/{voice_key}:
    get:
      tags:
        - Voices
      summary: Get a voice
      description: >-
        Read a voice visible to this account and its compatibility with an
        optional agent language. A successful read can return selectable: false;
        read the reason before using the voice. agent_language takes precedence
        over agent_id. Without either, selectable reflects availability and
        approved languages, not a particular agent. A fixed-language agent needs
        approval for that language; a multi-language agent uses its
        server-derived language set. Preview absence is separate from
        availability. Accent language, locale and label can each be null; keep
        unknown metadata as null.
      operationId: getVoice
      parameters:
        - name: voice_key
          in: path
          required: true
          schema:
            type: string
            description: Voice key returned by List voices. Lookup is case-insensitive.
          description: Voice key returned by List voices. Lookup is case-insensitive.
        - name: agent_id
          in: query
          required: false
          schema:
            type: string
            description: >-
              Optional owned agent whose saved language provides the
              compatibility context. Ignored when agent_language is supplied.
          description: >-
            Optional owned agent whose saved language provides the compatibility
            context. Ignored when agent_language is supplied.
        - name: agent_language
          in: query
          required: false
          schema:
            type: string
            description: >-
              Optional supported language code or multi for a draft agent. Takes
              precedence over agent_id.
          description: >-
            Optional supported language code or multi for a draft agent. Takes
            precedence over agent_id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  voice_key:
                    type: string
                    description: >-
                      Stable neutral catalog identifier; use this value when
                      selecting a voice.
                  displayName:
                    type: string
                    description: Display label, not an identifier.
                  gender:
                    type: string
                    description: Catalog gender label.
                    enum:
                      - male
                      - female
                      - unknown
                  nativeLanguage:
                    type:
                      - string
                      - 'null'
                    description: Native language code, when known.
                  locale:
                    type:
                      - string
                      - 'null'
                    description: Locale label, when known.
                  accents:
                    type: array
                    items:
                      type: object
                      properties:
                        language:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Accent language. Null when not supplied in the
                            catalog.
                        locale:
                          type:
                            - string
                            - 'null'
                          description: Accent locale.
                        label:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Neutral accent label. Null when not supplied in the
                            catalog.
                      required:
                        - language
                        - locale
                        - label
                      description: ''
                      additionalProperties: false
                    description: Available accent labels.
                  languages:
                    type: array
                    items:
                      type: string
                      description: Approved language code.
                    description: Languages approved for this voice.
                  origin:
                    type: string
                    description: >-
                      Standard catalog or a connection belonging to this
                      account.
                    enum:
                      - standard
                      - connected
                  availability:
                    type: string
                    description: Current catalog availability.
                    enum:
                      - active
                      - temporarily_unavailable
                      - unavailable
                  selectable:
                    type: boolean
                    description: >-
                      Whether a new selection is compatible with the supplied
                      agent context.
                  incompatibilityReason:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Reason when not selectable: voice_unavailable,
                      voice_temporarily_unavailable, no_approved_languages,
                      native_language_not_in_multi_set or language_not_approved.
                      These are response values, not HTTP errors.
                  previewLanguage:
                    type:
                      - string
                      - 'null'
                    description: Preview language, or null when no preview exists.
                  previewStatus:
                    type: string
                    description: Preview state; none when no preview is available.
                  previewUrl:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Preview URL when present. Null does not imply that the
                      voice is unavailable.
                required:
                  - voice_key
                  - displayName
                  - gender
                  - nativeLanguage
                  - locale
                  - accents
                  - languages
                  - origin
                  - availability
                  - selectable
                  - incompatibilityReason
                  - previewLanguage
                  - previewStatus
                  - previewUrl
                description: ''
                additionalProperties: false
              example:
                voice_key: 00000000-0000-4000-8000-000000000001
                displayName: Example voice
                gender: female
                nativeLanguage: en
                locale: en-GB
                accents: []
                languages:
                  - en
                origin: standard
                availability: active
                selectable: true
                incompatibilityReason: null
                previewLanguage: null
                previewStatus: none
                previewUrl: null
        '400':
          description: >-
            invalid_agent_language: The agent language context is invalid. Use a
            supported code or multi. agent_not_found: The supplied agent context
            could not be read for this account. Use an owned agent ID or a draft
            language.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '401':
          description: >-
            unauthorized: The credential is missing or invalid. Check the full
            account credential.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '404':
          description: >-
            voice_not_found: The voice is unknown or not visible to this
            account. Select a key from this account’s catalog.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '429':
          description: >-
            rate_limit_exceeded: The account request limit was reached. Wait for
            Retry-After. Reconcile uncertain writes before resending.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '503':
          description: >-
            catalog_unavailable: The catalog is not loaded. Retry the read after
            recovery.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A
        verified personal dashboard Bearer session may be used where the
        operation documents role-based access.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.