> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/plugins-and-integrations/unity-plugin-beta-overview/getting-started/setup/configure-api-key.md).

# Configure API Key

Add your Convai API key in Unity to enable the SDK.

## Introduction

The SDK needs your Convai API key to authenticate requests and enable character conversations.

## Prerequisites

* A Convai account
* API key from your [Convai dashboard](https://convai.com/). [(Where to find your API key)](https://docs.convai.com/api-docs/convai-playground/get-started/dashboard-overview#profile-and-settings)

## Step-by-step

{% stepper %}
{% step %}
**Open the Convai Account window in Unity**

In the Unity top menu, go to **Convai → Account**.

<figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FYQVD82ppTroSoVvKqMc0%2Fimage.png?alt=media&amp;token=adc08f5f-26ff-49a6-89ca-334042be034b" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Copy your API Key from Convai**

* Open Convai in your browser and sign in.
* Locate your **API Key** in the dashboard/profile settings.
* Copy the API key.

<figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FaAdEByWci7sv2HVasGMs%2Fimage.png?alt=media&amp;token=ce799393-6eb0-4408-96b4-e004e0f8a488" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Paste and update the key in Unity**

* Paste the key into the **API Key** field.
* Click **Update API Key**.
* **Expected result:** Account details and usage information refresh successfully.

<figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FgCkxz2NylGdVV90ZsUW6%2Fimage.png?alt=media&amp;token=a355f3fc-3624-405d-a8d1-00a58b29f037" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Troubleshooting

* **Account info doesn’t update**
  * Confirm the API key is correct (no extra spaces).
  * Check internet connection and retry.
* **You can’t find your API key**
  * Use the linked dashboard/profile documentation section.

## Conclusion

Your project is now authenticated with Convai. Next, validate the integration using **Sample Scenes** or continue with **Custom Scene Setup**.

{% hint style="info" %}
**Need help?** For questions, please visit the [**Convai Developer Forum**](https://forum.convai.com/).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/unity-plugin-beta-overview/getting-started/setup/configure-api-key.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
