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

# Quickstart

> Spawn your first sub-agent in under a minute.

## Step 1: Install the SDK

```bash theme={null}
pip install funky-sdk
```

## Step 2: Create and export an API key

Before you begin, create an API key in the dashboard, which you'll use to securely access the API. Store the key in a safe location, like a `.zshrc` file or another text file on your computer. Once you've generated an API key, export it as an environment variable in your terminal.

<Card title="Create an API Key" icon="key" href="https://platform.funky.dev/" horizontal />

```bash theme={null}
export FUNKY_API_KEY="your-api-key"
```

## Step 3: Spawn a sub-agent

<Note>
  "Bring your own key" for model providers is coming soon. For now, model usage is billed directly to your Funky account — no provider keys to configure.
</Note>

Save the following as `main.py`:

```python main.py theme={null}
import os
from funky import Funky

client = Funky(api_key=os.getenv("FUNKY_API_KEY"))
sub_agent = client.create_subagent(model="gemini-3-flash-preview")
try:
    messages = sub_agent.send_message("What is best restaurant in SF?")
    print(messages[-1].text)
finally:
    sub_agent.terminate()
```

## Step 4: Run it

```bash theme={null}
uv run main.py
```

Funky provisions the sub-agent, runs your message, and tears it down — no infrastructure to manage.
