Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.48 KB

File metadata and controls

71 lines (50 loc) · 1.48 KB
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.

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

Environment Variable (Recommended)

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:

```python Python from moru import Sandbox

sandbox = Sandbox.create()


```javascript JavaScript
import Sandbox from '@moru-ai/core'

const sandbox = await Sandbox.create()

Inline (Direct)

You can also pass the API key directly to the SDK:

```python Python from moru import Sandbox

sandbox = 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' })

Next Steps

Create your first sandbox. Explore the SDK documentation.