---
title: How to pass inputs to a workflow
sidebarTitle: Pass inputs to a workflow
---

### Define workflow inputs

Define the inputs to a workflow by adding parameters to the function definition.

```python
from prefect import flow


@flow
def my_workflow(name: str = "World"):
    return f"Hello, {name}!"
```

Pass arguments to the function call to provide inputs to the workflow.

{/* pmd-metadata: continuation */}
```python
my_workflow(name="Marvin")
```

### Validate inputs

By default, Prefect will validate the types of inputs to your workflow.

{/* pmd-metadata: notest */}
```python
from prefect import flow


@flow
def my_workflow(name: str = "World"):
    return f"Hello, {name}!"

my_workflow(name=1) # This will fail with a type validation error
```

To turn off type validation, set the `validate_parameters` parameter to `False`:

```python
from prefect import flow


@flow(validate_parameters=False)
def my_workflow(name: str = "World"):
    return f"Hello, {name}!"

my_workflow(name=1)
```

If you use `pydantic`, parameters typed with a `BaseModel` subclass will be coerced to the appropriate types and validated.

{/* pmd-metadata: notest */}
```python
from prefect import flow
from pydantic import BaseModel


class Model(BaseModel):
    a: int
    b: str


@flow
def flow_that_validates_parameters(model: Model): ...

flow_that_validates_parameters(
    model={"a": "WRONG", "b": "fine"}
)
```

