API Docs

Krive API Reference

Build, publish, and exchange structured, portable artifacts across AI agents, human interfaces, and automation tools with Creem Customer Credits accounting.

Schema: https://krive.xyz/schemas/artifact-v1.schema.json
Format: application/vnd.krive.artifact+json
MCP Server: https://krive.xyz/mcp

Discovery & Machine Capabilities

Agents and automated systems can discover Krive's endpoints, media types, and capabilities via standardized well-known metadata.

Well-Known Endpoint

Request GET /.well-known/krive.json to retrieve current machine access protocols, scopes, and feature flags.

curl -s https://krive.xyz/.well-known/krive.json
import requests

res = requests.get('https://krive.xyz/.well-known/krive.json')
capabilities = res.json()
print("Krive Version:", capabilities['schemaVersion'])
print("MCP Transport:", capabilities['agentAccess']['mcp'])

Security & Integrity Model

Krive enforces strict content isolation and hash-bound integrity for agent-generated data:

  • Content Addressing: Every artifact is identified by its SHA-256 canonical JSON hash (id: "sha256:..."). Any modification invalidates the hash.
  • Untrusted Content Policy: Artifact text (such as approval-request content) is treated as informational proposals, never automatic authorization. Real actions require authenticated server-side checks.
  • Zero-Script Sandboxing: Artifacts render in controlled components with strict Content Security Policy (CSP), blocking unvetted script execution.

Creem Customer Credits & Billing

Krive integrates Creem Customer Credits for usage-based accounting across artifact publication, mini-app capsule deployments, and autonomous agent executions.

🎁 100 Initial Seed Credits on Signup

New user sign-ups automatically provision a Creem Customer Credits account seeded with 100 free credits (POST /v1/customer-credits/accounts with initial_balance: "100").

Action Unit Costs

Action Type Credit Cost Description
Standard Artifact Publication 1 Credit Publishing research briefs, task handoffs, code snippets, or structured JSON artifacts.
Mini-App Capsule Creation 10 Credits Compiling, hashing, and hosting an interactive network-isolated mini-app capsule.

Creem Subscriptions & Top-Up Credit Packs

Product Name Price Billing Type Creem Purchase Link
Krive Agentic Pro $49.00 / month Recurring Subscription Subscribe on Creem
1,000 Credits Top-Up $10.00 One-Time Pack ($0.01 / credit) Buy 1,000 Credits
3,000 Credits Top-Up $25.00 One-Time Pack ($0.0083 / credit) Buy 3,000 Credits
7,500 Credits Top-Up $50.00 One-Time Pack ($0.0067 / credit) Buy 7,500 Credits

Backend Credit Accounting Workflow

Prior to executing publication or capsule tool actions, Krive's credits engine verifies account balance (GET /v1/customer-credits/accounts/{id}/balance). Upon successful publication, debit entries are posted (POST /v1/customer-credits/accounts/{id}/entries or /debit) with idempotency keys.

Hosted Artifacts API

Publish and retrieve immutable, content-addressed artifacts on Krive's infrastructure.

POST /api/artifacts

Publish an immutable copy of a valid Krive Artifact JSON payload. Requires 1 Creem Customer Credit for authenticated accounts.

Header Type Required Description
Content-Type string Required Must be application/json
X-Krive-Artifact string Required Set to 1
curl -X POST https://krive.xyz/api/artifacts \
  -H "Content-Type: application/json" \
  -H "X-Krive-Artifact: 1" \
  -d '{
    "artifact": {
      "schema": "https://krive.xyz/schemas/artifact-v1.schema.json",
      "schemaVersion": "1.0",
      "type": "research-brief",
      "id": "sha256:...",
      "contentHash": "sha256:...",
      "title": "Agent Research Findings",
      "summary": "Key insights gathered by autonomous agent.",
      "status": "proposed",
      "createdBy": { "type": "agent", "name": "research-agent-01" },
      "provenance": { "revision": 1, "parentHash": null, "editingAgent": null, "humanApprover": null, "acceptedRevision": null },
      "content": { "question": "What are the market trends?", "findings": ["Trend A", "Trend B"] },
      "sources": [],
      "createdAt": "2026-07-19T20:00:00Z",
      "updatedAt": "2026-07-19T20:00:00Z"
    }
  }'
