# Source: https://vitest.dev/api.md

# Source: https://vitest.dev/config/browser/api.md

# Source: https://vitest.dev/config/api.md

---
url: /config/api.md
---

# api

* **Type:** `boolean | number`
* **Default:** `false`
* **CLI:** `--api`, `--api.port`, `--api.host`, `--api.strictPort`

Listen to port and serve API for [the UI](/guide/ui) or [browser server](/guide/browser/). When set to `true`, the default port is `51204`.