SimplyPNG/Documentation

API Test Report

Production end-to-end test results for the SimplyPNG API v1. Tests cover authentication, input validation, job processing, batch operations, idempotency, and credit verification.

Test Summary
100%
Pass Rate
49
Total Tests
47
Passed
0
Failed
https://simplypng.appFebruary 26, 20262 skipped
Auth6/6 passed
AUTH-001No key → 401401

Got 401

188ms
AUTH-002Invalid key format → 401401

Got 401

102ms
AUTH-003Bearer header → 200200

balance: 504

187ms
AUTH-004X-API-Key header → 200200

Got 200

104ms
AUTH-005Revoked key (SKIP)

API_REVOKED_KEY not set

AUTH-006Expired key (SKIP)

API_EXPIRED_KEY not set

AUTH-007Correlation header in response (CF-Ray / X-Request-ID)

cf-ray: null, x-request-id: req_1772097806212_c93149039f1f

131ms
AUTH-008Rate limit headers in POST /api/v1/jobs response

limit: 60, remaining: 59

2533ms
Validation7/7 passed
VAL-001Missing image → 400400

code: MISSING_IMAGE

92ms
VAL-002Invalid image value → 400400

code: INVALID_IMAGE_FORMAT

81ms
VAL-003Invalid output_mode → 400400

code: INVALID_OUTPUT_MODE

154ms
VAL-004Unsupported MIME type (BMP) → 400 (BUG-011 regression)400

code: UNSUPPORTED_FORMAT

80ms
VAL-005SSRF localhost → blocked400

code: SSRF_BLOCKED

597ms
VAL-006SSRF metadata endpoint → blocked400

code: SSRF_BLOCKED

606ms
VAL-007Batch 51 images → 400400

code: BATCH_TOO_LARGE

338ms
Jobs6/6 passed
JOB-001URL input, download_url output → 201201

job: xxxxxxxx

1260ms
JOB-002Job completes with succeeded status

status: succeeded

6393ms
JOB-003job.result.url present after completion

result.url present

JOB-004output_mode: base64_json → 201201

job: xxxxxxxx

2042ms
JOB-005base64_json job completes

status: succeeded

9778ms
JOB-006Non-existent job → 404404

Got 404

91ms
Options10/10 passed
OPT-001HD mode → 201201

job: xxxxxxxx

2223ms
OPT-002HD mode deducts 2 credits

status: succeeded, credits used: 2 (expected 2)

9496ms
OPT-003refine_edges (HD + refine) → 201 (v1.1.0)201

job: xxxxxxxx

1597ms
OPT-004refine_edges job succeeds

status: succeeded

21821ms
OPT-005max_dimension: 800 → 201 (v1.1.0)201

job: xxxxxxxx

1926ms
OPT-006max_dimension job succeeds

status: succeeded

18670ms
OPT-007White background option → 201201

job: xxxxxxxx

1959ms
OPT-008White background job succeeds

status: succeeded

6310ms
OPT-009Centered + standard canvas (2000×2000) → 201201

job: xxxxxxxx

1403ms
OPT-010Centered job succeeds

status: succeeded

6311ms
Batch6/6 passed
BATCH-0012-image batch → 201/202202

batch: batch_xxxxxxxx

1640ms
BATCH-0022-image batch completes, 2 credits deducted

status: completed, credits: 2/2

9700ms
BATCH-0035-image batch (incl. HEIC) → 201/202202

batch: batch_xxxxxxxx

1802ms
BATCH-0045-image batch completes

status: completed

15663ms
BATCH-005Empty images array → 400400

code: INVALID_REQUEST

539ms
BATCH-00651-image batch → 400 (over limit)400

code: BATCH_TOO_LARGE

322ms
Usage4/4 passed
USAGE-001GET /api/v1/usage → 200 with transactions200

status: 200, has transactions: true

105ms
USAGE-002GET /api/v1/usage?limit=3 → max 3 items200

count: 3, limit: 3

90ms
USAGE-003GET /api/v1/usage?type=debit → only debits200

count: 20, all debits: true

90ms
USAGE-004GET /api/v1/usage without key → 401401

Got 401

66ms
Idempotency5/5 passed
IDEMP-001First request with idempotency key → 201201

job: xxxxxxxx

2090ms
IDEMP-002Duplicate request returns same job ID200

first: xxxxxxxx, second: xxxxxxxx

770ms
IDEMP-003Only 1 credit deducted despite duplicate request

before: 487, after: 486, used: 1 (expected 1)

IDEMP-004Parallel race (5 concurrent, same key) → all resolved IDs match

resolved: 1/5, unique IDs: 1 (expected 1)

2487ms
IDEMP-005Race: only 1 credit deducted despite 5 requests

credits used: 1 (expected 1)

Credits3/3 passed
CREDIT-001GET /credits returns balance + ownerType200

balance: 485, ownerType: user, currency: credits

105ms
CREDIT-002Standard job deducts 1 credit

before: 485, after: 484, used: 1

15983ms
CREDIT-003HD mode deducts 2 credits

before: 484, after: 482, used: 2

22296ms

Tests run against https://simplypng.app using the SimplyPNG API test suite v2. Source: scripts/test-api-production-v2.ts