PlayScan Developers

API documentation

Base URL: https://api.playscan.app. All requests use HTTPS and return JSON, except the result download.

Download the OpenAPI file

Quickstart

Three calls: send the page, ask until it is done, download the score. Replace the key with yours from the dashboard.

export PS_KEY=ps_live_YOUR_KEY

# 1. Send the page. The answer carries the scan id.
curl -s -X POST https://api.playscan.app/v1/scans \
  -H "Authorization: Bearer $PS_KEY" \
  -F "files=@page1.jpg"

# 2. Ask for the status every 2 seconds until it says "done".
curl -s https://api.playscan.app/v1/scans/SCAN_ID -H "Authorization: Bearer $PS_KEY"

# 3. Download the score.
curl -s "https://api.playscan.app/v1/scans/SCAN_ID/result?format=musicxml" \
  -H "Authorization: Bearer $PS_KEY" -o score.musicxml

Want to see the result first? Try a page in your browser, no account needed.

Want a complete script with retries and error handling? Read the step-by-step guide for Python, Node and curl.

Official clients: pip install playscan for Python and npm install playscan for Node. They upload the pages, wait for the scan, retry when the API asks and download the result in one call. Source and examples are on GitHub.

Authentication

Send your key in the Authorization header as a bearer token on every request. Keys start with ps_live_. The full key is shown once, when you create or regenerate it. Keep it on your server and out of public code.

Authorization: Bearer ps_live_YOUR_KEY

Every response to a valid key, errors included, carries an X-Balance-Pages header with the pages left on your balance.

Call the API from your server, not from a web page. CORS is not enabled, so browsers block requests from other sites.

Create a scan

POST /v1/scans with multipart form data.

files
One or more JPEG, PNG or TIFF images, or one PDF. Required.
options
Optional JSON object as a form field. pageRange is [first, last], counted from 1, and applies to a PDF.
curl -X POST https://api.playscan.app/v1/scans \
  -H "Authorization: Bearer ps_live_YOUR_KEY" \
  -F "files=@page1.jpg" \
  -F "files=@page2.jpg"

The answer is 202 with the scan id, its status and the number of pages that will be read.

{
  "id": "0b6f6d2e-...",
  "status": "queued",
  "pages": 2
}

The pages are held from your balance when you send the scan. Pages that were not read are returned when the scan ends.

To read part of a PDF, add pageRange.

curl -X POST https://api.playscan.app/v1/scans \
  -H "Authorization: Bearer ps_live_YOUR_KEY" \
  -F "files=@score.pdf" \
  -F 'options={"pageRange":[1,3]}'

Send exactly the same files with the same options again and you get the same id back with deduplicated: true. Nothing is charged a second time. This also holds for a scan that failed, for 1 hour after it failed: you get the old failed answer. Change the files or the options to try again sooner.

{
  "id": "0b6f6d2e-...",
  "status": "done",
  "pages": 2,
  "deduplicated": true
}

Poll status

GET /v1/scans/{id}. Poll every 2 seconds. There is no webhook.

curl https://api.playscan.app/v1/scans/SCAN_ID \
  -H "Authorization: Bearer ps_live_YOUR_KEY"
{
  "id": "0b6f6d2e-...",
  "status": "processing",
  "progress": 40,
  "pages": 2,
  "chargedPages": null,
  "error": null,
  "queuePosition": 0,
  "etaSeconds": 35
}
queued
Waiting for a free worker. queuePosition and etaSeconds say how long.
processing
Being read. progress goes from 0 to 100.
done
Finished. The result is ready to download.
failed
The scan could not be read. error holds the reason, for example no_staff_lines or omr_failed. Pages are returned.
canceled
You canceled it while it was queued.

pages is how many pages were sent. chargedPages is how many were actually read and charged. It is null until the scan finishes.

Get the result

GET /v1/scans/{id}/result?format=… Available when the status is done, for 24 hours.

musicxml
MusicXML, the default.
mxl
Compressed MusicXML.
midi
A standard MIDI file.
zip
score.musicxml, score.mxl and score.mid in one archive.
curl "https://api.playscan.app/v1/scans/SCAN_ID/result?format=musicxml" \
  -H "Authorization: Bearer ps_live_YOUR_KEY" \
  -o score.musicxml

