Contents
1. Authentication
All endpoints require a Supabase JWT passed as a Bearer token. You must have an account — sign up or sign in.
Authorization: Bearer <your-supabase-access-token>How to get a token
- Sign in at scholaccess.com/login.
- Open browser DevTools → Application tab → Local Storage → https://scholaccess.com.
- Find the key whose value is a JSON object containing access_token. That JWT is your Bearer token.
- Send it as Authorization: Bearer <token> on every request.
Tokens expire (typically 1 hour). Refresh by re-visiting the site or using the Supabase SDK to call refreshSession(). Requests without a valid token return HTTP 401.
GET /api/account.
2. Core developer workflow
Remediation is asynchronous. The typical integration is:
Send your file(s) as multipart/form-data. The response returns one job_id per accepted file. For files larger than 25 MB, use the chunked upload flow (/api/upload/init → /chunk → /complete) instead.
Poll every 3–10 seconds. Watch status and percent_done. Stop when status is COMPLETED, FAILED, or CANCELLED.
Follow the 302 redirect to a signed download URL. The remediated file has the same format and name as the original. Download links are valid for 7 days.
# Minimal shell example
TOKEN="eyJ..." # your Supabase JWT (see "How to get a token" above)
# 1. Upload
JOB_ID=$(curl -s -X POST https://scholaccess.com/api/upload \
-H "Authorization: Bearer $TOKEN" \
-F "files=@lecture.pptx" \
| jq -r '.job_ids[0]')
# 2. Poll until done
while true; do
STATUS=$(curl -s https://scholaccess.com/api/jobs/$JOB_ID \
-H "Authorization: Bearer $TOKEN" | jq -r '.status')
echo "Status: $STATUS"
[ "$STATUS" = "COMPLETED" ] && break
[ "$STATUS" = "FAILED" ] && { echo "Job failed"; exit 1; }
sleep 5
done
# 3. Download
curl -L -O -J https://scholaccess.com/api/jobs/$JOB_ID/download \
-H "Authorization: Bearer $TOKEN"
3. Endpoint reference
POST /api/upload Auth required
Upload one or more files for accessibility remediation. Accepts PPTX, DOCX, PDF, XLSX, and common image formats (JPG, PNG, GIF, WebP, BMP, TIFF, HEIC). Each accepted file is queued and assigned a job ID. Files that are unsupported, too large (>25 MB), or exceed page/slide limits for your plan are reported in skipped but do not fail the request.
/api/upload/init
→
/chunk
→
/complete)
instead.
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
files | file (repeatable) | Yes | One or more files to remediate. Send each as a separate files part. |
replace_suboptimal_alt | string | No | "true" or "1" — evaluate existing alt text and replace it when AI generates a better description. |
| Field | Type | Description |
|---|---|---|
job_ids | string[] | UUID for each accepted file, in order. |
skipped | string[] | Human-readable reasons for rejected files (empty on full success). |
curl -X POST https://scholaccess.com/api/upload \ -H "Authorization: Bearer $TOKEN" \ -F "files=@slides.pptx" \ -F "files=@handout.pdf"
# Response
{
"job_ids": ["a1b2c3d4-...", "e5f6a7b8-..."],
"skipped": []
}
POST /api/upload/init Auth required
Begin a chunked upload for a single large file (typically >25 MB).
Returns an upload_id and the server's
preferred chunk size. Follow this with repeated
POST
/api/upload/{upload_id}/chunk calls, then finalize with
POST
/api/upload/{upload_id}/complete.
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
filename | string | Yes | Original filename (with extension). |
total_size | number | Yes | Total file size in bytes. |
content_type | string | No | MIME type (inferred from filename if omitted). |
replace_suboptimal_alt | boolean | No | See POST /api/upload. |
| Field | Type | Description |
|---|---|---|
upload_id | string | Identifier used in subsequent chunk / complete calls. |
chunk_size | number | Recommended chunk size in bytes. |
curl -X POST https://scholaccess.com/api/upload/init \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"filename": "book.pdf", "total_size": 104857600}'
POST /api/upload/{upload_id}/chunk Auth required
Upload a single chunk of a chunked upload. Chunks must be sent sequentially starting at index 0. Returns the index of the next expected chunk.
Path parameters| Parameter | Description |
|---|---|
upload_id | From POST /api/upload/init. |
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
chunk_index | number | Yes | Zero-based index of this chunk. |
chunk | file | Yes | Chunk bytes. |
| Field | Type | Description |
|---|---|---|
received | number | Total bytes received so far. |
next_chunk_index | number | Index to send next. |
POST /api/upload/{upload_id}/complete Auth required
Finalize a chunked upload. The server reassembles the chunks, validates
the file, and enqueues the remediation job. Returns a
job_id that you can poll with
GET
/api/jobs/{job_id}.
| Parameter | Description |
|---|---|
upload_id | From POST /api/upload/init. |
| Field | Type | Description |
|---|---|---|
job_id | string | UUID of the enqueued remediation job. |
skipped | string[] | Populated if the reassembled file was rejected (e.g., unsupported type). |
curl -X POST https://scholaccess.com/api/upload/abc123/complete \ -H "Authorization: Bearer $TOKEN"
GET /api/jobs/{job_id} Auth required
Poll the status and metadata for a single remediation job. Returns 404 if the job does not exist or belongs to a different account.
Path parameters| Parameter | Description |
|---|---|
job_id | UUID returned by POST /api/upload. |
| Field | Type | Description |
|---|---|---|
id | string | Job UUID. |
status | string | Current status — see Status values. |
filename | string | Original uploaded filename. |
percent_done | number | Progress 0–100. Live during processing; 100 on completion. |
stage_detail | string | Human-readable phase label (e.g. "Remediating"). |
queue_position | number | null | Position in queue; null once processing starts. |
has_output | boolean | true when the remediated file is ready for download. |
error | string | null | Human-readable error message when status is FAILED. |
error_type | string | null | Machine-readable error class for FAILED jobs. |
post_check | object | null | Accessibility check summary produced after remediation (when enabled). |
chunk_progress | object | null | {"completed": N, "total": N} for large PDFs split into chunks. |
created_at | string | ISO 8601 timestamp. |
curl https://scholaccess.com/api/jobs/a1b2c3d4-... \ -H "Authorization: Bearer $TOKEN"
# Response (completed)
{
"id": "a1b2c3d4-...",
"status": "COMPLETED",
"filename": "slides.pptx",
"percent_done": 100,
"has_output": true,
"post_check": { ... },
"created_at": "2026-04-23T14:00:00Z"
}
GET /api/jobs/{job_id}/download Auth required
Download the remediated output file for a completed job. In production this returns a 302 redirect to a signed GCS download URL — use curl -L or follow redirects in your HTTP client. Returns 400 if the job is not yet completed.
# Download and save with the server-provided filename curl -L -O -J https://scholaccess.com/api/jobs/a1b2c3d4-.../download \ -H "Authorization: Bearer $TOKEN"
GET /api/account Auth required
Return the authenticated user's account information, including current plan tier and monthly usage / quota counts. Useful for client-side quota displays and for checking remaining capacity before a large upload.
Response fields (selected)| Field | Type | Description |
|---|---|---|
user | object | Profile info (id, email, name). |
tier | string | Plan name (e.g. free, starter, pro, power, unlimited). |
quota | object | Monthly quota: {"used": N, "limit": N}. limit may be null for unlimited plans. |
institution | object | null | Linked institution, if any. |
subscription | object | null | Active subscription details (status, renewal date). |
curl https://scholaccess.com/api/account \ -H "Authorization: Bearer $TOKEN"
OpenAPI spec & Swagger UI
The documented API endpoints are described by a machine-readable OpenAPI 3.x
spec auto-generated by FastAPI. The spec contains only the endpoints
documented on this page. All endpoints require the
Authorization: Bearer header described in
section 1.
| URL | Description |
|---|---|
/api/openapi.json |
OpenAPI JSON spec. Suitable for import into Postman, Insomnia, or code generators. |
/api/docs |
Interactive Swagger UI — try endpoints directly in the browser. |
4. Job status values
The status field in job responses takes one of these values:
| Status | Meaning |
|---|---|
PENDING | Job is queued and waiting for a worker. Check queue_position. |
PROCESSING | A worker is actively remediating the file. Check percent_done. |
COMPLETED | Remediation finished. The output file is available at GET /api/jobs/{job_id}/download. |
FAILED | Remediation failed. See error (human-readable) and error_type (machine-readable). |
CANCELLED | Cancelled by the user or the system. No output is available. |