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

# xAI

> Connect xAI to SentiVue Talk

xAI is the company behind Grok. In SentiVue Talk this connection provides the **voice** that speaks your agent's responses.

## What you need

| Field   | Required |
| ------- | -------- |
| API key | Yes      |

## Getting your API key

1. Sign in at [console.x.ai](https://console.x.ai/).
2. Open **API Keys** for your team.
3. Create a key, name it, and copy the value.

Keys begin with `xai-`.

<Warning>
  xAI requires credits on the account before the API responds. A brand-new team with no credits loaded produces a key that authenticates but fails on every request.
</Warning>

## Adding the connection

1. Go to **Connections** and choose **xAI**.
2. Paste the API key.
3. Save.

SentiVue Talk validates the key with xAI as you save, so a bad or expired key is caught immediately rather than on a live call.

## What you can select afterwards

Choose your voice on [Model Configurations](/talk/configurations/inference-providers).

**Model** — pick from the dropdown, or type a name in for any speech model your account can reach. See xAI's [models page](https://docs.x.ai/docs/models).

**Voice** — a voice is referenced by name, for example `eve`, and the name is case-insensitive. Browse the current set on xAI's [text-to-speech page](https://docs.x.ai/developers/model-capabilities/audio/text-to-speech).

**Language** — BCP-47 codes, from broad codes like `es` through regional variants like `es-MX`. Set `auto` to let the model detect it. The supported list is on the same [text-to-speech page](https://docs.x.ai/developers/model-capabilities/audio/text-to-speech).

## Realtime is a separate connection

xAI's speech-to-speech model is a separate provider in SentiVue Talk, with its own connection. See [Grok Realtime](/talk/configurations/providers/grok-realtime). Connecting one does not connect the other, even though both use a key from the same console.

## Completing the pipeline

xAI drives voice only. You also need:

* A [language model](/talk/configurations/llm) to decide what the agent says
* A [transcriber](/talk/configurations/transcriber) to turn caller speech into text

Each is a separate [connection](/talk/configurations/connections).

## Troubleshooting

<AccordionGroup>
  <Accordion title="The key is rejected when I save">
    Confirm you copied the key whole including the `xai-` prefix, and that it has not been deleted or rotated in the console.
  </Accordion>

  <Accordion title="The key saved but calls fail with no audio">
    xAI needs credits on the account before it serves requests. Load credits on the team that owns the key.
  </Accordion>

  <Accordion title="A voice I entered is not found">
    Check the name against xAI's [text-to-speech page](https://docs.x.ai/developers/model-capabilities/audio/text-to-speech). Capitalisation is not the problem — voice names are case-insensitive — so a mismatch means the name itself is wrong or no longer offered.
  </Accordion>

  <Accordion title="The agent speaks the wrong language or accent">
    The language is set on the voice, not inferred from your prompt. Set it to match your callers, or use `auto` to let the model detect it. Regional variants are distinct — `pt-BR` and `pt-PT` are separate choices.
  </Accordion>
</AccordionGroup>
