| title | description |
|---|---|
API Key |
Authenticate with Moru using your API key |
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.
- Go to Dashboard > API Keys
- Click Create API Key
- Copy your API key
Set the MORU_API_KEY environment variable. The SDK will automatically use it.
export MORU_API_KEY=your_api_key_hereThen use the SDK without passing the key:
```python Python from moru import Sandboxsandbox = Sandbox.create()
```javascript JavaScript
import Sandbox from '@moru-ai/core'
const sandbox = await Sandbox.create()
You can also pass the API key directly to the SDK:
```python Python from moru import Sandboxsandbox = Sandbox.create(api_key="your_api_key_here")
```javascript JavaScript
import Sandbox from '@moru-ai/core'
const sandbox = await Sandbox.create({ apiKey: 'your_api_key_here' })