Wwrify

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

CLI push
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.

Anonymous push
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:

Response (201)
{
  "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:

AnonymousPOST /api/p

No auth needed. Rate-limited (20/hr, 100/day). Creations expire in 30 days. Max 5 MB per artifact, 10 MB total.

API KeyPOST /api/creations

Send x-api-key header. Creations are permanent and attributed to your account.

Name + PasswordPOST /api/u

Send name and password in the JSON body alongside your creation data.

Endpoints

POST/api/p

Push an anonymous creation. Rate-limited, expires in 30 days.

Request Body

FieldTypeDescription
title*stringCreation title
contentType*stringType: "code", "image", "text", "audio", "video", or custom
artifacts*arrayArray of artifact objects (at least one)
descriptionstringOptional description
messagestringShort commit-style message
promptChainarrayArray of {role, content, timestamp?} prompt turns
generationobjectModel info: {model, modelVersion, provider, temperature, ...}
provenanceobjectOrigin info: {tool, agent, pipeline, aiContribution, ...}
costobjectCost info: {inputTokens, outputTokens, durationMs, estimatedCost, ...}
extraobjectCatch-all for additional metadata
projectstringProject name for grouping

Artifact Object

FieldTypeDescription
data*stringBase64-encoded file content (not required for repo-link type)
mimeType*stringMIME type of the artifact
filenamestringOriginal filename
rolestringSemantic role: "primary", "source", "thumbnail", etc.
urlstringGitHub repo URL (only for application/vnd.wrify.repo-link+json)
Example
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"
    }]
  }'
POST/api/creationsx-api-key header

Push an authenticated creation. Permanent, attributed to your account.

Same request body as /api/p, but no size limits or rate limiting. Creations are permanent.

Example
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"
    }]
  }'
POST/api/uname + password in body

Push with name + password authentication.

Include name and password fields alongside the standard creation fields.

Example
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"
    }]
  }'
GET/api/creations/{id}

Retrieve a single creation with all metadata and artifacts.

Example
curl https://wr.fi/api/creations/abc123

Returns the full creation object with parsed JSON fields and artifact URLs.

DELETE/api/creations/{id}API key or session

Delete a creation and clean up orphaned artifacts.

Only the creation owner can delete. Artifacts shared with other creations (via forking) are preserved.

Example
curl -X DELETE https://wr.fi/api/creations/abc123 \
  -H "x-api-key: YOUR_API_KEY"
GET/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.

Example
curl -O https://wr.fi/api/artifacts/sha256-abc123...
GET/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.

Markdown usage
![AI Provenance](https://wr.fi/api/badge/YOUR_CREATION_ID)

Shows AI contribution percentage and model name if provenance.aiContribution is set.

POST/api/claim/{shortId}API key or session

Claim an anonymous creation to your account.

Converts an anonymous creation to a permanent, attributed creation. Removes the expiration date.

Example
curl -X POST https://wr.fi/api/claim/bako \
  -H "x-api-key: YOUR_API_KEY"
GET/api/creations

List recent creations.

FieldTypeDescription
limitnumberMax results (default 50, max 200)
typestringFilter by contentType
Example
curl "https://wr.fi/api/creations?type=code&limit=10"
POST/api/votes

Toggle vote on a creation.

FieldTypeDescription
creationId*stringID 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.

Push a repo-link
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

FieldTypeDescription
toolstringThe AI tool used: "Claude Code", "Cursor", "ChatGPT", etc.
agentstringAgent or pipeline name
pipelinestringPipeline identifier
sourceRefsarrayArray of {type, uri, label} source references
parentCreationIdstringLinks to a previous version (creates a version chain)
aiContributionobjectAI contribution breakdown (see below)
sessionCountnumberNumber of AI sessions used
promptCountnumberTotal prompts sent

AI Contribution Object

FieldTypeDescription
percent*numberAI contribution percentage (0-100)
rolestringWhat AI did: "Full implementation", "Code generation", etc.
humanRolestringWhat 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.

FieldTypeDescription
language*stringPrimary programming language
frameworkstringFramework or runtime (e.g. Next.js, Express)
librariesstring[]Key libraries and dependencies
architectureDecisionsstring[]Notable architecture choices
estimatedComplexitystringComplexity: trivial, simple, moderate, complex, very-complex
purposestringWhat the code does
solvesstringProblem this code solves

image/v1Image

AI-generated or AI-edited images.

FieldTypeDescription
stylePrimarystringPrimary art style (e.g. photorealistic, anime)
styleTagsstring[]Additional style descriptors
aspectRatiostringAspect ratio (e.g. 16:9, 1:1)
colorMoodstringColor palette or mood
subjectstringMain subject of the image
resolutionobjectResolution as {width, height}
stepsnumberNumber of diffusion steps
cfgScalenumberCFG / guidance scale
seednumberRandom seed for reproducibility

text/v1Text

Written content — articles, stories, documentation.

FieldTypeDescription
genrestringGenre or category (e.g. tutorial, fiction, report)
tonestringWriting tone (e.g. formal, casual, technical)
audiencestringTarget audience
wordCountnumberApproximate word count
structurestringDocument structure (e.g. essay, listicle, Q&A)

audio/v1Audio

AI-generated audio — speech, music, sound effects.

FieldTypeDescription
typestringAudio type: speech, music, sfx, podcast
durationSecondsnumberDuration in seconds
sampleRatenumberSample rate in Hz
voiceModelstringVoice model or instrument used

video/v1Video

AI-generated video content.

FieldTypeDescription
durationSecondsnumberDuration in seconds
resolutionstringResolution (e.g. 1920x1080)
fpsnumberFrames per second
aspectRatiostringAspect ratio (e.g. 16:9)
stylestringVisual style or preset

workflow/v1Workflow

Multi-step AI pipelines and automation chains.

FieldTypeDescription
stepsobject[]Ordered list of pipeline steps
toolsUsedstring[]Tools and services in the pipeline
inputFormatstringInput data format
outputFormatstringOutput data format
Example: Push with framework schema
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

Image example
{
  "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

Code example
{
  "generation": { "model": "claude-opus-4-6", "temperature": 0.7 },
  "extra": { "frameworkSchema": "code/v1", "frameworkData": { "language": "python", "framework": "FastAPI", "purpose": "api" } }
}

Audio

Generation: voice, speed

Audio example
{
  "generation": { "model": "elevenlabs-v2", "voice": "rachel", "speed": 1.0 },
  "extra": { "frameworkSchema": "audio/v1", "frameworkData": { "type": "speech", "durationSeconds": 30, "sampleRate": 44100 } }
}

Video

Generation: seed

Video example
{
  "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

Text example
{
  "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.

Push a new version
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.

Fork via API
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.

claude_desktop_config.json
{
  "mcpServers": {
    "wrify": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-fetch"],
      "env": {}
    }
  }
}

Then use the fetch tool to push creations:

Tool call example
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:

MCP tool schema
{
  "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:

Discovery endpoint
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.

Install and push
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

FieldTypeDescription
--titlestringTitle for the creation (default: filename)
--typestringContent type: code, text, image, audio, video (default: auto-detect)
--keystringAPI key for authenticated push (or set WRIFY_API_KEY env var)
--urlstringBase 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.

Pre-fill example
// 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

HTML embed code
<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:

Live embed
<iframe
  src="https://wr.fi/embed/SHORT_ID?mode=live"
  width="100%" height="500"
  frameborder="0"
  sandbox="allow-scripts allow-same-origin"
></iframe>