> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# bff.prefix

- **Type:** `string`
- **Default:** `/api`

:::tip
Please refer to the [Enable BFF](/guides/advanced-features/bff/function.md#enable-bff) section in Basic Usage to enable BFF functionality first.
:::

By default, the prefix for accessing routes in the BFF API directory is `/api`, as shown in the following directory structure:

```bash
api
└── hello.ts
```

The route corresponding to `api/hello.ts` when accessed is `localhost:8080/api/hello`.

This configuration option can modify the default route prefix:

```ts title="modern.config.ts"
export default defineConfig({
  bff: {
    prefix: '/api-demo',
  },
});
```

The corresponding route for `api/hello.ts` when accessed is `localhost:8080/api-demo/hello`.
