> ## Documentation Index
> Fetch the complete documentation index at: https://spatialwalk-6179c111.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API Keys

> Create and manage API credentials

API Keys are the foundation of your SpatialReal integration. They allow you to authenticate your applications and securely access SpatialReal services. In this guide, you'll learn how to create API Keys in [SpatialReal Studio](https://app.spatialreal.ai) and best practices for managing them.

## Creating an API Key

**1. Open API Keys page**

Go to [https://app.spatialreal.ai/apps](https://app.spatialreal.ai/apps).

**2. Click Create API Key**

On the API key page, click **Create API Key**.

![API Keys page](https://mintcdn.com/spatialwalk-6179c111/qnztiu5AG8MQNKy5/images/apikeystep1.png?fit=max\&auto=format\&n=qnztiu5AG8MQNKy5\&q=85\&s=23c01df67cbdccc562cfcf2cf506520c)

**3. Enter application name**

Type your **Application Name** and click **Create**.

![Click Create API Key](https://mintcdn.com/spatialwalk-6179c111/qnztiu5AG8MQNKy5/images/apikeystep2.png?fit=max\&auto=format\&n=qnztiu5AG8MQNKy5\&q=85\&s=db2b1604f0a58532853ad5f55593d6dd)

**4. Copy App ID and API Key**

In the popup, copy both **App ID** and **API Key**.

![Create app and view popup](https://mintcdn.com/spatialwalk-6179c111/qnztiu5AG8MQNKy5/images/apikeystep3.png?fit=max\&auto=format\&n=qnztiu5AG8MQNKy5\&q=85\&s=4d6716892df1a0109d01de140d52e53a)

***

## Manage your API Key

Your API Key is used to authenticate server-side requests to SpatialReal services.

> [!WARNING]
>
> **Important:** Keep your API Key secure and never expose it in client-side code or commit it to version control. Treat it like a password to prevent unauthorized access to your SpatialReal account.

**Best Practices:**

* Store your API Key in environment variables or a secrets manager
* Never expose your API Key in client-side code
* Never commit your API Key to version control

***

## Temporary Session Token

For quick testing and development, you can generate a **Temporary Session Token** directly in [SpatialReal Studio](https://app.spatialreal.ai).

> [!NOTE]
>
> Temporary Session Tokens are valid for **24 hours** only. They are intended for testing purposes and should not be used in production.

**1. Open Your Application**

Navigate to [API keys page in SpatialReal Studio](https://app.spatialreal.ai/apps), then click the details button of your application.

![Token Step 1](https://mintcdn.com/spatialwalk-6179c111/qnztiu5AG8MQNKy5/images/tokenstep1.png?fit=max\&auto=format\&n=qnztiu5AG8MQNKy5\&q=85\&s=996946de1aaaa4179b05d00b3a274882)

**2. Generate Token**

Click **Generate Temporary Token** to create a new temporary session token.

![Token Step 2](https://mintcdn.com/spatialwalk-6179c111/qnztiu5AG8MQNKy5/images/tokenstep2.png?fit=max\&auto=format\&n=qnztiu5AG8MQNKy5\&q=85\&s=58b0facb478771dc2e037d12375af4eb)

**3. Use for Testing**

Use this token in your client SDK to test avatar rendering without setting up server-side authentication.

***

## Production Authentication

In production, you should generate session tokens from your backend server using the API Key. See the [Authentication Guide](https://spatialwalk-6179c111.mintlify.site/server/auth) for implementation details.

> **[Authentication Guide](https://spatialwalk-6179c111.mintlify.site/server/auth)**
>
> Learn how to implement secure server-side authentication


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