The simplest way to create a short link programmatically. No account, no API key, no configuration — one request in, a short link out. Ideal for scripts, bots, and side projects.
POST https://in.bio/api/shorten
Request
Send a JSON (or form-encoded) body with a single field.
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | The destination to shorten. Max 2048 characters; https:// is assumed when the scheme is omitted. |
curl -X POST https://in.bio/api/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/link"}'const res = await fetch("https://in.bio/api/shorten", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com/very/long/link" }),
});
const { short_url } = await res.json();import requests
r = requests.post(
"https://in.bio/api/shorten",
json={"url": "https://example.com/very/long/link"},
)
short_url = r.json()["short_url"]$ch = curl_init("https://in.bio/api/shorten");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["url" => "https://example.com/very/long/link"]),
CURLOPT_RETURNTRANSFER => true,
]);
$short_url = json_decode(curl_exec($ch), true)["short_url"];Response
201 Created — the short link plus everything you need to use, preview, or
claim it.
{
"short_url": "https://in.bio/a8K2p",
"slug": "a8K2p",
"qr_url": "https://in.bio/a8K2p.png",
"preview_url": "https://in.bio/preview/a8K2p",
"claim_url": "https://in.bio/register?claim=…",
"expires": "Unclaimed anonymous links are removed after a year of inactivity. Claim it with a free account to keep it and see click analytics.",
"docs": "https://docs.in.bio/api/free-shorten"
}| Field | Type | Description |
|---|---|---|
short_url |
string | The ready-to-share short link. |
slug |
string | The link’s short code. |
qr_url |
string | A ready-to-use PNG QR code for the link — append .svg for a vector version. |
preview_url |
string | A safe preview page showing where the link goes before redirecting. |
claim_url |
string | Sign-up link that attaches this link to a new free account. |
expires |
string | Human-readable retention note for the anonymous link. |
Errors
Errors return a single error string with the matching status code.
| Status | When |
|---|---|
422 Unprocessable Entity |
Invalid or unsafe URL — a blocked destination, a private/loopback address, or an already-shortened link. |
429 Too Many Requests |
Rate limit reached. Check the Retry-After header and retry after the window. |
{ "error": "That URL cannot be shortened." }Rate limits & rules
- 5 requests per minute per IP, and 100 links per day per IP.
- Links are anonymous — they redirect immediately, but can’t be edited or
tracked, and unclaimed links are removed after a year of inactivity unless
claimed via
claim_url. - Every destination runs through the same phishing & malware safety scan as the rest of INBIO; unsafe URLs are rejected.