---
title: "Encode via query string (short sources)"
method: GET
path: "/api/encode"
tags: ["encoding"]
---

# Encode via query string (short sources)

`GET /api/encode`

## Request

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

## Query parameters

- `text` string, required

## Response `200`

Token + ready URLs

- EncodeResponse
  - `encoded` string: PlantUML URL token
  - `token_length` integer
  - `url_ok` boolean: true when the token fits the GET URL limit (url_limit). When false the urls will answer 414 - use POST /api/render instead.
  - `url_limit` integer: Maximum token length accepted on GET ?src= URLs (16000)
  - `urls` object
    - `svg` string
    - `png` string
  - `warning` string: Present only when url_ok is false

---

[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)
