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

# AI and X keys

> Give your customers AI and X posting through your own AI provider key and your own X developer app, plan by plan.

By default, your customers use OnlySocial's AI, paid for with AI credits, and post to X through OnlySocial's X app. In **Agency Dashboard > AI and X keys** you can set your own instead, once for your whole agency, and choose which of your plans use them.

* **Your AI key:** AI features for those customers run on your own provider account. They use no AI credits; your AI provider bills you.
* **Your X app:** those customers connect and post to X through your own X developer app. Their posts do not count towards X posts.

![An OpenAI key and an X app, both set](https://mintcdn.com/onlysocial/_kl1T5u7Oy1U4YMh/images/whitelabel/agency/keys-ai.jpg?fit=max\&auto=format\&n=_kl1T5u7Oy1U4YMh\&q=85\&s=5b10897859ed3dbd915ddc38a0fce01c)

## Your AI provider key

**1. Choose the provider**

Under **AI provider key**, choose **OpenAI**, **Claude (Anthropic)**, **Google Gemini** or **DeepSeek**.

**2. Enter the key**

Paste the **API key** from your provider. For DeepSeek you can also enter a **Base URL**.

**3. Save and check**

Click **Save and check**. The key is tested with your provider before it is saved. If the test fails, your previous key stays in place. The section then shows **Set** and the provider's name.

Every AI feature your customers use runs on this key: writing and rewriting posts, chat, hashtags, alt text, brand voice, AI replies, inbox suggestions and insights. Images, voice notes and AI Knowledge need an OpenAI key. AI Knowledge also works with Gemini.

Your key is never shown again after you save it. To change other settings and keep it, leave **API key** empty. **Remove** takes it away: your customers go back to OnlySocial's AI, paid from their own AI credits.

## Your X API app

**1. Create an app at X**

In the [X developer portal](https://developer.x.com), create an app with OAuth 2.0 turned on.

**2. Add the callback URLs**

The section lists the **Callback URL to add in your X app**: one on the app address and one on your own domain. Add both in your X app's settings.

**3. Enter the app's details**

Paste your app's **Client ID** and **Client secret**, choose your **X API plan** (the plan you pay X for), and click **Save**.

> [!WARNING]
>
> X profiles your customers connected before must be reconnected once, so they go through your app. They must be reconnected again if you change or remove the app.

**Remove** takes the app away: your customers post to X through OnlySocial's app again, and the X profiles they connected through your app must be reconnected.

## Choose which customers use them

Your keys apply plan by plan. Under **Which customers use them**, tick **Your AI key**, **Your X app** or both for each plan, then click **Save**. Each plan shows how many customers are on it.

![Plans ticked to use the agency's AI key and X app](https://mintcdn.com/onlysocial/_kl1T5u7Oy1U4YMh/images/whitelabel/agency/keys-plans.jpg?fit=max\&auto=format\&n=_kl1T5u7Oy1U4YMh\&q=85\&s=069273ba911f1dc68f97df03e38aaba1)

* A plan left unticked keeps OnlySocial's AI, with its AI credits, and OnlySocial's X app.
* A customer who connects their own AI key or X app keeps using their own.

If a section says your plan does not include your own AI key or X app, contact OnlySocial support.

## Who can change them

Your keys are credentials, like your Stripe and email settings. Your agency's owner, and team members whose role may **Edit Stripe and email credentials**, can set and remove them. Choosing which plans use them needs **Create, edit and delete plans**. See [Your team](https://api.onlysocial.io/whitelabel/team.md).


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