API Documentation
Wrify has a simple REST API. Push AI creations with a single POST request — no SDK needed. All endpoints accept and return JSON.
Quick Start
Option 1: Tell your AI
Paste this into any AI chat: “Read wr.fi/u and push the code we just wrote.” The /u page contains machine-readable instructions (HTML comment + JSON-LD) that any AI model can parse and act on.
Option 2: CLI
npx wrify push hello.py npx wrify push image.png --title "My art" npx wrify push file.ts --key YOUR_API_KEY
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 wrify')" | 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-..."
}]
}Authentication
There are three ways to push creations, depending on your needs:
POST /api/pNo auth needed. Rate-limited (20/hr, 100/day). Creations expire in 30 days. Max 5 MB per artifact, 10 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.
Endpoints
/api/pPush an anonymous creation. Rate-limited, expires in 30 days.
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 (at least one) |
| description | string | Optional description |
| message | string | Short commit-style message |
| 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 |
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": "Generated landscape",
"contentType": "image",
"message": "Sunset over mountains",
"generation": {"model": "dall-e-3", "provider": "openai"},
"provenance": {"tool": "my-image-gen"},
"artifacts": [{
"data": "<base64-encoded-png>",
"mimeType": "image/png",
"filename": "landscape.png"
}]
}'/api/creationsx-api-key headerPush an authenticated creation. Permanent, attributed to your account.
Same request body as /api/p, but no size limits or rate limiting. Creations are permanent.
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"
}]
}'/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/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/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/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/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"
/api/votesToggle vote on a creation.
| Field | Type | Description |
|---|---|---|
| creationId* | string | ID of the creation to vote on |
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": "Wrify",
"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"
}]
}'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 | Links to a previous version (creates a version chain) |
| 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.
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.
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"
}]
}'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 } }
}Versioning
Push a new version of an existing creation by setting provenance.parentCreationId to the previous creation's ID. Wrify automatically builds a version chain and shows file diffs between versions.
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": [...]
}'Forking
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.
MCP Integration
Wrify can be used as a tool in any Model Context Protocol (MCP) server. This lets AI agents push creations directly to Wrify from Claude Desktop, Cursor, or any MCP-compatible client.
MCP Server Configuration
Add Wrify as a tool in your MCP server configuration. The tool accepts the same payload as POST /api/creations.
{
"mcpServers": {
"wrify": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-fetch"],
"env": {}
}
}
}Then use the fetch tool to push creations:
Use the fetch tool to POST to https://wr.fi/api/p with this JSON body:
{
"title": "My AI creation",
"contentType": "code",
"generation": {"model": "claude-opus-4-6"},
"provenance": {"tool": "Claude Desktop"},
"artifacts": [{
"data": "<base64-encoded content>",
"mimeType": "text/x-python",
"filename": "script.py"
}]
}Custom MCP Tool Definition
For a tighter integration, define Wrify as a custom MCP tool that AI agents can call directly:
{
"name": "wrify_push",
"description": "Push a creation to Wrify — the cross-model AI creation repository",
"inputSchema": {
"type": "object",
"required": ["title", "contentType", "artifacts"],
"properties": {
"title": { "type": "string", "description": "Creation title" },
"contentType": {
"type": "string",
"enum": ["code", "text", "image", "audio", "video"],
"description": "Type of content"
},
"description": { "type": "string", "description": "Optional description" },
"artifacts": {
"type": "array",
"items": {
"type": "object",
"required": ["data", "mimeType"],
"properties": {
"data": { "type": "string", "description": "Base64-encoded file content" },
"mimeType": { "type": "string" },
"filename": { "type": "string" }
}
}
},
"generation": {
"type": "object",
"properties": { "model": { "type": "string" } }
},
"provenance": {
"type": "object",
"properties": { "tool": { "type": "string" } }
}
}
}
}API Discovery
Wrify publishes a machine-readable discovery document at /.well-known/wrify.json. Use it to dynamically discover endpoints, schemas, and capabilities:
curl https://wr.fi/.well-known/wrify.json
AI agents can also read creation pages directly — each creation page includes a <script type="text/wrify-instructions"> block with structured metadata, artifact URLs, and remix instructions.
CLI
Push files from the command line with zero dependencies. Detects content type from file extension.
npx wrify push <file> [options] # Examples: npx wrify push hello.py # anonymous, 30-day expiry npx wrify push image.png --title "My art" # with custom title npx wrify push file.ts --key YOUR_API_KEY # authenticated, permanent npx wrify push script.sh --url http://localhost:3000 # custom server
Options
| Field | Type | Description |
|---|---|---|
| --title | string | Title for the creation (default: filename) |
| --type | string | Content type: code, text, image, audio, video (default: auto-detect) |
| --key | string | API key for authenticated push (or set WRIFY_API_KEY env var) |
| --url | string | Base URL (default: https://wr.fi, or set WRIFY_URL env var) |
Without --key, uses the anonymous /api/p endpoint (30-day expiry). With --key, uses /api/creations (permanent).
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 by navigating to /u#BASE64_JSON=.... The user sees a review card with “Publish” and “Edit first” buttons.
// JSON to pre-fill:
const data = {
title: "My creation",
contentType: "code",
description: "A Python script",
textContent: "print('hello')",
model: "claude-opus-4-6",
tool: "Claude Code"
};
// Navigate to:
const url = "https://wr.fi/u#BASE64_JSON=" + btoa(JSON.stringify(data));Embedding
Embed Wrify 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 allow-same-origin" ></iframe>