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();