> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/key-features/headless.md).

# Headless Usage

This section covers running AugeLab Studio **without the desktop UI** via the public API class `studio.StudioScenario`.

Headless API gives huge performance boosts compared to the desktop UI, especially when running on servers without GPUs. It also allows easy integration into other Python apps/services. { % endhint %}

***

## Flows to Code

Your visiually programmed scenarios (`.pmod` files) can be run headlessly via Python code:

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-0cb916bce17f2fa3ab23af352a43db1eaa9fe4f2%2Fexample-scenario.jpg?alt=media" alt="Flows to Code" width="400"><figcaption></figcaption></figure>

Flows to Code

```python
from studio import StudioScenario
scenario = StudioScenario(verification_code="YOUR_CODE_HERE")
scenario.load_scenario("your_scenario.pmod")

while True:
    try:
        scenario.run()
    except KeyboardInterrupt:
        break
scenario.cleanup()
```

Running the saved .pmod files with python scripts gives you several benefits:

* Implementing your own dashboards and UIs
* Integrating scenarios into larger applications
* Hooking into logging system in AugeLab runtime
* Running scenarios in Docker containers (CPU/CUDA)
* Batch processing multiple inputs
* Automating runs and scheduling

and many more!
