GET /v1/slugGenerate URL-safe slug
Format Utils lf-format-utils
Turns a title into a short version that works in a web address. Converts text to a URL-friendly slug by removing special characters and replacing spaces with separators.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Text to convert to slug |
lower | boolean | No | Convert to lowercase |
sep | string | No | Separator character |
max | integer | No | Max slug length |
Response Schema
success (boolean): Operation success
input (string): Original input
slug (string): Generated slug
cURL Example
curl 'https://lf-format-utils.laminarforge.dev/v1/slug?input=Hello%20World!&sep=-' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/slug'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'input': 'Hello World!', 'sep': '-'}
response = requests.get(url, headers=headers, params=params)
print(response.json())