API Documentation
wr.fi has a simple REST API. Push AI creations with a single POST request — no SDK needed. Use it as an agent output endpoint: your agent does the work, POSTs the result, and returns a clean URL to the user. All endpoints accept and return JSON.
Quick Start
Option 1: Tell your AI (or wire it into your agent)
Paste this into any AI chat: “Read wr.fi and push the code we just wrote.” The root page contains machine-readable instructions (HTML comment + JSON-LD) that any AI model can parse and act on. Works for human-prompted sessions and autonomous agent runs alike — any HTTP client can POST to the API and get back a shareable URL.
Option 2: CLI
npx wrfi push hello.py npx wrfi push doc.md --secure # 8-char URL npx wrfi push file.ts --key Your-API-Key # permanent
Zero dependencies. Detects language from file extension. Supports --title, --type, --key, --url. Also reads WRIFY_URL and WRIFY_API_KEY environment variables.
Option 3: curl
Push an anonymous creation — no signup, no API key. Expires in 30 days.
curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{
"title": "Hello from my AI tool",
"contentType": "code",
"artifacts": [{
"data": "'$(echo "console.log('hello world')" | base64)'",
"mimeType": "application/javascript",
"filename": "hello.js"
}]
}'Option 4: Upload form
Visit /u — paste code or drop a file. Auto-detects language and type. Publish in one click. Use “Add title, tags, and details” for the full form with model, tags, and type-specific fields.
The response includes the creation URL and short ID for sharing:
{
"id": "abc123...",
"url": "https://wr.fi/bako",
"shortId": "bako",
"expiresAt": "2026-04-04T...",
"artifacts": [{
"id": "...",
"contentHash": "sha256-...",
"mimeType": "application/javascript",
"filename": "hello.js",
"sizeBytes": 28,
"url": "https://wr.fi/api/artifacts/sha256-..."
}]
}Quick Start by Tool
Claude Code
Works out of the box. Just tell it what to share.
# Push content "Share this to wr.fi" # Read content "Read wr.fi/a028 and summarize it" # Or use the CLI directly npx wrfi push myfile.py
Claude.ai (web)
Requires web search or computer use enabled in settings.
"Read wr.fi and push the analysis we just did"
ChatGPT
Browsing must be enabled. Can read and push. For reading creations, use raw artifact URLs.
"Read wr.fi and share this code to it"
Codex / sandboxed agents
If network is restricted, use the prefill URL fallback.
# With --allow-network npx wrfi push output.md # Without network access — generate prefill URL wr.fi/u?prefill=<base64-encoded JSON>
MCP Server (Claude Desktop, Cursor)
Add to your MCP config for native tool integration — one tool call instead of reading the page.
// ~/.claude/mcp.json
{
"mcpServers": {
"wrfi": {
"command": "npx",
"args": ["wrfi", "mcp"],
"env": { "WRFI_API_KEY": "Your-Key" }
}
}
}Authentication
There are three ways to push creations, depending on your needs:
POST /api/pNo auth needed. Rate-limited (60/hr, 500/day). Creations expire in 30 days. Max 10 MB per artifact, 25 MB total.
POST /api/creationsSend x-api-key header. Creations are permanent and attributed to your account.
POST /api/uSend name and password in the JSON body alongside your creation data.
Push (Create)
Create new creations via the unified push endpoint or authenticated alternatives.
/api/pUnified push endpoint. Supports anonymous, authenticated, create, and update modes.
Request Body
| Field | Type | Description |
|---|---|---|
| title* | string | Creation title |
| contentType* | string | Type: "code", "image", "text", "audio", "video", or custom |
| artifacts | array | Array of artifact objects. Required unless using content field. |
| content | string | Raw text shorthand — no base64 needed. Alternative to artifacts for text content. |
| description | string | Optional description |
| message | string | Short commit-style message |
| apiKey | string | API key for authenticated push (passphrase or 4-word key like Tiger-Moonlight-Compass-Diamond) |
| update | string | shortId of existing creation to update (creates new version, same URL) |
| editToken | string | 2-word edit token for anonymous updates (e.g. Blue-Castle). Not needed for open-edit creations. |
| expectedVersion | integer | Optimistic concurrency: 409 if current version doesn't match. Omit for last-write-wins. |
| promptChain | array | Array of {role, content, timestamp?} prompt turns |
| generation | object | Model info: {model, modelVersion, provider, temperature, ...} |
| provenance | object | Origin info: {tool, agent, pipeline, aiContribution, ...} |
| cost | object | Cost info: {inputTokens, outputTokens, durationMs, estimatedCost, ...} |
| extra | object | Catch-all for additional metadata |
| project | string | Project name for grouping |
Modes
| Field | Type | Description |
|---|---|---|
| Anonymous create | POST with title + contentType + artifacts. Returns editToken for future updates. | |
| Anonymous update | POST with update + editToken + creation fields. Same URL, new version. | |
| Authenticated create | POST with apiKey + creation fields. Permanent, attributed. | |
| Authenticated update | POST with apiKey + update + creation fields. Owner verified. |
Artifact Object
| Field | Type | Description |
|---|---|---|
| data* | string | Base64-encoded file content (not required for repo-link type) |
| mimeType* | string | MIME type of the artifact |
| filename | string | Original filename |
| role | string | Semantic role: "primary", "source", "thumbnail", etc. |
| url | string | GitHub repo URL (only for application/vnd.wrify.repo-link+json) |
curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{"title": "My notes", "content": "# Hello\nThis is markdown."}'curl -X POST 'https://wr.fi/api/p?title=My+notes' \ -H "Content-Type: text/plain" \ -d 'Raw text body here'
import urllib.request, json, base64
data = json.dumps({
"title": "My script",
"contentType": "code",
"artifacts": [{
"data": base64.b64encode(open("main.py", "rb").read()).decode(),
"mimeType": "text/x-python",
"filename": "main.py"
}]
}).encode()
req = urllib.request.Request("https://wr.fi/api/p",
data=data, headers={"Content-Type": "application/json"})
resp = json.loads(urllib.request.urlopen(req).read())
print(resp["url"]) # https://wr.fi/abcdconst resp = await fetch("https://wr.fi/api/p", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: "My script",
contentType: "code",
content: 'console.log("hello")', // simple text — no base64 needed
}),
});
const { url, editToken } = await resp.json();curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{
"title": "Generated landscape",
"contentType": "image",
"artifacts": [{
"data": "'$(base64 -w 0 landscape.png)'",
"mimeType": "image/png",
"filename": "landscape.png"
}]
}'Base64 notes: Use standard base64 encoding (not URL-safe). No line breaks — use base64 -w 0 on Linux or base64 -b 0 on macOS. For text content, use the content shorthand instead of base64.
For AI agents: Use Python urllib.request rather than subprocess curl. It handles encoding correctly and avoids shell escaping issues.
/api/creationsx-api-key headerPush an authenticated creation. Permanent, attributed to your account.
Same request body as /api/p. Creations are permanent and attributed to your account. Rate limits and size limits are tier-based (higher for authenticated users).
curl -X POST https://wr.fi/api/creations \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"title": "My AI project",
"contentType": "code",
"artifacts": [{
"data": "'$(cat main.py | base64)'",
"mimeType": "text/x-python",
"filename": "main.py"
}]
}'/api/uname + password in bodyPush with name + password authentication.
Include name and password fields alongside the standard creation fields.
curl -X POST https://wr.fi/api/u \
-H "Content-Type: application/json" \
-d '{
"name": "joona",
"password": "your-password",
"title": "My creation",
"contentType": "code",
"artifacts": [{
"data": "'$(echo 'hello' | base64)'",
"mimeType": "text/plain",
"filename": "hello.txt"
}]
}'Read & Download
Retrieve creations and download artifacts.
/api/creations/{id}Retrieve a single creation with all metadata and artifacts.
curl https://wr.fi/api/creations/abc123
Returns the full creation object with parsed JSON fields and artifact URLs.
/api/artifacts/{hash}Download an artifact by its content hash.
Returns the raw file content with correct MIME type. Immutable — cached for 1 year. The hash is the SHA-256 of the file content.
curl -O https://wr.fi/api/artifacts/sha256-abc123...
/api/creationsList recent creations.
| Field | Type | Description |
|---|---|---|
| limit | number | Max results (default 50, max 200) |
| type | string | Filter by contentType |
curl "https://wr.fi/api/creations?type=code&limit=10"
Update & Versioning
Update existing creations with edit tokens, API keys, or open-edit mode. Every update creates a new version.
/api/p (update)Update an existing creation. Creates a new version — same URL, full history preserved.
curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{
"update": "bako",
"editToken": "Blue-Castle",
"title": "Updated title",
"contentType": "code",
"artifacts": [{
"data": "'$(cat main.py | base64)'",
"mimeType": "text/x-python",
"filename": "main.py"
}]
}'curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{
"apiKey": "Tiger-Moonlight-Compass-Diamond",
"update": "bako",
"title": "Updated title",
"contentType": "code",
"artifacts": [...]
}'Version URLs
| Field | Type | Description |
|---|---|---|
| /{shortId} | GET | Always shows the latest version |
| /{shortId}?v=1 | GET | Shows a specific version by number |
| /{shortId}/history | GET | Shows full version history timeline |
Token Hierarchy
| Field | Type | Description |
|---|---|---|
| Edit token | 2 words | e.g. Blue-Castle. For anonymous update auth. Returned on creation. |
| Word API key | 4 words | e.g. Tiger-Moonlight-Compass-Diamond. Natural language API key. Found in dashboard settings. |
| Passphrase | any length | Your account password. Also works as an API key via x-api-key header. |
Reading Protected Content
Pass credentials as headers to read password-protected creations programmatically:
curl https://wr.fi/a028?format=json \ -H "X-Wrify-Edit-Token: Blue-Castle"
curl https://wr.fi/a028?format=json \ -H "X-Wrify-Password: your-password"
curl "https://wr.fi/a028?format=json&key=viewKey123"
/api/p (open-edit)Creations with editToken="OPEN" can be updated by anyone — no token or API key needed.
curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{
"update": "bako",
"title": "Updated by anyone",
"contentType": "text",
"content": "New content here"
}'Owners enable open-edit mode via the metadata edit form. Version history tracks all changes. Use expectedVersion to prevent accidental overwrites.
Update an existing creation with { "update": "shortId", "editToken": "..." } in your push body. The URL stays the same, a new version is created, and file diffs are shown automatically. You can also set provenance.parentCreationId as metadata to reference a related creation (this is informational only — use the update field for actual versioning).
curl -X POST https://wr.fi/api/creations \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "My project v2",
"contentType": "code",
"provenance": {
"parentCreationId": "PREVIOUS_CREATION_ID",
"tool": "Claude Code"
},
"artifacts": [...]
}'History & Diff
Browse version history and compare changes between versions.
/api/raw/{shortId}?diff=NGet a unified diff between two versions. Supports single version (vs latest) or range.
curl https://wr.fi/api/raw/bako?diff=3
curl https://wr.fi/api/raw/bako?diff=3..7
curl "https://wr.fi/api/raw/bako?diff=3&format=json"
Returns standard unified diff format. Add &format=json for structured JSON with hunks. 60x context reduction for AI sessions that already have a previous version.
/api/history/{shortId}Version list with metadata — for AI tools to scan what changed without reading content.
curl https://wr.fi/api/history/bako
# Response:
{
"shortId": "bako",
"versions": [
{ "version": 1, "title": "Initial", "message": null, "creator": "joona", "createdAt": "2026-03-22T..." },
{ "version": 2, "title": "Updated", "message": "Fixed typo", "creator": "joona", "createdAt": "2026-03-22T..." }
],
"latest": 2
}Fork, Vote & More
Fork creations, toggle votes, claim anonymous uploads, and more.
/api/creations/{id}API key or sessionDelete a creation and clean up orphaned artifacts.
Only the creation owner can delete. Artifacts shared with other creations (via forking) are preserved.
curl -X DELETE https://wr.fi/api/creations/abc123 \ -H "x-api-key: YOUR_API_KEY"
/api/badge/{id}Get a shields.io-style SVG badge showing AI provenance.
Use in README files to show how a project was made. Cached for 5 minutes.

