# run()

Canonical URL: https://developers.iagenify.com/sdk/ref/workflow/run/
Language: en

`workflow.run({ input }) → Promise<WorkflowRun>`

Starts a run and returns it immediately. The run continues on the platform whether or not your process does.

Status: returns at once · input feeds the templates · survives your process

```javascript
const run = await workflow.run({ input: { since: "2026-10-01", channel: "ops" } });

console.log(run.id, run.data.status);   // "running"
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `input` | object | {} | Feeds the `{{input.…}}` templates. Any shape you like. |

## It does not wait {#async}

The run is started and handed back. To follow it, call [wait()](/sdk/ref/workflow-run/wait), or keep the identifier and pick it up later with [getRun()](/sdk/ref/workflows/get-run).

```javascript
const run = await workflow.run({ input });
await run.wait();                      // until it finishes, or waits for a human

if (run.data.status === "waiting") {
  const step = run.data.steps.find((s) => s.status === "waiting");
  await run.resume(step.id, { approved: true });
}
```

## input is the only thing a run takes {#input}

> **Everything else is in the definition**
>
> Models, storages, prompts and addresses are fixed when the workflow is saved. That is the point: a run with nobody watching should not be able to be told, at launch, to do something different.

## Other ways a run starts {#triggers}

| Trigger | Started by |
| --- | --- |
| `manual` | this call |
| `cron` | the schedule |
| `webhook` | an inbound request |
| `mail` | a message arriving |

All four produce the same kind of run, and `input` is filled from whatever started it.

## What a run costs {#cost}

Whatever its steps cost — model calls, searches, fetches, conversions, media. Each step reports its own credits, and the run carries the total.

- [WorkflowRun](/sdk/ref/workflow-run): Following, approving, retrying.
- [Trigger · cron](/sdk/workflows/triggers/cron): Running it on a schedule.

```python
run = workflow.run(input={"since": "2026-10-01", "channel": "ops"})

print(run.id, run.data["status"])   # "running"
```

```python
run = workflow.run(input=payload)
run.wait()                     # until it finishes, or waits for a human

if run.data["status"] == "waiting":
    step = next(s for s in run.data["steps"] if s["status"] == "waiting")
    run.resume(step["id"], {"approved": True})
```
