Kirigami.aiDevelopers
APIReleasesPricing
DashboardEnglish
Get started
  • What is Kirigami.ai
  • Architecture
  • Endpoint list
Quickstart
Authentication
Core Concepts
Jobs
Credits
Rate Limits
Errors
API Reference
  • POST /convert
  • GET /jobs/:id
  • POST /upload
  • POST /v2/decompose
  • POST /v2/html-to-pptx
  • Marketplace
  • POST /publish
  • CLI Auth
Interactive Reference
Tools
CLI Guide
MCP Guide
Skills Guide
Changelog
About UsContactTerms of ServicePrivacy PolicyLegal Notice

© 2026 Kirigami.ai — Inspired by the art of paper cutting

Documentation

Service Overview

Kirigami.ai converts images into fully editable PowerPoint files — not screenshots. Text stays editable, layouts are preserved, and shapes, backgrounds, and gradients are faithfully reproduced.

What is Kirigami.ai

An API that vectorizes and semantically groups images with AI, producing .pptx files whose shapes remain individually editable in PowerPoint. Callable from any application, agent, or script via REST, MCP, or CLI.

Architecture

Kirigami.ai runs a four-stage pipeline that separates concerns for reliability and scalability:

Client
STEP 01

Client

Your application, agent, or script sends HTTP requests to the REST API. Any language or platform that speaks HTTP works.
API GatewayAPI
STEP 02

API Gateway

Handles authentication (X-Api-Key), rate limits per plan tier, Zod-based validation, and initial job creation.
Durable Queue
STEP 03

Durable Queue

Job metadata is stored in Convex, large payloads in R2, and QStash dispatches each image asynchronously.
Workers and Output
STEP 04

Workers & Output

Vectorize → OCR → remove text → semantic grouping → generate PPTX. The finished .pptx is served via a pre-signed URL.

Endpoints at a glance

MethodPathPurpose
POST/api/v1/uploadUpload an image
POST/api/v1/convertStart conversion
GET/api/v1/jobs/:jobIdJob status
GET/api/v1/marketplaceGallery list
GET/api/v1/marketplace/:itemIdGallery detail
POST/api/v1/publishPublish to gallery
POST/api/v1/auth/startStart CLI login
POST/api/v1/auth/approveApprove CLI (browser)
GET/api/v1/auth/poll/:sessionIdCLI polling
POST/api/v2/decomposeDecompose image into layers
POST/api/v2/html-to-pptxCompose PPTX from HTML/CSS
POST/api/mcpRemote MCP (JSON-RPC)
Get Started

Quickstart

Convert your first image to PPTX and download it in under 3 minutes.

1. Issue an API key

Create a key at Settings → API Keys. The 64-char key prefixed ip2p_ is shown once only.

2. Upload an image

curl -X POST https://kirigami.ai/api/v1/upload \
  -H "X-Api-Key: ip2p_YOUR_KEY" \
  -F "image=@/path/to/slide.png"

3. Start conversion

curl -X POST https://kirigami.ai/api/v1/convert \
  -H "X-Api-Key: ip2p_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [{ "url": "<R2_URL>", "id": "img-1" }],
    "filename": "deck.pptx"
  }'

4. Poll for status

curl https://kirigami.ai/api/v1/jobs/YOUR_JOB_ID \
  -H "X-Api-Key: ip2p_YOUR_KEY"

When status becomes completed, the response includes a downloadUrl. Poll every 3 seconds.

✓Node.js example
const KEY = process.env.KIRIGAMI_API_KEY!;
const BASE = "https://kirigami.ai";

// upload → convert → poll
const up = await fetch(BASE + "/api/v1/upload", {
  method: "POST",
  headers: { "X-Api-Key": KEY },
  body: form,
}).then((r) => r.json());

const { jobId } = await fetch(BASE + "/api/v1/convert", {
  method: "POST",
  headers: { "X-Api-Key": KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    images: [{ url: up.imageUrl, id: up.imageId }],
  }),
}).then((r) => r.json());

while (true) {
  const s = await fetch(BASE + "/api/v1/jobs/" + jobId, {
    headers: { "X-Api-Key": KEY },
  }).then((r) => r.json());
  if (s.status === "completed") console.log(s.downloadUrl);
  if (s.status === "failed") throw new Error(s.errorMessage);
  await new Promise((r) => setTimeout(r, 3000));
}
Get Started

Authentication

Kirigami.ai authenticates requests via X-Api-Key. CLI tools can additionally use an OAuth-style device code flow.

Issue an API key

  • Format: ip2p_ + 64 hex chars
  • Up to 5 keys per user
  • Stored as SHA-256 hash. Revoke from dashboard at any time.

Use in requests