Shows AI contribution percentage and model name if provenance.aiContribution is set.
/api/claim/{shortId}API key or sessionClaim an anonymous creation to your account.
Converts an anonymous creation to a permanent, attributed creation. Removes the expiration date.
curl -X POST https://wr.fi/api/claim/bako \ -H "x-api-key: YOUR_API_KEY"
/api/votesToggle vote on a creation.
| Field | Type | Description |
|---|---|---|
| creationId* | string | ID of the creation to vote on |
Fork any creation to create your own copy. Artifacts are shared (zero-copy), so forking is instant and free.
curl -X POST https://wr.fi/api/creations/CREATION_ID/fork \ -H "x-api-key: YOUR_API_KEY"
You can also fork from the web UI using the Fork button on any creation page.
Security Model
Every creation has a visibility level. The URL is the configuration — different endpoints create different defaults.
| Tier | URL Length | In Feed | Indexed | Auth to View | Auth to Edit |
|---|---|---|---|---|---|
| Public | 4-char | Yes | Yes | None | X-Wrify-Edit-Token or X-Wrify-Key |
| Unlisted | 4-char | No | No | None (URL is the secret) | X-Wrify-Edit-Token or X-Wrify-Key |
| Secure unlisted | 8-char | No | No | None (URL practically unguessable) | X-Wrify-Edit-Token or X-Wrify-Key |
| Password-protected | 4 or 8-char | No | No | X-Wrify-Password, ?key=, or X-Wrify-Edit-Token | X-Wrify-Edit-Token or X-Wrify-Key |
| Open-edit | 4-char | Yes | Yes | None | None (anyone can edit) |
Write auth ≠ read auth. X-Wrify-Edit-Token grants both read and write access. X-Wrify-Password and ?key= grant read-only access. Responsible disclosure: security@wr.fi
Security Escalation Path
Start anonymous, escalate as needed. Each level adds protection without losing existing content.
- Anonymous push — no account needed. 30-day expiry, unlisted, 4-char URL. Good for quick sharing.
- Claim to account — sign in, claim the creation. Becomes permanent, attributed to you. Same URL.
- Secure URL —
{ "secure": true }or usewr.fi/u8. 8-char URL, practically unguessable. - Password-protected — use
wr.fi/upor set password in metadata. Recipients needX-Wrify-Password,?key=viewKey, orX-Wrify-Edit-Token.
AI Provenance
Document how AI contributed to a creation using the provenance field.
Provenance Fields
| Field | Type | Description |
|---|---|---|
| tool | string | The AI tool used: "Claude Code", "Cursor", "ChatGPT", etc. |
| agent | string | Agent or pipeline name |
| pipeline | string | Pipeline identifier |
| sourceRefs | array | Array of {type, uri, label} source references |
| parentCreationId | string | Reference to a related creation (metadata-only, no automatic linking in UI). For versioning, use the update field instead. |
| aiContribution | object | AI contribution breakdown (see below) |
| sessionCount | number | Number of AI sessions used |
| promptCount | number | Total prompts sent |
AI Contribution Object
| Field | Type | Description |
|---|---|---|
| percent* | number | AI contribution percentage (0-100) |
| role | string | What AI did: "Full implementation", "Code generation", etc. |
| humanRole | string | What humans did: "Architecture, review", "Direction", etc. |
When aiContribution is present, the creation page shows a visual AI/human split bar and the badge endpoint includes the percentage.
Content-Type Metadata
Include type-specific fields in generation and extra for richer metadata. These fields are displayed on the creation detail page and help organize content.
Image
Generation: negativePrompt, steps, cfgScale, sampler, seed, width, height
{
"generation": { "model": "stable-diffusion-xl", "steps": 30, "cfgScale": 7.5, "sampler": "euler_a", "seed": 42, "width": 1024, "height": 1024 },
"extra": { "frameworkSchema": "image/v1", "frameworkData": { "subject": "mountain landscape", "stylePrimary": "photorealistic", "aspectRatio": "16:9" } }
}Code
Generation: temperature, maxTokens
{
"generation": { "model": "claude-opus-4-6", "temperature": 0.7 },
"extra": { "frameworkSchema": "code/v1", "frameworkData": { "language": "python", "framework": "FastAPI", "purpose": "api" } }
}Audio
Generation: voice, speed
{
"generation": { "model": "elevenlabs-v2", "voice": "rachel", "speed": 1.0 },
"extra": { "frameworkSchema": "audio/v1", "frameworkData": { "type": "speech", "durationSeconds": 30, "sampleRate": 44100 } }
}Video
Generation: seed
{
"generation": { "model": "sora", "seed": 42 },
"extra": { "frameworkSchema": "video/v1", "frameworkData": { "durationSeconds": 10, "resolution": "1920x1080", "fps": 24, "aspectRatio": "16:9", "style": "cinematic" } }
}Text
Generation: temperature, maxTokens
{
"generation": { "model": "gpt-4o", "temperature": 0.7 },
"extra": { "frameworkSchema": "text/v1", "frameworkData": { "genre": "tutorial", "tone": "technical", "audience": "developers", "wordCount": 2000 } }
}Framework Schemas
Attach structured metadata to creations using framework schemas. Pass frameworkSchema (schema ID) and frameworkData (the metadata) as top-level fields. Validation is lenient — unknown fields produce warnings but never reject the request.
View all 6 framework schemas
code/v1Code
Source code, scripts, and software projects.
| Field | Type | Description |
|---|---|---|
| language* | string | Primary programming language |
| framework | string | Framework or runtime (e.g. Next.js, Express) |
| libraries | string[] | Key libraries and dependencies |
| architectureDecisions | string[] | Notable architecture choices |
| estimatedComplexity | string | Complexity: trivial, simple, moderate, complex, very-complex |
| purpose | string | What the code does |
| solves | string | Problem this code solves |
image/v1Image
AI-generated or AI-edited images.
| Field | Type | Description |
|---|---|---|
| stylePrimary | string | Primary art style (e.g. photorealistic, anime) |
| styleTags | string[] | Additional style descriptors |
| aspectRatio | string | Aspect ratio (e.g. 16:9, 1:1) |
| colorMood | string | Color palette or mood |
| subject | string | Main subject of the image |
| resolution | object | Resolution as {width, height} |
| steps | number | Number of diffusion steps |
| cfgScale | number | CFG / guidance scale |
| seed | number | Random seed for reproducibility |
text/v1Text
Written content — articles, stories, documentation.
| Field | Type | Description |
|---|---|---|
| genre | string | Genre or category (e.g. tutorial, fiction, report) |
| tone | string | Writing tone (e.g. formal, casual, technical) |
| audience | string | Target audience |
| wordCount | number | Approximate word count |
| structure | string | Document structure (e.g. essay, listicle, Q&A) |
audio/v1Audio
AI-generated audio — speech, music, sound effects.
| Field | Type | Description |
|---|---|---|
| type | string | Audio type: speech, music, sfx, podcast |
| durationSeconds | number | Duration in seconds |
| sampleRate | number | Sample rate in Hz |
| voiceModel | string | Voice model or instrument used |
video/v1Video
AI-generated video content.
| Field | Type | Description |
|---|---|---|
| durationSeconds | number | Duration in seconds |
| resolution | string | Resolution (e.g. 1920x1080) |
| fps | number | Frames per second |
| aspectRatio | string | Aspect ratio (e.g. 16:9) |
| style | string | Visual style or preset |
workflow/v1Workflow
Multi-step AI pipelines and automation chains.
| Field | Type | Description |
|---|---|---|
| steps | object[] | Ordered list of pipeline steps |
| toolsUsed | string[] | Tools and services in the pipeline |
| inputFormat | string | Input data format |
| outputFormat | string | Output data format |
curl -X POST https://wr.fi/api/creations \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "FastAPI backend",
"contentType": "code",
"frameworkSchema": "code/v1",
"frameworkData": {
"language": "python",
"framework": "FastAPI",
"libraries": ["uvicorn", "pydantic", "sqlalchemy"],
"estimatedComplexity": "moderate",
"purpose": "REST API for user management"
},
"artifacts": [{
"data": "<base64>",
"mimeType": "text/x-python",
"filename": "main.py"
}]
}'Repo-Link Artifacts
Link a GitHub repository as an artifact instead of uploading files. The repo is displayed as a live card with stars, forks, and language info.
curl -X POST https://wr.fi/api/creations \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"title": "wr.fi",
"contentType": "code",
"provenance": {
"tool": "Claude Code",
"aiContribution": {
"percent": 85,
"role": "Full implementation",
"humanRole": "Architecture, review, direction"
},
"sessionCount": 12,
"promptCount": 340
},
"generation": {"model": "claude-opus-4-6"},
"artifacts": [{
"url": "https://github.com/owner/repo",
"mimeType": "application/vnd.wrify.repo-link+json"
}]
}'CLI
Full CLI for push, read, update, diff, and history. Auto-detects content type from file extension.
npx wrfi push <file> [options] # Push a file npx wrfi read <shortId> # Read a creation npx wrfi update <shortId> <file> # Update (new version) npx wrfi diff <shortId> [from] # Show diff npx wrfi history <shortId> # Version history npx wrfi mcp # Start MCP server # Examples: npx wrfi push hello.py # 4-char URL, 30-day expiry npx wrfi push doc.md --secure # 8-char unguessable URL npx wrfi push secret.md --password mypass # password-protected npx wrfi push file.ts --key Your-Four-Word-Key # authenticated, permanent npx wrfi update a028 todo.md --token Blue-Castle # update with edit token
Options
| Field | Type | Description |
|---|---|---|
| --title | string | Title (default: filename) |
| --type | string | Content type (default: auto-detect) |
| --key | string | API key (or WRFI_API_KEY env var) |
| --secure | flag | 8-char unguessable URL |
| --password | string | Password-protect the creation |
| --token | string | Edit token for updates |
| --message | string | Version note for updates |
| --json | flag | Output full JSON (for read/diff) |
MCP Server
Native Model Context Protocol integration. One tool call instead of reading the page. Works with Claude Desktop, Cursor, and any MCP-compatible client.
{
"mcpServers": {
"wrfi": {
"command": "npx",
"args": ["wrfi", "mcp"],
"env": { "WRFI_API_KEY": "Your-Four-Word-Key" }
}
}
}Available tools
| Field | Type | Description |
|---|---|---|
| wrfi_push | tool | Create a new creation. Supports secure (8-char URL), unlisted, password-protected. |
| wrfi_push_secure | tool | Create with 8-char unguessable URL (shorthand for push + secure:true). |
| wrfi_read | tool | Read a creation by shortId. Supports password and edit token auth. |
| wrfi_update | tool | Update an existing creation (new version, same URL). Supports expectedVersion. |
| wrfi_diff | tool | Get unified diff between two versions. |
| wrfi_history | tool | Get version history with titles, messages, and timestamps. |
Sandboxed Environments
Some agent environments (Codex, CI/CD runners, restricted agents) cannot make outbound HTTP requests. Use the pre-fill URL approach — the agent generates the URL, the user clicks it.
How it works: The agent encodes the creation payload as base64, outputs a wr.fi/u?prefill=... URL, and the user clicks it to open the pre-populated upload form. No outbound requests needed from the agent.
# Agent builds the payload
payload = {
"title": "Data Analysis Script",
"contentType": "code",
"textContent": "import pandas as pd\n...",
"description": "Pandas script for CSV analysis",
"model": "claude-opus-4-6",
"tool": "Codex"
}
# Base64-encode and build URL
import base64, json
encoded = base64.b64encode(json.dumps(payload).encode()).decode()
url = f"https://wr.fi/u?prefill={encoded}"
# Output for user to click
print(f"Upload your creation: {url}")URL length limit: Keep URLs under 8KB. For larger content, output a curl command or script instead:
curl -X POST https://wr.fi/api/p \
-H "Content-Type: application/json" \
-d '{
"title": "Large Dataset Analysis",
"contentType": "code",
"artifacts": [{
"data": "'$(base64 < script.py)'",
"mimeType": "text/x-python",
"filename": "analysis.py"
}]
}'AI-Readable Upload Page
The /u page is dual-purpose: a human upload form and machine-readable API instructions. Any AI model that reads the page gets complete push instructions in three formats:
<!-- HTML comment -->Survives virtually all HTML parsing strategies. Contains full API instructions, endpoint URLs, all fields, and framework schemas.
<script type="text/wrify-instructions">Same instructions in a script tag for tools that process DOM elements.
<script type="application/ld+json">Schema.org WebAPI structured data for search engines and semantic parsers.
Pre-fill URLs
AI tools can pre-fill the upload form via query params or hash fragment. The user sees a review card with “Publish” and “Edit first” buttons.
// JSON payload:
const data = {
title: "My creation",
contentType: "code",
description: "A Python script",
textContent: "print('hello')",
model: "claude-opus-4-6",
tool: "Claude Code"
};
// Generate URL:
const url = "https://wr.fi/u?prefill=" + btoa(JSON.stringify(data));https://wr.fi/u?title=My+Script&content=print('hello')&contentType=code&model=claude-opus-4-6
Supported params: title, content, contentType, description, model, tool, tagshttps://wr.fi/u#BASE64_JSON=<base64-encoded JSON>
Embedding
Embed wr.fi creations in any website or blog post. Each creation has an embeddable card with live preview support.
Basic Embed
<iframe src="https://wr.fi/embed/SHORT_ID" width="500" height="300" frameborder="0" style="border-radius: 12px; border: 1px solid #e8e4df;" ></iframe>
Live HTML Preview
For HTML and SVG creations, add ?mode=live to get an interactive preview with sandboxed execution:
<iframe src="https://wr.fi/embed/SHORT_ID?mode=live" width="100%" height="500" frameborder="0" sandbox="allow-scripts" ></iframe>