---
title: "Compile a drag-and-drop DSL script into runnable code."
method: POST
path: "/v1/dsl/compile"
---

# Compile a drag-and-drop DSL script into runnable code.

`POST /v1/dsl/compile`

## Request

- Base URL: `http://127.0.0.1:10108`
- URL: `http://127.0.0.1:10108/v1/dsl/compile`
- Auth: HTTP bearer

Compiles a DSL script into Playwright or Puppeteer TypeScript and returns the code with any warnings. Nothing is saved and no browser is opened: it only shows what the script would become.

## Request body

- object
  - `dsl` object, required: DSL script body
  - `target` string, required

## Response `200`

The generated TypeScript, with compiler warnings.

- object
  - `code` string, required
  - `nodeCount` integer, required
  - `target` string, required
  - `warnings` string[], required

## Other responses

- `400`: `dsl` or `target` is missing, the DSL does not parse, or the target is not playwright or puppeteer.
- `401`: No bearer token, or not a token this app issued. The body is empty: it never says which.
- `403`: Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.
- `500`: Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

---

[API](https://skmtc.dev/veilus/apis/veilus-local-api.md) · [All operations](https://skmtc.dev/veilus/apis/veilus-local-api/llms.txt) · [OpenAPI document](https://skmtc.dev/veilus/apis/veilus-local-api/revisions/67ac3818f9d2?raw)
