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

# Pre-requisites

> Get your Nevermined API Key to use the Payment libraries and REST API

To interact with Nevermined programmatically, you need a **Nevermined API Key**. This key is required for both:

* **Payment Libraries** (TypeScript SDK and Python SDK)
* **REST API** (direct HTTP calls)

## Get Your API Key

Open [nevermined.app](https://nevermined.app), sign in, then go to **Settings > Global NVM API Keys** and click **+ New API Key**. Copy the key and set it as an environment variable:

```bash theme={null}
export NVM_API_KEY="sandbox:your-api-key-here"
```

<Warning>
  Keep your API key secure. Do not commit it to version control or share it
  publicly.
</Warning>

## Choose Your Environment

Nevermined offers two environments:

| Environment | Purpose                 | Network      |
| ----------- | ----------------------- | ------------ |
| **Sandbox** | Testing and development | Base Sepolia |
| **Live**    | Production              | Base Mainnet |

<Tabs>
  <Tab title="TypeScript SDK">
    ```typescript theme={null}
    import { Payments } from '@nevermined-io/payments'

    const payments = Payments.getInstance({
      nvmApiKey: process.env.NVM_API_KEY,
      environment: 'sandbox' // or 'live'
    })
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    from payments_py import Payments, PaymentOptions

    payments = Payments.get_instance(
        PaymentOptions(
            nvm_api_key=os.environ['NVM_API_KEY'],
            environment='sandbox'  # or 'live'
        )
    )
    ```
  </Tab>

  <Tab title="REST API">
    | Environment | Base URL                                    |
    | ----------- | ------------------------------------------- |
    | **Sandbox** | `https://api.sandbox.nevermined.app/api/v1` |
    | **Live**    | `https://api.live.nevermined.app/api/v1`    |

    ```bash theme={null}
    curl -X GET "https://api.sandbox.nevermined.app/api/v1/protocol/agents" \
      -H "Authorization: Bearer $NVM_API_KEY"
    ```
  </Tab>
</Tabs>

## API Versioning

Every request resolves to a pinned API version (the platform release `MAJOR.MINOR`), so your integration keeps working across releases. The pin comes from your API key (editable in the dashboard) or, per request, from the optional `Nevermined-Version` header:

```bash theme={null}
curl -X GET "https://api.sandbox.nevermined.app/api/v1/protocol/agents" \
  -H "Authorization: Bearer $NVM_API_KEY" \
  -H "Nevermined-Version: 1.0"
```

See [API Versioning](/docs/development-guide/api-versioning) for the resolution rules and compatibility guarantees, and the [API Changelog](/docs/development-guide/api-changelog) for what changed in each version.

## Next Steps

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="js" href="/docs/api-reference/typescript/installation">
    Install and use the TypeScript Payments library.
  </Card>

  <Card title="Python SDK" icon="python" href="/docs/api-reference/python/installation">
    Install and use the Python Payments library.
  </Card>
</CardGroup>
