---
title: "Validate PlantUML source without rendering an image"
method: POST
path: "/api/validate"
tags: ["render"]
---

# Validate PlantUML source without rendering an image

`POST /api/validate`

## Request

- Base URL: `https://uml.singsk.com`
- URL: `https://uml.singsk.com/api/validate`
- Auth: none declared

Cheap syntax check. 200 {ok:true, diagram_type, warnings[]} when the engine accepts the source; 422 with a machine-readable error (code, message, 1-based line/column relative to the submitted text, source_line, hint, diagram_type_detected, help link) otherwise. Use it in a generate -> validate -> fix loop before rendering.

## Request body

- ValidateRequest
  - `text` string, required

## Response `200`

Valid

- ValidationOk
  - `ok` true
  - `diagram_type` string
  - `warnings` object[]
    - `line` integer
    - `code` string
    - `message` string

## Other responses

- `422`: Invalid - structured error
- `429`: Rate limited

---

[API](https://skmtc.dev/singsk/apis/uml-singsk-com-plantuml-service-api.md) · [All operations](https://skmtc.dev/singsk/apis/uml-singsk-com-plantuml-service-api/llms.txt) · [OpenAPI document](https://skmtc.dev/singsk/apis/uml-singsk-com-plantuml-service-api/revisions/44cfa55d273f?raw)
