Create shareable prompt links programmatically. No auth, no rate limits, free to use.
Create a link
POST/api/shorten
Turns a prompt into a short, shareable URL. The recipient picks their preferred AI (ChatGPT, Claude, Perplexity, Gemini, Grok) and the prompt loads automatically.
Parameters
Name
Type
Description
prompt
stringrequired
The prompt text. Max 3,000 characters.
slug
stringoptional
Custom vanity slug (2-64 chars, lowercase a-z, 0-9, hyphens). If omitted, a smart slug is auto-generated from the prompt content.
Request
curl
curl -X POST https://runprompt.link/api/shorten \
-H "Content-Type: application/json" \
-d '{"prompt": "Explain quantum computing using only cooking metaphors", "slug": "quantum-cooking"}'
400Missing prompt, invalid slug format, or prompt too long
409Slug is already taken
Check availability
GET/api/check?slug=your-slug
Check if a custom slug is available before creating a link.
Response
200 OK
{
"available": true,
"slug": "your-slug"
}
Try it
Create a link right now
Response
How it works
The prompt is base64-encoded and embedded in the URL hash fragment
A short redirect is stored in Cloudflare KV with a 1-year expiry
When someone visits the short URL, they're redirected to the full encoded URL
The prompt is decoded entirely in the browser — no server reads the prompt text
The recipient picks their AI and the prompt loads automatically
For LLMs and AI agents
If a user asks you to make a prompt shareable, create a link for a prompt, or share a prompt across AI platforms — call the API:
Example
// User: "Turn this into a shareable link"
POST https://runprompt.link/api/shorten
{ "prompt": "the user's prompt text" }
// Return the short_url to the user
Machine-readable documentation is also available at /llms.txt.