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

# Functions

> Run a published text Function through Sutro Batch.

# Functions

```text theme={null}
batch_run_function(
    name: str,
    data: list[dict] | polars.DataFrame | pandas.DataFrame | str,
    job_priority: int | None = 0,
    output_column: str = "inference_result",
    dry_run: bool = False,
    stay_attached: bool = False,
    job_name: str | None = None,
    description: str | None = None,
    langsmith_metadata: dict[str, Any] | None = None,
    langsmith_tags: list[str] | None = None,
    id_column: str | None = None,
) -> str | None
```

| Parameter                              | Description                                                                                                                     |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `name`                                 | Published Function name. Do not include a namespace or revision.                                                                |
| `data`                                 | `list[dict]`, Pandas/Polars DataFrame, local CSV/Parquet path, or HTTPS CSV/Parquet URL. Fields must match the Function inputs. |
| `job_priority`                         | `0` for the prototyping service level or `1` for the [one-hour production SLA](/batch/run-model#job-priority-and-sla).          |
| `output_column`                        | Result column name used by attached/result helpers.                                                                             |
| `dry_run`                              | Create a cost-estimate job instead of the full job.                                                                             |
| `stay_attached`                        | Stream progress and print a preview. Not supported for remote URLs or with LangSmith tracing.                                   |
| `job_name`, `description`              | Optional job metadata.                                                                                                          |
| `langsmith_metadata`, `langsmith_tags` | Optional trace metadata when `LANGSMITH_TRACING=true`.                                                                          |
| `id_column`                            | ID column preserved from a remote CSV/Parquet input. It must not duplicate a Function input.                                    |

```python theme={null}
import sutro as so

job_id = so.batch_run_function(
    name="support-agent-judge",
    data=[{"conversation": "Customer: ... Agent: ..."}],
)
results = so.await_job_completion(job_id)
```

The published Function supplies its prompt, model, schema, and sampling
defaults. Extra row fields are ignored, optional fields may be absent, and
values are converted to strings.

`batch_run_function()` returns a job ID, or `None` if submission fails. For large results, use
[`download_job_results()`](/reference/python-sdk/job-methods#download-large-results).

The older synchronous signature,
`run_function(name: str, input_data: dict | BaseModel, ...)`, currently raises
`NotImplementedError`; use `batch_run_function()`.

<Warning>
  Function execution through Batch is text-only. Image/PDF inputs, web search,
  tool calling, and synchronous `run_function()` are not available in Batch.
</Warning>