curl https://kirigami.ai/api/v1/jobs/YOUR_JOB_ID \
  -H "X-Api-Key: ip2p_xxxxxxxx..."
⚠Key handling
  • Store in env vars — never hardcode
  • Never expose to browser code
  • Rotate immediately if leaked

Authentication errors

HTTPcodeMeaning
401missing_api_keyHeader missing
401invalid_api_keyMalformed or revoked
402insufficient_creditsNot enough credits
Core Concepts

Jobs

Conversions run as asynchronous jobs. Submit via /convert, poll /jobs/:jobId.

Lifecycle

pending → waiting_images → processing → completed
                                           └→ failed (クレジット返却)
statusMeaningNext action
pendingJust queuedKeep polling
waiting_imagesWaiting on imagesKeep polling
processingBuilding PPTXKeep polling
completedDonedownloadUrl
failedPermanent failureerrorMessage
Core Concepts

Credits

Conversions are credit-metered. 10 credits per image, auto-refunded on failure.

ActionCost
Convert 1 image10 credits
50 images (bulk)500 credits
Upload / polling / marketplaceFree

When credits run out

// HTTP 402
{
  "success": false,
  "code": "insufficient_credits",
  "balance": 40,
  "required": 100,
  "shortage": 60
}
Core Concepts

Rate Limits

All endpoints are rate-limited. Exceeding returns HTTP 429 with a Retry-After header.

EndpointLimit
POST /convert10 / min
POST /upload20 / min
GET /jobs/:jobId60 / min
GET /marketplace20 / min
GET /marketplace/:itemId30 / min
POST /publish5 / min
POST /auth/start10 / 10min
GET /auth/poll/:id120 / 10min

Response headers

  • X-RateLimit-Limit — ceiling
  • X-RateLimit-Remaining — remaining
  • X-RateLimit-Reset — seconds until reset
  • Retry-After — 429 only
Core Concepts

Error Reference

All endpoints share a unified shape: { success: false, error, code, ...meta }.

codeHTTPDescription
missing_api_key401Header missing
invalid_api_key401Malformed or revoked
session_expired410CLI session expired
too_many_keys422Max 5 keys reached
invalid_request400Zod validation failed
invalid_json400Invalid JSON
rate_limited429Rate limit exceeded
insufficient_credits402Not enough credits
job_not_found404Job not found
item_not_found404Item not found
ng_word_detected400Prohibited words
internal_error500Unexpected server error
API Reference

Endpoint Details

Request/response shapes, rate limits, and errors for each endpoint.

POST /api/v1/convert

POSThttps://kirigami.ai/api/v1/convert

Queues a job that converts 1–50 images into a single PPTX. Returns a jobId to poll.

Request body

{
  "images": [{ "url": "<R2_URL>", "id": "img-1" }],
  "filename": "deck.pptx",
  "removeText": true
}

Response

{
  "success": true,
  "jobId": "conv_abc123...",
  "estimatedCredits": 10,
  "totalImages": 1,
  "queuedImages": 1,
  "processingMode": "qstash"
}

GET /api/v1/jobs/:jobId

GEThttps://kirigami.ai/api/v1/jobs/:jobId

Fetches job status.

Response (completed)

{
  "success": true,
  "status": "completed",
  "progress": 100,
  "downloadUrl": "https://...signed.url...",
  "completedAt": 1713000120000
}

POST /api/v1/upload

POSThttps://kirigami.ai/api/v1/upload

Uploads to R2 and returns a signed URL. Supports JSON(base64) and multipart.

curl -X POST https://kirigami.ai/api/v1/upload \
  -H "X-Api-Key: ip2p_..." \
  -F "image=@slide.png"

Limits

  • Size: up to 10 MB
  • MIME: image/png, image/jpeg, image/webp, image/gif

Marketplace

GEThttps://kirigami.ai/api/v1/marketplace

List published gallery items.

GEThttps://kirigami.ai/api/v1/marketplace/:itemId

Item detail (records a view event).

POST /api/v1/publish

POSThttps://kirigami.ai/api/v1/publish

Publish a draft to the gallery. Upload images first via /upload.

{
  "title": "My deck",
  "description": "...",
  "previewImageUrls": ["https://..."],
  "tags": ["business"]
}

CLI Auth

Three-step flow letting CLI tools receive a key without hardcoding:

POSThttps://kirigami.ai/api/v1/auth/start
POSThttps://kirigami.ai/api/v1/auth/approve
GEThttps://kirigami.ai/api/v1/auth/poll/:sessionId

Start a session → approve in browser → poll and receive the key exactly once.

OpenAPI

Interactive Reference

All endpoints are served as OpenAPI 3.1. Importable into Postman / Insomnia.

