Documentation
REST API, Model Context Protocol (MCP) & pay-as-you-go pricing
REST https://repic.sh/api/v1 OpenAPI /openapi.json MCP POST /mcp
1. Create a collection
curl
curl -X POST https://repic.sh/api/v1/collections \
-H "Authorization: Bearer rpx_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name":"Maraton Buenos Aires 2026","features":["faces","numbers"],"ocr_profile":"small_bibs"}'2. Upload & search
curl
# 1. Start a direct upload session (deduplicated by SHA-256)
curl -X POST https://repic.sh/api/v1/collections/col_01J.../uploads \
-H "Authorization: Bearer rpx_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"filename":"IMG_8412.jpg","content_type":"image/jpeg","content_sha256":"e3b0...","size_bytes":4821902}'
# 2. Finalize after PUT to the returned upload_url
curl -X POST https://repic.sh/api/v1/collections/col_01J.../uploads/upl_01J.../complete \
-H "Authorization: Bearer rpx_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"mode":"sync"}'
# 3. Search by selfie, bib number, and time window
curl -X POST https://repic.sh/api/v1/collections/col_01J.../search \
-H "Authorization: Bearer rpx_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"face":{"url":"https://.../selfie.jpg"},"numbers":["F6707"],"limit":100}'3. Paid original delivery
grant.ts
const res = await fetch("https://repic.sh/api/v1/grants", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.REPIC_API_KEY,
"Content-Type": "application/json",
"Idempotency-Key": `order-${orderId}`,
},
body: JSON.stringify({
asset_ids: ["ast_01J...", "ast_01K..."],
format: "zip",
expires_in_seconds: 86400 * 7,
auto_protect: true,
}),
});
const { download_url } = await res.json();Collections & Watermarks
POST
Create an event collection with indexing features & watermark/v1/collectionsGET
Get collection counts (assets, faces, numbers)/v1/collections/{id}PATCH
Update features, OCR profile, watermark or retention/v1/collections/{id}POST
Create or update a reusable PNG/WebP watermark/v1/watermarksUploads & Assets
POST
Start a presigned direct upload (SHA-256 deduplicated)/v1/collections/{id}/uploadsPOST
Initialize up to 100 upload sessions in one call/v1/collections/{id}/uploads/batchPOST
Presign up to 1,000 multipart upload parts/v1/collections/{id}/uploads/{upload_id}/partsPOST
Generate previews & run indexing/v1/collections/{id}/uploads/{upload_id}/completePOST
Protect purchased originals from retention purge/v1/collections/{id}/assets/{asset_id}/protectSearch, Fulfillment & Usage
POST
Search one collection by face, bib numbers & time window/v1/collections/{id}/searchPOST
Search across all collections in your workspace/v1/searchPOST
Stateless bib number detection without storing an asset/v1/detect/numbersPOST
Issue time-limited download links or streaming ZIP archives/v1/grantsGET
Query metered usage totals & storage breakdown/v1/usageWebhook signature verification
verify.ts
import crypto from "node:crypto";
export function verifyRepicWebhook(rawBody: string, header: string, secret: string): boolean {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
return crypto.timingSafeEqual(Buffer.from(parts.v1, "hex"), Buffer.from(expected, "hex"));
}Connect via Streamable HTTP (/mcp)
Paste into Claude Desktop, Cursor, or any MCP-compatible agent using your Repic API key.
mcp.json
{
"mcpServers": {
"repic": {
"url": "https://repic.sh/api/mcp",
"headers": {
"Authorization": "Bearer rpx_live_your_api_key"
}
}
}
}19 MCP tools
create_collection Create a collection with indexing features & watermarklist_collections List workspace collections with cursor paginationget_collection Inspect collection metadata and countsupdate_collection Update OCR profile, features or retentiondelete_collection Delete collection while preserving protected originalsupsert_watermark Upload or update a reusable PNG/WebP watermarklist_watermarks List reusable watermarksdelete_watermark Delete a watermarkcreate_upload Start a presigned direct uploadcomplete_upload Finalize upload, generate previews & run indexingindex_asset Index a photo or video by URLindex_batch Enqueue up to 1,000 asset URLs asynchronouslyget_asset Get preview URLs, dimensions, faces & bib numbersreindex_asset Re-run face or bib indexing without re-uploadingprotect_asset Toggle retention protection on purchased originalsget_batch Check async batch progresssearch_collection Search an event by selfie, bib numbers & time windowsearch_all_collections Search across all events in your workspacecreate_grant / get_grant / get_usage Issue download grants & query metered usage1 credit = $0.01 USD. Pay only for what you process — enable Auto-buy on your dashboard once and forget it.
Face indexing $0.20 / 1,000 faces
Bib number recognition $0.14 / 1,000 photos
Video processing $0.015 / video second
Face search $0.03 / 1,000 queries
Bib number search Included
Managed media storage $0.015 / GB-month
Original download delivery $0.024 / GB