Pinin
Restore, colorize and upscale old photographs. Enterprise plan required, one credit per restoration.
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"pinin": {
"command": "npx",
"args": [
"pinin-mcp"
]
}
}
}Runnable packages
1.1.3stdioRemote endpoints
https://pinin.ai/api/mcpstreamable-httpWhat it can do
Tool inventory
Tools (8)
🔴pinin_restore_photo(image_url, images, image_base64, mime_type, mode, ...)
Queue photographs for restoration — damage repair, colorization, deblurring, upscaling — on the account behind the key. Send one photo as a public https `image_url` (preferred) or as `image_base64`, or up to 100 with `images`. Costs one credit per image, charged when the job settles and refunded automatically if it fails. Returns the new job in `pending` and does not wait: read the result with pinin_get_restoration. Pass `idempotency_key` when a retry must not charge twice, and `dry_run: true` to price a request without spending. Not for reading, listing or cancelling existing jobs — those are pinin_get_restoration, pinin_list_restorations and pinin_cancel_restoration.
Input Schema
{
"type": "object",
"properties": {
"image_url": {
"type": "string",
"description": "Public https URL of one photograph. Any image format; the URL must be reachable by Pinin, not a private or localhost address."
},
"images": {
"type": "array",
"description": "Batch of up to 100 photographs, each a public https URL string or an object with `image_url`. Use this instead of `image_url` for more than one photo; `images` wins if both are given.",
"items": {
"type": [
"string",
"object"
]
}
},
"image_base64": {
"type": "string",
"description": "Inline image as base64 or a data URL. Single image only, and only when the photo cannot be hosted: prefer `image_url` for anything over a few megabytes."
},
"mime_type": {
"type": "string",
"description": "Content type of `image_base64`, for example `image/jpeg` or `image/png`. Ignored when the input is a URL."
},
"mode": {
"type": "string",
"enum": [
"all-in-one",
"dust-scratch",
"colorize",
"deblur-upscale",
"upscale-only"
],
"description": "What to do to the photo. `all-in-one` (default) repairs damage and improves the image in one pass; `dust-scratch` removes specks and scratches only; `colorize` adds colour to black-and-white photos; `deblur-upscale` fixes soft focus and enlarges; `upscale-only` enlarges without other changes. Call pinin_list_modes for the cost of each."
},
"seed": {
"type": "integer",
"description": "Deterministic output: the same seed with the same image and mode gives the same result. Omit for a fresh variation."
},
"metadata": {
"type": "object",
"description": "Your own JSON object, max 2 KB. Stored on the job, returned by pinin_get_restoration and echoed in webhook payloads — use it to carry your own identifier."
},
"idempotency_key": {
"type": "string",
"description": "8–128 printable ASCII characters. A repeat with the same key returns the jobs the first call created instead of queueing and charging again."
},
"dry_run": {
"type": "boolean",
"description": "Price the request without spending credits or queueing anything. The answer is a `dry_run` object with `credits_required`, `credits_balance` and `valid` instead of a restoration."
}
},
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "`restoration`, or `dry_run` when `dry_run` was true."
},
"id": {
"type": "string",
"description": "Restoration id — pass it to pinin_get_restoration, pinin_download_restoration or pinin_cancel_restoration."
},
"status": {
"type": "string",
"description": "`pending` on creation; progresses to `processing`, `completed` or `failed`."
},
"mode": {
"type": "string",
"description": "The restoration mode the job was queued with."
},
"order_number": {
"type": "string",
"description": "Human-readable order reference for support."
},
"credits": {
"type": "integer",
"description": "Credits this job will charge, or charged if it already settled."
},
"seed": {
"type": [
"integer",
"null"
],
"description": "The deterministic seed in force, or null when unset."
},
"metadata": {
"type": [
"object",
"null"
],
"description": "The metadata object supplied at creation."
},
"expires_at": {
"type": "string",
"description": "ISO 8601 instant when the input and output files are deleted."
},
"created_at": {
"type": "string",
"description": "ISO 8601 creation instant."
},
"updated_at": {
"type": "string",
"description": "ISO 8601 instant of the last state change."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "ISO 8601 completion instant, or null while running."
},
"error": {
"type": [
"object",
"null"
],
"description": "Failure detail ({ code, message }) when status is `failed`, otherwise null."
},
"images": {
"type": [
"object",
"null"
],
"description": "Signed URLs (`original`, `restored`), each `{ url, expires_in }` in seconds — null until the job completes."
},
"share_url": {
"type": [
"string",
"null"
],
"description": "Public share link for the restored photo, or null before completion."
},
"credits_required": {
"type": "integer",
"description": "Credits the request would cost (dry_run only)."
},
"credits_balance": {
"type": "integer",
"description": "Balance at the time of pricing (dry_run only)."
},
"valid": {
"type": "boolean",
"description": "Whether the request would be accepted (dry_run only)."
}
},
"description": "Either a `restoration` document (one job queued, or the first of a batch) or, with `dry_run`, a pricing document."
}🟢pinin_get_restoration(id)
Read one restoration by id: status (`pending`, `processing`, `completed`, `failed`), mode, credits charged, the failure detail when it failed, when the files expire, and signed image URLs plus a share link once it completes. Call it after pinin_restore_photo, waiting at least the `retry_after` seconds the response carries; to follow several jobs, sweep pinin_list_restorations with `updated_since` instead of polling each id. Read-only and free. An unchanged pending job may answer from its weak ETag without a body.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Restoration id returned by pinin_restore_photo — the `id` field of the restoration document."
}
},
"required": [
"id"
],
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `restoration`."
},
"id": {
"type": "string",
"description": "Restoration id."
},
"status": {
"type": "string",
"description": "`pending`, `processing`, `completed` or `failed`."
},
"mode": {
"type": "string",
"description": "Restoration mode the job was queued with."
},
"order_number": {
"type": "string",
"description": "Human-readable order reference."
},
"credits": {
"type": "integer",
"description": "Credits charged by this job."
},
"seed": {
"type": [
"integer",
"null"
],
"description": "Deterministic seed in force, or null."
},
"metadata": {
"type": [
"object",
"null"
],
"description": "Metadata supplied at creation."
},
"expires_at": {
"type": "string",
"description": "ISO 8601 instant when files are deleted — download before this."
},
"created_at": {
"type": "string",
"description": "ISO 8601 creation instant."
},
"updated_at": {
"type": "string",
"description": "ISO 8601 instant of the last state change."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "ISO 8601 completion instant, or null while running."
},
"error": {
"type": [
"object",
"null"
],
"description": "`{ code, message }` when the job failed, otherwise null."
},
"images": {
"type": [
"object",
"null"
],
"description": "`{ original: { url, expires_in }, restored: { url, expires_in } }` once complete; null before that."
},
"share_url": {
"type": [
"string",
"null"
],
"description": "Public share link for the restored photo, or null."
}
},
"description": "One restoration document, with the same fields pinin_restore_photo returns."
}🟢pinin_list_restorations(limit, status, mode, created_before, created_before_id, ...)
List the account's restorations, newest first, one page at a time, with `has_more` and the `next_cursor` / `next_cursor_id` pair for the following page. Filter by `status` or `mode`, or pass `updated_since` to collect every job that changed since the instant your poller last ran — that is the reconciliation sweep, and it replaces tracking ids. Use this instead of pinin_get_restoration when following more than one job; use pinin_get_restoration for the full document of a single id. Read-only and free.
Input Schema
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "Page size, 1–100. Default 20."
},
"status": {
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"description": "Return only jobs in this state. Omit for every job regardless of state."
},
"mode": {
"type": "string",
"enum": [
"all-in-one",
"dust-scratch",
"colorize",
"deblur-upscale",
"upscale-only"
],
"description": "Return only jobs queued with this restoration mode. Omit for every mode."
},
"created_before": {
"type": "string",
"description": "ISO 8601 cursor: `next_cursor` from the previous page. Pages newest-first, so this walks backwards in time."
},
"created_before_id": {
"type": "string",
"description": "Tiebreaker cursor: `next_cursor_id` from the previous page. Send it with `created_before` or the page boundary can repeat a job."
},
"updated_since": {
"type": "string",
"description": "ISO 8601 instant; only jobs whose state changed at or after it. The sweep a poller runs instead of remembering ids."
}
},
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `list`."
},
"data": {
"type": "array",
"description": "Restoration documents, same shape as pinin_get_restoration; empty when nothing matches.",
"items": {
"type": "object"
}
},
"has_more": {
"type": "boolean",
"description": "True when another page exists — request it with `created_before` and `created_before_id`."
},
"next_cursor": {
"type": [
"string",
"null"
],
"description": "Cursor for the next page, or null on the last page."
},
"next_cursor_id": {
"type": [
"string",
"null"
],
"description": "Tiebreaker for the next page, or null on the last page."
}
},
"description": "One page of restoration documents, newest first."
}🟢pinin_download_restoration(id, image)
Get the signed URL for a finished photograph, valid about an hour, with `expires_at` so you know when it lapses. `image: "restored"` (default) is the repaired file; `"original"` is the file that was sent in. Call it only once a job is `completed` — a pending, processing or failed job has nothing to download, and re-reading a completed job already returns the same URLs. Read-only and free: it re-signs the link, not the credits, and does not touch the job.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Restoration id of a completed job — the `id` field from pinin_restore_photo or pinin_list_restorations."
},
"image": {
"type": "string",
"enum": [
"restored",
"original"
],
"description": "Which file to link. `restored` (default) is the repaired photograph; `original` is the submitted file."
}
},
"required": [
"id"
],
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `download`."
},
"url": {
"type": "string",
"description": "Signed https URL for the image; expires within the hour."
},
"expires_at": {
"type": "string",
"description": "ISO 8601 instant when the signature lapses."
},
"http_status": {
"type": "integer",
"description": "The upstream redirect status, normally 302."
}
},
"description": "A signed download link."
}🔴pinin_cancel_restoration(id)
Cancel a restoration that has not started processing. A queued job has not been charged, so cancelling costs nothing and refunds nothing; once the pipeline has picked it up the call fails with `too_late_to_cancel` and the credit stands. Check pinin_get_restoration first when the state is unknown. Writes job state — with pinin_restore_photo it is the only tool that changes anything.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Restoration id to cancel — the `id` field from pinin_restore_photo or pinin_list_restorations."
}
},
"required": [
"id"
],
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `restoration`."
},
"id": {
"type": "string",
"description": "Restoration id."
},
"status": {
"type": "string",
"description": "`cancelled` on success."
},
"credits": {
"type": "integer",
"description": "Credits charged — zero for a job cancelled while queued."
},
"error": {
"type": [
"object",
"null"
],
"description": "`{ code, message }`, for example `too_late_to_cancel`."
}
},
"description": "The cancelled restoration document, same shape as pinin_get_restoration with status `cancelled`."
}🟢pinin_get_account
Read the account behind the key: plan tier and status, credit balance, batch cap, concurrency, the key's requests per minute, the monthly cap and spend so far, and how many keys are active. Read it before queueing a large batch to size the request, and after a plan or balance failure — it stays readable on an empty balance, so a blocked account can see why. Read-only and free. For per-day history use pinin_get_usage.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `account`."
},
"email": {
"type": "string",
"description": "Account email."
},
"plan": {
"type": "object",
"description": "`{ tier, status, credits, renews_at }` — `status` is `active` for a usable account."
},
"limits": {
"type": "object",
"description": "`{ batch_cap, concurrency, requests_per_minute, monthly_credit_cap, monthly_credit_spend }` — size batches to `batch_cap` and stay under `concurrency`."
},
"keys_active": {
"type": "integer",
"description": "Active API keys on the account."
}
},
"description": "The account, its plan and the limits that apply to the calling key."
}🟢pinin_get_usage(days)
Read usage analytics for the last `days`: totals for requests, errors, restorations and credits; the current month's credits used and balance; a per-key breakdown; and a per-day series. Use it to explain a spend, a spike in errors or a quiet account; use pinin_get_account for the current limits and balance on their own. Read-only and free.
Input Schema
{
"type": "object",
"properties": {
"days": {
"type": "integer",
"description": "Window in days, 1–90. Default 30. The monthly block is calendar-month, not this window."
}
},
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `usage`."
},
"period_days": {
"type": "integer",
"description": "Length of the window in days."
},
"totals": {
"type": "object",
"description": "`{ requests, errors, restorations, credits }` for the window."
},
"monthly": {
"type": "object",
"description": "`{ period, credits_used, restorations, credits_balance }` for the calendar month."
},
"by_key": {
"type": "array",
"description": "Per-key rows for the month, with the key prefix and its share of spend.",
"items": {
"type": "object"
}
},
"daily": {
"type": "array",
"description": "One row per day: `{ day, requests, error_requests, restorations, credits }`.",
"items": {
"type": "object"
}
}
},
"description": "Usage totals, the current month, a per-key breakdown and a per-day series."
}🟢pinin_list_modes
List the restoration modes available to this account, each with its id, display name, what it changes in the photograph and its credit cost. Read it before choosing `mode` for pinin_restore_photo, or to explain the options to a user in their own words. Takes no arguments, costs nothing and does not touch any job.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output Schema
{
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Always `list`."
},
"data": {
"type": "array",
"description": "One row per mode: `{ id, name, description, credits }`; `id` is the value pinin_restore_photo expects in `mode`.",
"items": {
"type": "object"
}
}
},
"description": "The modes available to the account."
}Community
Evidence