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

# Authentication

> Learn how to obtain and configure your Narada API Key

## Authentication with the Narada SDK

The Narada Python SDK uses API key authentication to securely access the Narada platform.

<Info>
  The SDK automatically manages browser windows and extension communication,
  eliminating the need for manual Browser Window ID management.
</Info>

## API Key

An API Key is required to authenticate your requests to the Narada platform. This key identifies your account and authorizes access to all SDK functionality.

### How to Obtain Your API Key

<Steps>
  <Step title="Navigate to Billing Page">
    Go to the Narada billing page to create an API key:

    <Card title="Go to Narada Billing Page" icon="credit-card" href="https://app.narada.ai/billing" />
  </Step>

  <Step title="Create API Key">
    Click on **Create API Key** and follow the prompts.

    <video autoPlay muted loop playsInline className="w-full h-full aspect-video rounded-xl" src="https://mintcdn.com/naradaai/V_hKSzoFuGmkr-Yj/videos/apikey.mp4?fit=max&auto=format&n=V_hKSzoFuGmkr-Yj&q=85&s=6a2cc7b3faee71b1b522e1f4bc91a122" data-path="videos/apikey.mp4" />
  </Step>

  <Step title="Save Your API Key">
    The SDK automatically reads your API key from the `NARADA_API_KEY` environment variable. Set it up using one of these methods:

    <Tabs>
      <Tab title="Environment Variable">
        **Set the environment variable** (recommended):

        ```bash theme={null}
        export NARADA_API_KEY=your-api-key-here
        ```

        <Check>
          The SDK will automatically detect and use this environment variable.
        </Check>
      </Tab>

      <Tab title="Python Code">
        **Pass directly to the SDK** (for testing):

        ```python theme={null}
        import asyncio

        from narada import Agent, BrowserEnvironment

        async def main() -> None:
            env = BrowserEnvironment(api_key="your-api-key-here")
            agent = Agent(environment=env)

            try:
                response = await agent.run(prompt="Say hello from Narada.")
                print(response.text)
            finally:
                await env.close()

        if __name__ == "__main__":
            asyncio.run(main())
        ```

        <Warning>
          This method is not recommended for production use. Use environment variables instead.
        </Warning>
      </Tab>
    </Tabs>
  </Step>
</Steps>
