Skip to main content
POST
/
benchmarks
/
add
curl --request POST \
  --url https://api.comparebench.com/benchmarks/add \
  --header 'Content-Type: multipart/form-data' \
  --cookie session= \
  --form build_id=5821 \
  --form 'benchmarks={"id": 15, "runs": [38500, 38450]}' \
  --form files='@example-file'
{}
This endpoint uses multipart/form-data, not JSON. The benchmarks field is a JSON-encoded string — serialize the object before sending.

Supported benchmark types

BenchmarkIDFile requiredFile format
Cinebench R2315No
Cinebench R203No
3DMark Port Royal7YesTDMark XML export
3DMark Speed Way17YesTDMark XML export
3DMark Steel Nomad18YesTDMark XML export
STALKER 216YesPresentMon CSV
The upload flow differs by benchmark type: Score-only (Cinebench) Send build_id and benchmarks as form fields. No file needed. Multiple runs can be submitted in one request via the runs array.
curl -X POST https://api.comparebench.com/benchmarks/add \
  -H "Cookie: session=<value>" \
  -F "build_id=5821" \
  -F 'benchmarks={"id": 15, "runs": [38500, 38450]}'
File-based (3DMark, STALKER 2) Attach the result file as files. The runs array is not used — scores are parsed from the file.
# 3DMark Port Royal — attach the XML export from 3DMark
curl -X POST https://api.comparebench.com/benchmarks/add \
  -H "Cookie: session=<value>" \
  -F "build_id=5821" \
  -F 'benchmarks={"id": 7}' \
  -F "files=@PortRoyal_result.xml"

# STALKER 2 — attach the PresentMon CSV
curl -X POST https://api.comparebench.com/benchmarks/add \
  -H "Cookie: session=<value>" \
  -F "build_id=5821" \
  -F 'benchmarks={"id": 16}' \
  -F "files=@presentmon_output.csv"
Use GET /benchmarks/types to retrieve the current list of active benchmark type IDs before submitting. The IDs in the table above are stable but the full active list may expand over time.
A 402 response means you’ve reached the run limit for your billing tier.

Authorizations

session
string
cookie
required

Session cookie set by POST /login/yardstick

Body

multipart/form-data
build_id
integer
required

ID of the build to attach this benchmark to

benchmarks
string
required

JSON-encoded benchmark payload. See examples below for the shape by benchmark type.

files
file

Required for 3DMark (XML result export) and STALKER 2 (PresentMon CSV). Omit for Cinebench.

Response

Benchmark added successfully

The response is of type object.