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

# Development vs Production Environments

> Metorial uses instances to separate your development and production environments, allowing you to test safely before deploying to production.

<Note>
  **What you'll learn:**

  * The difference between development and production instances
  * How to work across environments
  * Best practices for environment management

  **References:**

  * [Projects and Organizations](/concepts-projects-organizations)
</Note>

## Understanding Instances

An **instance** represents an isolated environment within your project. Each instance has its own:

* Provider deployments
* API keys
* Provider auth configs
* Logs and metrics

<Info>
  Changes in one instance don't affect others, allowing you to test in isolation.
</Info>

## Instance Types

### Development Instance

Your default workspace for building and testing.

### Production Instance

Your live environment for real users and applications.

## Working Across Environments

### Switching Instances

In the Metorial dashboard, use the instance dropdown in the navigation to switch between environments.

### Separate API Keys

Use different API keys for each instance:

<CodeGroup>
  ```typescript TypeScript theme={null}
  // Development
  let devMetorial = new Metorial({
      apiKey: process.env.METORIAL_DEV_KEY
  });

  // Production
  let prodMetorial = new Metorial({
      apiKey: process.env.METORIAL_PROD_KEY
  });
  ```

  ```python Python theme={null}
  import os
  from metorial import Metorial

  # Development
  dev_metorial = Metorial(api_key=os.getenv("METORIAL_DEV_KEY"))

  # Production
  prod_metorial = Metorial(api_key=os.getenv("METORIAL_PROD_KEY"))
  ```
</CodeGroup>

<Info>
  **Best Practices**

  **Never share credentials**: Use separate API keys and OAuth apps for each environment.

  **Test before production**: Always test deployments in development before using in production.

  **Access control**: Limit production access to necessary team members.
</Info>

## What's Next?

<CardGroup cols={2}>
  <Card title="Monitoring Guide" icon="chart-line" href="/concepts-monitoring">
    Learn how to monitor your deployments.
  </Card>

  <Card title="Integrations Overview" icon="plug" href="/integrations-overview">
    Choose integrations for an environment.
  </Card>
</CardGroup>