/api/openapi.json serves the raw spec.

Browse and try endpoints interactively: Open Scalar reference

Tools

CLI Guide

Convert from your terminal. Keys are issued via browser, so the CLI itself is key-free.

Install & login

npm install -g @kirigami/cli
kirigami login     # ブラウザが開いて承認

Basic usage

kirigami convert slide.png --output deck.pptx
kirigami convert slides/*.png --output pack.pptx
kirigami status conv_abc123
kirigami publish deck.pptx --title "My pitch" --tags business

CI/CD

export KIRIGAMI_API_KEY=ip2p_...
kirigami convert slide.png --output deck.pptx
Tools

MCP Guide

Connect MCP-aware clients — Claude Desktop, Claude Code, Cursor — directly to Kirigami's tools. Two transports: local stdio and remote HTTP.

Available tools

ToolPurpose
kirigami_decompose_imageSplit an image into layers and return signed URLs
kirigami_html_to_pptxConvert HTML/CSS into an editable PPTX
kirigami_get_usageFetch credit balance

Remote MCP (recommended)

One-line setup. The first call opens your browser automatically — sign in to kirigami.ai and click Allow. No API key paste.

POST/api/mcp

Claude Code / Claude Desktop / Cursor

claude mcp add --transport http kirigami https://kirigami.ai/api/mcp

The client runs OAuth 2.0 (PKCE) automatically, exchanges the auth code for a kirigami API key, and stores it. The issued key shows up at kirigami.ai/settings/api-keys as "MCP: <client name>".

Manual config (older clients)

Clients without OAuth auto-discovery can still pass an API key directly as a Bearer header.

{
  "mcpServers": {
    "kirigami": {
      "type": "http",
      "url": "https://kirigami.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer ip2p_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

How the OAuth flow works

  1. Client calls /api/mcp without auth
  2. Server returns 401 + WWW-Authenticate pointing to OAuth metadata
  3. Client fetches /.well-known/oauth-authorization-server
  4. Browser opens /oauth/authorize; user clicks Allow
  5. /api/oauth/token swaps the code + PKCE verifier for an API key
  6. Subsequent requests use the API key as a Bearer token

Local MCP (stdio)

Spawn the bundled Node.js script directly. Runs entirely locally, ideal for restricted environments.

{
  "mcpServers": {
    "kirigami": {
      "command": "node",
      "args": ["/absolute/path/to/kirigami/mcp/kirigami-mcp-server.mjs"],
      "env": {
        "KIRIGAMI_API_KEY": "ip2p_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Smoke test

KIRIGAMI_API_KEY=ip2p_xxx node ./mcp/kirigami-mcp-server.mjs <<< \
  '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
✓Which transport?
Remote MCP covers most cases. Choose local stdio when (a) MCP traffic must stay on-prem, or (b) you need to spawn the server from a fixed path inside a test or automation pipeline.
Tools

Skills Guide

`.skill` packages distributed for Claude Code / Claude Desktop. Workflows the agent invokes automatically when the user's intent matches.

Available skills

SkillUse caseCredits
kirigamiConvert an existing image to PPTX10 / image
kirigami-htmlClaude designs new slides as HTML, then exports to PPTX5 / export, 5 / decompose

Setup

Add the .skill bundle to Claude Code / Desktop. After the initial browser login, the agent runs key-free.

# 1. Skill をインポート (Claude Code)
claude skill add kirigami.skill
claude skill add kirigami-html.skill

# 2. 初回ログイン
python3 skills/kirigami/scripts/convert.py --login

# 3. あとは自然言語で
#    "この画像を PPTX にして"           -> kirigami
#    "東京の桜の名所スライド作って"      -> kirigami-html
✓Skills share the same auth
Both `kirigami` and `kirigami-html` share ~/.kirigami/config.json — log in once, use both.
Tools

Changelog

API version history. Breaking changes always bump the major version.

v1.1.0 — 2026-04-26

  • Added POST /api/v2/decompose (image layer decomposition, 5 credits/image)
  • Added POST /api/v2/html-to-pptx (HTML/CSS → editable PPTX, 5 credits)
  • Remote MCP available at POST /api/mcp
  • Local MCP stdio server bundled at mcp/kirigami-mcp-server.mjs
  • New skill kirigami-html (HTML-driven design flow)
  • POST /api/html-to-pptx is free when called from the kirigami webapp (Clerk session)

v1.0.0 — 2026-04-22

  • Public API v1 officially released
  • All endpoints contract-driven via Zod
  • Rate limits on all 9 routes
  • Error messages localized (JA/EN)
  • OpenAPI 3.1 served at /api/openapi.json
  • Interactive Scalar reference