openshrtr for AI agents
openshrtr shortens links and judges every click: a person or a machine. An AI agent can open an account with one API request and get a key, free within published limits, with no email and no human. With the key it creates short links and reads how many clicks came from people the analyzer confirmed and how many from machines.
The API lives at https://openshrtr.com/api/v1. It is JSON over HTTPS with a key in the Authorization header. These instructions are also at https://openshrtr.com/agents, in Markdown at https://openshrtr.com/llms.txt and as OpenAPI 3.1 at https://openshrtr.com/openapi.json.
What it is for
- Short links for messages, posts, emails or campaigns an agent sends or publishes.
- Seeing how many clicks on a link came from confirmed people and how many from scanners, link previews and scripts, for example to check traffic a provider reports.
What it is not
- It does not measure delivery: a click is seen only when someone opens the link.
- It does not prove a purchase, a sign-up or any action after the click: the service sees the click and its own check page, not the target site.
- "Human" means the analyzer found enough evidence of a real device used by a person. It is not an identity check, and no accuracy figure is claimed.
- Confirmed humans are a lower bound: a click whose check did not finish gets no verdict and is not counted as human.
How a click is judged
A short link does not redirect at once. It opens a thin check page that runs a script for up to 1.5 seconds, collects device and behavior signals, and then sends the visitor on: people to the target, machines to the decoy when there is one.
The analyzer turns the signals into a verdict (human, machine or unclear) with the evidence for each side. A client that does not run JavaScript gets no verdict; the page sends it to the decoy if there is one, otherwise to the target.
Opening a short link with curl returns the check page (HTTP 200), not a redirect, and the click is counted under machines because curl names itself in its User-Agent. A click by a person on a phone or a computer is what fills the humans counter.
A test click of your own, with curl or any other client, stays in the counters: single clicks cannot be removed, only the whole link with all its clicks.
During the check the visitor's browser also sends a request to api4.ipify.org and api6.ipify.org to learn its own IPv4 and IPv6 addresses.
Quick start
- Create an account and get a key. The answer holds
api_key(shown once) and a 12-wordphrasefor the dashboard. The next steps read the key from a variable:export OPENSHRTR_API_KEY=sk_….curl -s -X POST https://openshrtr.com/api/v1/agents \ -H "Content-Type: application/json" \ -d '{"name": "my-agent"}' - Create a short link. The answer holds
url, the short address to share, andcode. The next step reads the code from a variable:export LINK_CODE=….curl -s -X POST https://openshrtr.com/api/v1/links \ -H "Authorization: Bearer $OPENSHRTR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"target": "https://example.com/page"}' - Read the counters.
counts.humansis clicks confirmed as people;counts.machines,counts.unclearandcounts.no_verdictare the rest. A recent click where the check ran carries its evidence; for the others any machine sign is insignals.curl -s https://openshrtr.com/api/v1/links/$LINK_CODE \ -H "Authorization: Bearer $OPENSHRTR_API_KEY"
Authentication
Every request except GET /api/v1 and POST /api/v1/agents needs the key, as Authorization: Bearer sk_… or as X-API-Key: sk_…. Cookies are not accepted.
Whoever holds the key controls the account. If it leaks, POST /api/v1/key/rotate replaces it. A lost key cannot be recovered.
Browsers may call the API from any site: answers carry Access-Control-Allow-Origin: *.
Endpoints
GET /api/v1 — What this API is
A short pointer: the service, whether agent sign-up is open, and where the documentation is. No key needed.
Key: not needed.
curl -s https://openshrtr.com/api/v1Answer 200:
{
"service": "openshrtr",
"about": "Short links that tell a human from a bot.",
"signup_open": true,
"signup": "POST https://openshrtr.com/api/v1/agents",
"docs": {
"html": "https://openshrtr.com/agents",
"markdown": "https://openshrtr.com/llms.txt",
"openapi": "https://openshrtr.com/openapi.json"
}
}Errors: rate_limited.
POST /api/v1/agents — Create an agent account and a key
One request, no key, no email. The answer holds the API key and a 12-word phrase; both are shown only once, the service keeps only their hashes.
The key and the phrase are secrets: they belong out of logs, out of replies to users and out of public places. Whoever holds either of them controls the account.
From one address: 3 sign-ups in a row, then one every 10 minutes. For the whole service: 300 new agent accounts per UTC day.
Key: not needed.
Body (JSON):
name(optional): How the agent calls itself, up to 80 characters. Shown to the service administrator as plain text; control characters are removed.
curl -s -X POST https://openshrtr.com/api/v1/agents \
-H "Content-Type: application/json" \
-d '{"name": "my-agent"}'Answer 201:
{
"api_key": "sk_q8Xv2mN4pL6tR9wY1zA3cE5gJ7kM0oQs",
"phrase": "orbit sauce timber glow minute vessel cradle eager throw lunar quote spike",
"account": {
"label": "key:1a2b3c4d",
"name": "my-agent",
"origin": "agent",
"created_at": "2026-11-26T10:00:00.000Z"
},
"limits": {
"links_per_account": 100,
"new_links_per_hour": 60,
"requests_per_minute": 120
},
"docs": "https://openshrtr.com/agents",
"sign_in": "https://openshrtr.com/login"
}Errors: invalid_json, invalid_request, body_too_large, signup_paused, rate_limited, daily_signup_limit.
GET /api/v1/me — The account, its limits and usage
Who the key belongs to, how many links the account holds and the limits in force.
Key: required.
curl -s https://openshrtr.com/api/v1/me \
-H "Authorization: Bearer $OPENSHRTR_API_KEY"Answer 200:
{
"account": {
"label": "key:1a2b3c4d",
"name": "my-agent",
"origin": "agent",
"created_at": "2026-11-26T10:00:00.000Z"
},
"links": {
"used": 1,
"limit": 100
},
"limits": {
"links_per_account": 100,
"new_links_per_hour": 60,
"requests_per_minute": 120
}
}Errors: missing_api_key, invalid_api_key, conflicting_api_keys, rate_limited.
POST /api/v1/links — Create a short link
Every link opens the check page first (the deep check is always on), so each click gets a verdict when the visitor's browser runs the page script.
The account holds up to 100 links (deleting one frees a place; disabling does not) and creates up to 60 links an hour.
Key: required.
Body (JSON):
target(required): Where people are sent: an http or https address up to 2048 characters, without a user name or password, not on this service's own domains. Without a scheme, https:// is assumed.title(optional): Your label, up to 200 characters.domain(optional): Short domain for the link, one ofshrtr.win,openshrtr.com; by defaultshrtr.win.decoy(optional): Where machines are sent instead of the target: an http or https address without a user name or password, or "rickroll" for a harmless video. Omit for no decoy: then machines reach the target too.
curl -s -X POST https://openshrtr.com/api/v1/links \
-H "Authorization: Bearer $OPENSHRTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"target": "https://example.com/page"}'Answer 201:
{
"code": "k7Qm2x",
"url": "https://shrtr.win/k7Qm2x",
"target": "https://example.com/page",
"title": null,
"decoy": null,
"active": true,
"created_at": "2026-11-26T10:00:00.000Z",
"last_click_at": null,
"counts": {
"clicks": 0,
"humans": 0,
"human_devices": 0,
"machines": 0,
"unclear": 0,
"no_verdict": 0
}
}Errors: missing_api_key, invalid_api_key, invalid_json, invalid_request, invalid_target, invalid_decoy, invalid_domain, body_too_large, link_limit_reached, rate_limited.
GET /api/v1/links — List your links with counters
All links of the account, newest first, each with its counters.
Key: required.
curl -s https://openshrtr.com/api/v1/links \
-H "Authorization: Bearer $OPENSHRTR_API_KEY"Answer 200:
{
"links": [
{
"code": "k7Qm2x",
"url": "https://shrtr.win/k7Qm2x",
"target": "https://example.com/page",
"title": null,
"decoy": null,
"active": true,
"created_at": "2026-11-26T10:00:00.000Z",
"last_click_at": "2026-11-26T12:30:00.000Z",
"counts": {
"clicks": 12,
"humans": 7,
"human_devices": 6,
"machines": 3,
"unclear": 1,
"no_verdict": 1
}
}
]
}Errors: missing_api_key, invalid_api_key, rate_limited.
GET /api/v1/links/{code} — One link: counters, days, recent clicks
Counters, the last 30 UTC days (oldest first, today included) and up to 100 latest clicks, each with its group, machine signs and, where the check ran, the verdict, confidence and evidence. Visitor addresses are never returned.
A code that does not exist and a code of another account get the same 404.
Key: required.
curl -s https://openshrtr.com/api/v1/links/$LINK_CODE \
-H "Authorization: Bearer $OPENSHRTR_API_KEY"Answer 200:
{
"link": {
"code": "k7Qm2x",
"url": "https://shrtr.win/k7Qm2x",
"target": "https://example.com/page",
"title": null,
"decoy": null,
"active": true,
"created_at": "2026-11-26T10:00:00.000Z",
"last_click_at": "2026-11-26T12:30:00.000Z",
"counts": {
"clicks": 12,
"humans": 7,
"human_devices": 6,
"machines": 3,
"unclear": 1,
"no_verdict": 1
}
},
"daily": [
{
"date": "2026-11-26",
"clicks": 12,
"humans": 7,
"machines": 3,
"unclear": 1,
"no_verdict": 1
}
],
"recent_clicks": [
{
"at": "2026-11-26T12:30:00.000Z",
"kind": "human",
"verdict": "human",
"confidence": 85,
"evidence": {
"for_machine": [],
"for_human": [
"Time zone Europe/Berlin",
"Screen 390x844 @3x"
]
},
"signals": {
"declared_bot": false,
"scanner": false,
"burst": false
},
"engine": "2026.11.25",
"country": "Germany",
"country_code": "DE",
"device": "mobile",
"os": "iOS",
"browser": "Safari",
"referrer_host": null
}
]
}Errors: missing_api_key, invalid_api_key, not_found, rate_limited.
PATCH /api/v1/links/{code} — Turn a link off or on
{"active": false} makes the link answer "Link not found" to visitors; true turns it back on. Counters stay.
Key: required.
Body (JSON):
active(required): true to turn the link on, false to turn it off.
curl -s -X PATCH https://openshrtr.com/api/v1/links/$LINK_CODE \
-H "Authorization: Bearer $OPENSHRTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"active": false}'Answer 200:
{
"code": "k7Qm2x",
"url": "https://shrtr.win/k7Qm2x",
"target": "https://example.com/page",
"title": null,
"decoy": null,
"active": false,
"created_at": "2026-11-26T10:00:00.000Z",
"last_click_at": "2026-11-26T12:30:00.000Z",
"counts": {
"clicks": 12,
"humans": 7,
"human_devices": 6,
"machines": 3,
"unclear": 1,
"no_verdict": 1
}
}Errors: missing_api_key, invalid_api_key, invalid_json, invalid_request, not_found, rate_limited.
DELETE /api/v1/links/{code} — Delete a link
Deletes the link together with all its clicks. This cannot be undone.
Key: required.
curl -s -X DELETE https://openshrtr.com/api/v1/links/$LINK_CODE \
-H "Authorization: Bearer $OPENSHRTR_API_KEY"Answer 200:
{
"deleted": "k7Qm2x"
}Errors: missing_api_key, invalid_api_key, not_found, rate_limited.
POST /api/v1/key/rotate — Replace the key
Issues a new key for the same account. The old key stops working at once. The new key is shown only in this answer.
Key: required.
curl -s -X POST https://openshrtr.com/api/v1/key/rotate \
-H "Authorization: Bearer $OPENSHRTR_API_KEY"Answer 200:
{
"api_key": "sk_N3wKeyN3wKeyN3wKeyN3wKeyN3wKeyN3"
}Errors: missing_api_key, invalid_api_key, rate_limited.
Counters
| Field | Meaning |
|---|---|
clicks | Every recorded click on the link. |
humans | Clicks the analyzer confirmed as a person. The same number the dashboard shows as Humans. |
human_devices | Distinct devices among the confirmed humans (by device fingerprint). |
machines | Clicks that are not confirmed humans and carry a machine sign: a User-Agent that names a bot or a tool, a data-center address, a burst, or the analyzer's machine verdict. |
unclear | The analyzer ran but found neither a machine sign nor enough evidence of a person. |
no_verdict | The check did not finish (no JavaScript, the visitor left early, a prefetch) and no machine sign was seen. |
clicks = humans + machines + unclear + no_verdict. Each click is in exactly one group, and the group of a click is its kind.
No rates are computed. humans divided by clicks is the share of recorded clicks confirmed as people; it is not a delivery rate and not a conversion rate.
Each click in recent_clicks has a kind:
human: The analyzer confirmed a person on a real device.machine: A machine sign: declared bot, data-center address, burst, or the analyzer's machine verdict.unclear: The analyzer ran, found no machine sign and not enough evidence of a person.no_verdict: The check did not finish and no machine sign was seen.
Fields of a click:
at: When the click happened (ISO 8601, UTC).kind: The group the click is counted in.verdict: The analyzer's own verdict, or null when the check did not finish.confidence: How sure the analyzer is of its verdict, 0 to 100, or null. Not an accuracy figure.evidence: What the analyzer found on each side. Both lists are empty when the check did not run (for example a click by curl); then any machine sign is in signals.signals: Machine signs recorded by the server.engine: Version of the detection rules that judged the click, or null.country: Country by address, or null.country_code: ISO 3166-1 alpha-2 country code, or null.device: Device class from the User-Agent, or null.os: Operating system from the User-Agent, or null.browser: Browser from the User-Agent, or null.referrer_host: The site the visitor came from, or null for a direct open.
Limits
- Sign-up: 3 accounts in a row from one address, then one every 10 minutes; 300 new agent accounts per UTC day for the whole service.
- Links: up to 100 per account; up to 60 new links an hour.
- Requests: 120 a minute per key; 600 a minute per address for all keys together (agents behind one cloud address share it).
- Idle accounts: an agent account without links whose key has not been used for 30 days is deleted.
- Price: none. There is no paid plan and no card; these limits are the offer.
Errors
Errors come as JSON: {"error": "...", "code": "...", "docs": "https://openshrtr.com/agents#errors"}. error is for people, code is stable.
Requests over a limit get 429 with a Retry-After header in seconds. Limits are checked before any other work, so a refused request changes nothing.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_json | The body is not valid JSON. |
| 400 | invalid_request | A field is missing or has the wrong type; the error text names it. |
| 400 | invalid_target | target is not an http or https address, carries a user name or password (user@host), is longer than 2048 characters, or points to this service. |
| 400 | invalid_decoy | decoy is not an http or https address (or "rickroll"), or carries a user name or password. |
| 400 | invalid_domain | domain is not one of shrtr.win, openshrtr.com. |
| 400 | conflicting_api_keys | Authorization and X-API-Key carry two different keys. |
| 401 | missing_api_key | No key in the request. |
| 401 | invalid_api_key | The key is unknown, replaced, malformed, or its account is disabled. |
| 403 | link_limit_reached | The account already holds 100 links; delete one to make room. |
| 403 | signup_paused | Agent sign-up is paused; keys already issued keep working. |
| 404 | not_found | No such endpoint, or no link with this code in your account. |
| 405 | method_not_allowed | The endpoint exists but not with this method; the Allow header lists the methods. |
| 413 | body_too_large | The body is larger than 8 KB. |
| 429 | rate_limited | Too many requests; the Retry-After header says how many seconds to wait. |
| 429 | daily_signup_limit | The service has reached 300 new agent accounts today; Retry-After points to 00:00 UTC. |
| 500 | server_error | Something failed on our side. |
Rules of use
- No phishing, no malware, no spam. Links like that, and the accounts behind them, are disabled without notice.
- No uptime guarantee and no promise to keep data. Limits may change; this page always shows the ones in force.
- Each account sees and changes only its own links.
For a person
The sign-up answer holds a 12-word phrase. A person who has it signs in at https://openshrtr.com/login, tab "Secret phrase", and sees the same links in the dashboard with the full click breakdown.
The phrase cannot be recovered, and whoever holds it controls the account.
Machine-readable
- llms.txt: These instructions in Markdown, complete.
- openapi.json: OpenAPI 3.1 description of every endpoint.
- API index: A JSON pointer to the above.