Install
openclaw skills install tlyCreate T.LY short links through the T.LY API. Use when an agent needs to shorten a URL, generate a shareable T.LY link, return a `short_url`, or call T.LY pr...
openclaw skills install tlyTLY_API_TOKEN environment variable so the key does not get pasted into commands or logs.tly-url-shortener-api.pip install tly-url-shortener-api
export TLY_API_TOKEN="YOUR_TLY_API_TOKEN"
tly shorten --long-url "https://example.com/article"
short_url to the user.Follow this sequence:
TLY_API_TOKEN.http:// or https:// URL.tly-url-shortener-api.--output text when another command only needs the short URL string.--output json when downstream work needs structured output.Use the published SDK when the environment can install Python packages. The PyPI page describes it as a Python SDK for the T.LY URL Shortener API, with a CLI entry point named tly and Python client support. Source: PyPI package page.
CLI example:
export TLY_API_TOKEN="YOUR_TLY_API_TOKEN"
tly shorten --long-url "https://example.com/article"
Python example:
from tly_url_shortener import TlyClient
client = TlyClient(api_token="YOUR_TLY_API_TOKEN")
created = client.create_short_link(long_url="https://example.com/article")
print(created["short_url"])
Use a direct API call when the SDK/CLI is unavailable or not appropriate.
curl -X POST "https://api.t.ly/api/v1/link/shorten" \
-H "Content-Type: application/json" \
-d '{
"long_url": "https://example.com/article",
"domain": "https://t.ly/",
"api_token": "'"$TLY_API_TOKEN"'"
}'
Expected success shape:
{"short_url":"https://t.ly/40a"}
422 API key is not valid. as a credential problem.422 Domain Not Allowed as a custom-domain permission problem.429 Short link limit reached... as an account or plan limit problem.