# Get an API key: xAI

> An xAI key comes from the developer console, which bills separately from any consumer subscription and holds the account's monthly cap.

- Canonical: https://big-agi.com/docs/connect-xai
- Minimum tier: open  [Open ⊂ Free ⊂ Pro - a tier only ever ADDS to the Open baseline]
- Kind: provider · Last content update generation: 2026-07-27 · Review by: 2026-10-27
- Answers: Where do I create an xAI API key? · Is my consumer subscription the same as API access? · How do I limit what this account can spend?

An xAI key comes from the developer console, which bills separately from any consumer subscription at the same company. That console is also where the account's monthly cap lives.

## The team account and its payment method

A team account needs a payment method on file before the key does anything. Promotional credits, where granted, expire on a clock xAI sets. Rates and terms sit in [the console's billing documentation](https://docs.x.ai/console/faq/billing).

## Creating it in the console

1. Go to [console.x.ai/team/default/api-keys](https://console.x.ai/team/default/api-keys).
2. Create the key from the **API Keys** page ([xAI's own tutorial](https://docs.x.ai/docs/tutorial)).
3. Copy the whole string before you leave the page.

## Getting it into Big-AGI

Open **Models** (`Ctrl + Shift + M`) and press **More Services** if the **Setup AI Models** wizard appears. Then **Add** -> **xAI**, paste into **API Key**, and press **Models** - the list filling in below is your confirmation ([add and manage your keys](/docs/connect-models)).

There is no host field here: every request goes to xAI's own endpoint.

## The monthly cap and its alerts

The console holds a monthly cap; above it, requests stop for the rest of the month. Usage alerts fire at 50, 75 and 90 percent of that cap. [Set both there](https://docs.x.ai/console/faq/billing).

## Direct Connection

Direct Connection can be turned on once the key is in the browser. It starts off.

> **Direct Connection works only with your API key stored in the browser**, and with an AI service that permits direct browser calls (CORS). Where it cannot be used, requests route through the Big-AGI fast edge servers instead - everything still works, within the standard upload size and time limits.

## Related

- [Connect an AI service](/docs/connect-models)
- [Direct Connection](/docs/feature-direct-connection)
