API

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

NameTypeDescription
prompt string required The prompt text. Max 3,000 characters.
slug string optional 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"}'

Response

201 Created
{ "slug": "quantum-cooking", "short_url": "https://runprompt.link/quantum-cooking", "full_url": "https://runprompt.link/#p=RXhwbGFpbi..." }

Status codes

201 Link created successfully
400 Missing prompt, invalid slug format, or prompt too long
409 Slug 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

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.