Skip to main content
Your API key is used to authenticate requests to the Moru API. You can use it with the SDK or set it as an environment variable.

Getting Your API Key

  1. Go to Dashboard > API Keys
  2. Click Create API Key
  3. Copy your API key
Keep your API key secure. Do not expose it in client-side code or commit it to version control.

Using the API Key

Set the MORU_API_KEY environment variable. The SDK will automatically use it.
export MORU_API_KEY=your_api_key_here
Then use the SDK without passing the key:
from moru import Sandbox

sandbox = Sandbox.create()

Inline (Direct)

You can also pass the API key directly to the SDK:
from moru import Sandbox

sandbox = Sandbox.create(api_key="your_api_key_here")

Next Steps