---
title: "Run PiperSR benchmark suite"
method: POST
path: "/v1/benchmark/upscale"
tags: ["Image"]
---

# Run PiperSR benchmark suite

`POST /v1/benchmark/upscale`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/benchmark/upscale`
- Auth: HTTP bearer

Runs the PiperSR 2x benchmark suite (A-G). Tiled pipeline (A-E): single-tile latency,
batch throughput, full-frame 720p, sustained 300 frames, resolution sweep.
Full-frame pipeline (F): auto-discovers all PiperSR_2x_video_* models, compares
cpuAndNeuralEngine vs all compute units, reports p50/p95/p99 percentiles.
End-to-end (G): synthetic H.264 through full decode/upscale/encode path.
Takes 60-120 seconds. Only one benchmark can run at a time (429 if concurrent).

## Response `200`

Benchmark results with timing data and recommendation

- UpscaleBenchmarkResults: Full benchmark suite results with timing data, resolution sweep, and recommendation
  - `single_tile` object: Benchmark A: Single tile latency (1000 iterations)
  - `batch_throughput` object: Benchmark B: Batch throughput at sizes 1/2/4/8
  - `full_frame720p` object: Benchmark C: Full frame pipeline at 720p
  - `sustained` object: Benchmark D: 300-frame sustained throughput
  - `resolution_sweep` object[]: Benchmark E: 480p, 720p, 1080p pipeline timing
  - `full_frame_pipeline` object[], nullable: Benchmark F: Per-model full-frame results with compute unit comparison and p50/p95/p99
  - `end_to_end` object, nullable: Benchmark G: End-to-end H.264 pipeline throughput with I/O overhead
  - `recommendation` string
  - `formatted_table` string: ASCII-formatted results table

## Other responses

- `429`: A benchmark is already in progress
- `503`: CoreML upscale service not available

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
