> ## 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.

# Run a Function

> Invoke a published Function through Sutro Batch or copy its prompt.

# Run a Function

Open **Integrate** on a ready Function to see code snippets generated from its input
schema. Published Functions currently run as asynchronous Batch jobs.

## Install and authenticate

```bash theme={null}
pip install sutro
export SUTRO_API_URL="https://your-sutro-deployment.example.com"
export SUTRO_API_KEY="sk_..."
```

Create a deployment key in the app's **API Keys** panel. You can persist the
same values with `sutro login`.

## Submit rows

The dictionary keys must match the Function's configured input fields.

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

job_id = so.batch_run_function(
    name="support-escalation",
    data=[
        {"text": "The customer asks to reset a password."},
        {"text": "The customer reports an unrecognized charge."},
    ],
)

results = so.await_job_completion(job_id)
print(results)
```

`batch_run_function()` accepts a list of dictionaries, Pandas or Polars
DataFrames, local CSV or Parquet files, and HTTPS download URLs.

## Run with your own provider

The **OpenAI-compatible endpoints** section in **Integrate** provides the
optimized system prompt, output schema, and recommended model. Copy these
artifacts into your own compatible provider when you need real-time execution.
This runs the Function's exported configuration; it does not invoke the
published Function by name or use a synchronous Sutro endpoint.