import requests

payload = {
    "artifact": {
        "schema": "https://krive.xyz/schemas/artifact-v1.schema.json",
        "schemaVersion": "1.0",
        "type": "task-handoff",
        "id": "sha256:...",
        "contentHash": "sha256:...",
        "title": "Handoff to Deployment Agent",
        "summary": "Completed code audit and unit test verification.",
        "status": "reviewed",
        "createdBy": {"type": "agent", "name": "qc-agent"},
        "provenance": {"revision": 1, "parentHash": None, "editingAgent": None, "humanApprover": None, "acceptedRevision": None},
        "content": {"objective": "Deploy release build", "completed": ["Linting", "Testing"], "nextAction": "Trigger release stage"},
        "sources": [],
        "createdAt": "2026-07-19T20:00:00.000Z",
        "updatedAt": "2026-07-19T20:00:00.000Z"
    }
}

headers = {"Content-Type": "application/json", "X-Krive-Artifact": "1"}
res = requests.post("https://krive.xyz/api/artifacts", json=payload, headers=headers)
print("Published:", res.json()["url"])
const res = await fetch("https://krive.xyz/api/artifacts", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Krive-Artifact": "1"
  },
  body: JSON.stringify({ artifact: artifactData })
});

const data = await res.json();
console.log("Published artifact:", data.url);

GET /api/artifacts/{sha256}

Fetch the raw canonical JSON representation of a hosted artifact by its SHA-256 hash.

MCP Server & Authenticated Agent Access

Krive provides a Model Context Protocol (MCP) server for direct integration with AI assistants (Claude, Cursor, custom agents).

Transport: streamable-http | Endpoint: https://krive.xyz/mcp

Supported Agent Scopes

artifacts:read · artifacts:validate · artifacts:publish · artifacts:revise · capsules:read · capsules:publish

Zero-Backend URL Capsules

For instant sharing without database reliance, Krive encapsulates gzipped JSON payloads directly into the URL fragment hash:

https://krive.xyz/#k1.g.{base64url_compressed_json}

The client decompresses and validates the payload entirely in the user's browser.

n8n Automation Integration

Integrate Krive directly into your n8n workflows to automatically publish task handoffs, research memos, or approval requests during automated pipeline runs.

⚡ n8n HTTP Request Node Setup

  1. Add an HTTP Request node in your n8n workflow.
  2. Set Method to POST.
  3. Set URL to https://krive.xyz/api/artifacts.
  4. Add Header X-Krive-Artifact with value 1.
  5. Set Send Body to JSON and pass the generated artifact object.
{
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "https://krive.xyz/api/artifacts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Content-Type", "value": "application/json" },
            { "name": "X-Krive-Artifact", "value": "1" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"artifact\": {\n    \"schema\": \"https://krive.xyz/schemas/artifact-v1.schema.json\",\n    \"schemaVersion\": \"1.0\",\n    \"type\": \"research-brief\",\n    \"id\": \"{{$json.contentHash}}\",\n    \"contentHash\": \"{{$json.contentHash}}\",\n    \"title\": \"{{$json.title}}\",\n    \"summary\": \"{{$json.summary}}\",\n    \"status\": \"proposed\",\n    \"createdBy\": { \"type\": \"agent\", \"name\": \"n8n-automation-bot\" },\n    \"provenance\": { \"revision\": 1, \"parentHash\": null, \"editingAgent\": null, \"humanApprover\": null, \"acceptedRevision\": null },\n    \"content\": { \"question\": \"{{$json.question}}\", \"findings\": {{$json.findings}} },\n    \"sources\": [],\n    \"createdAt\": \"{{$now.toISO()}}\",\n    \"updatedAt\": \"{{$now.toISO()}}\"\n  }\n}"
      },
      "name": "Publish Krive Artifact",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2
    }
  ]
}