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

# Quickstart

> Install the Python package, configure an API key, and run your first remote function.

**1. Create an API key**

Create an API key from a workspace in the OuterProduct dashboard, then add it to your environment:

```shellscript theme={null}
export OUTERPRODUCT_API_KEY="your-api-key"
```

**2. Install the Python API from PyPI**

```shellscript uv theme={null}
uv add outerproduct
```

```shellscript pip theme={null}
pip install outerproduct
```

**3. Create an OuterProduct client**

Import the Python API and initialize an authenticated client. `op.init()` reads your API key from the `OUTERPRODUCT_API_KEY` environment variable. To use a specific deployment, pass its URL as `base_url` or set `OUTERPRODUCT_BASE_URL`.

```python theme={null}
import outerproduct as op

client = op.init()
```

**4. Run your first function**

Create a file named `quickstart.py`:

```python theme={null}
import outerproduct as op


def add(_client, a: int, b: int) -> int:
    return a + b


if __name__ == "__main__":
    client = op.init()

    run: op.Run[int] | op.Call[int] = client.run(
        fn=add,
        args=(20, 22),
        image=op.Image.from_registry("python:3.12-slim"),
    )

    print(run.wait())
```

OuterProduct imports `quickstart.py` to find `add`, so the code that submits it goes under `if __name__ == "__main__":`.

Run it locally:

```shellscript theme={null}
python quickstart.py
```

OuterProduct executes `add` in the cloud and returns:

```text theme={null}
42
```

You can also ask a coding agent to create an example for you:

```text wrap theme={null}
Write me a simple Python script that demonstrates the capabilities of the OuterProduct platform.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.