> For the complete documentation index, see [llms.txt](https://docs.uncodie.com/1.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uncodie.com/1.0/agentbase/api/flow/run.md).

# Run

Token saving capabilities and recommendations

## Usage

After a function is created you can make direct usage of the function:

<mark style="color:green;">`POST`</mark> `/flow/run`

A simple token optimization involves "turning off" all unnecessary agents for the function or execution context. When the function executes, previously generated code ensures that calling /function bypasses any code generation and testing agents, allowing direct API execution.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

<table><thead><tr><th width="108">Name</th><th width="86">Type</th><th width="103" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>true</td><td>Unique identifier of the running process.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "return": {
    "message" : "message example"
  },
  "status" : {
    "code" : 1,
    "status" : "completed",
    "error": null
  },
  "error": null
}
```

{% endtab %}

{% tab title="400" %}

```
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
