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

# Use your own OpenAI key

> Save your OpenAI key in Secrets to have OpenAI bill you for your websites’ AI instead of your credits.

If you have your own OpenAI account, your websites can call OpenAI with your key. OpenAI then bills you directly, and those calls don’t show in AI or use your [credits](/help/glossary#credit).

Your key goes in Security’s **Secrets**, with the other private values your website’s code uses, called [secrets](/help/glossary#secret). All your foundable’s websites share the same secrets, so they all use your key.

Ted can do this for you: ask him to use your own OpenAI key, and he shows a card to paste it in.

## Before you start

You need a key from your OpenAI account. Only the owner or an admin can save it.

**1. Open your key settings**

In Build, press **Tools**, then **AI**. Under **Settings**, press **Your OpenAI key**. Security’s **Secrets** opens.

**2. Add your key**

Press **Add secret** and name it `OPENAI_API_KEY`. Paste your OpenAI key into **Value**, then press **Save**.

## Check that it worked

A note confirms you saved your key. Your websites use it from their next request, the preview included.

In AI, the status now says your own key is in use. **Settings** says your website’s code picks the model.

## If something goes wrong

> **“Only the owner or an admin can add or change them.”**
>
> Your role can’t save secrets. Ask the owner or an admin to add the key for you.

> **“Couldn’t save OPENAI\_API\_KEY.”**
>
> Your key didn’t save, and the note says why. Press **Save** to try again.

## FAQ

> **How do I go back to paying with credits?**
>
> Delete `OPENAI_API_KEY` in **Secrets**. From their next request, your websites’ AI runs on Foundable AI again, and your credits pay for it. See [Add your website’s secret keys](/build/secrets).

> **Do I need an OpenAI account for my website’s AI?**
>
> No. Without one, your website’s AI runs on [Foundable AI](/help/glossary#foundable-ai) and your credits pay for it. See [Check your website’s AI and limit its spending](/build/website-ai).

## Related

> **[Check your website’s AI and limit its spending](/build/website-ai)**
>
> See what your website’s AI answered and spent.

> **[Add your website’s secret keys](/build/secrets)**
>
> Add, replace or delete the keys your websites use.


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