Before the scan is done you get 409 not_ready. After 24 hours you get 410 result_expired. If the scan found no music you get 404 no_music.

You are charged only for the pages that were read. A page that could not be read is returned to your balance.

Cancel

DELETE /v1/scans/{id} cancels a scan that is still queued. The held pages go back to your balance.

curl -X DELETE https://api.playscan.app/v1/scans/SCAN_ID \
  -H "Authorization: Bearer ps_live_YOUR_KEY"
{ "id": "0b6f6d2e-...", "status": "canceled" }

Once a scan is processing it cannot be stopped: you get 409 already_processing. A finished scan gives 409 already_finished.

Balance

GET /v1/balance returns the pages you have left.

curl https://api.playscan.app/v1/balance \
  -H "Authorization: Bearer ps_live_YOUR_KEY"
{ "pages": 48 }

Pricing

The unit is a page. Buy pages in packs with a one-time payment in the dashboard, under Billing.

  • Starter

    $10

    100 pages

    $0.100 per page

  • Builder

    $40

    600 pages

    $0.067 per page

  • Studio

    $125

    2,500 pages

    $0.050 per page

  • Scale

    $350

    10,000 pages

    $0.035 per page

  • You pay per page: one page of sheet music takes one page from your balance.
  • Pages that could not be read are not charged.
  • Pages never expire.
  • Every new developer gets 10 free trial pages (once per email address).

Need more than 10,000 pages a month? Contact us

Errors

Every error has the same shape: a code, a human-readable message and the HTTP status. Some add fields such as balance, required, max or retryAfter. A failed scan is different: the error field of its status holds a reason code from the reading step, for example no_staff_lines or omr_failed, not one of the codes above.

{
  "code": "insufficient_balance",
  "message": "Not enough pages on balance.",
  "balance": 1,
  "required": 2
}
CodeHTTPMeaning
unauthorized401The API key is missing, malformed or revoked.
account_blocked402This developer account is blocked.
insufficient_balance402Not enough pages on the balance for this scan.
not_found404No scan with this id on your account.
no_music404The scan finished but contains no music to export in the requested format.
not_ready409The scan is not done (still running, failed or canceled). Check its status.
already_processing409The scan is already being processed, so it can no longer be canceled.
already_finished409The scan has already finished, so there is nothing to cancel.
result_expired410The result was deleted after 24 hours.
too_many_pages422More than 30 pages in one scan.
upload_too_large422A file is over 30 MB, or the upload is over 60 MB in total.
unsupported_file422Send JPEG, PNG or TIFF images, or one PDF.
bad_format422format must be musicxml, mxl, midi or zip.
bad_request422The request is malformed, for example no files or invalid options.
too_many_active429You already have 2 active scans. Wait for one to finish.
rate_limited429Too many requests. Wait the number of seconds in retryAfter.
internal_error500Unexpected server error. For POST /v1/scans the scan was not accepted and no pages were charged. Retry shortly.
busy503The service is busy. Retry shortly.

Limits

Limits apply per account.

Pages per scan30
Upload size30 MB per file, 60 MB in total
Request body64 MB. A larger request gets HTTP 413 from the edge (see below)
Active scans per account (queued + processing)2
POST /v1/scans10 per minute
All other requests120 per minute
Result retention24 hours
Recommended polling interval2 seconds

A request body larger than 64 MB is rejected at the edge, before it reaches the API, with HTTP 413. That answer is not JSON and has no code or message, so do not try to parse it. Check the total size of your files before you upload: the API itself accepts up to 60 MB in total (larger uploads get 422 upload_too_large).

Data handling

  • The result is kept for 24 hours, then deleted.
  • Uploaded images are deleted after 24 hours and are never used to train models.
  • You are charged only for pages that were actually read.
  • The same files sent again return the same id and charge nothing again (1 hour after a failed scan).
  • A scan can be canceled only while it is queued.
  • There is no webhook. Poll the status every 2 seconds.

Changelog

  • 2026-11-29 — Official Python and Node clients: pip install playscan and npm install playscan.
  • 2026-11 — First version: scans, status, result, cancel and balance.