# Variable: INK_DEV_API_TEXT_REPLACES (/pixi-vn-ink/vite/variables/INK_DEV_API_TEXT_REPLACES)



\> `const` **INK_DEV_API_TEXT_REPLACES**: `"/__pixi-vn-ink/text-replaces"` = `"/__pixi-vn-ink/text-replaces"`

Defined in: [src/vite/costants.ts:43](https://github.com/DRincs-Productions/pixi-vn-ink/blob/5604a832025db23627dcf27e489490f9e7743d04/src/vite/costants.ts#L43)

Dev-server endpoint that exposes and accepts the list of registered
TextReplaces handlers as [InkTextReplaceInfo](/pixi-vn-ink/vite/interfaces/InkTextReplaceInfo) objects.

* `GET  /__pixi-vn-ink/text-replaces` – returns the stored `InkTextReplaceInfo[]` as JSON.
* `POST /__pixi-vn-ink/text-replaces` – replaces the stored list with the JSON body
  (`InkTextReplaceInfo[]`). Called automatically by setupInkHmrListener on
  startup and after each HMR update.
* `InkTextReplaceInfo.validation` serializes the original validation rule:
  * `{ type: "regexp", source, flags }`
  * `{ type: "zod", schema }` (JSON Schema generated from Zod)
  * `{ type: "literal", value }` for string modes like `"all"` / `"characterId"`

## Example [#example]

```ts
// VS Code extension reading the registered text-replace handlers
const res = await fetch("http://localhost:5173/__pixi-vn-ink/text-replaces");
const replaces: InkTextReplaceInfo[] = await res.json();
```
