{"openapi":"3.0.3","info":{"title":"CaptionPass HTTP API","version":"1.2.0","description":"Bearer-authenticated caption API with two jobs: POST /api/v1/process fixes a caption file for a platform, and /api/v1/library/* produces evidence, a signed record per file and the library report. Included with every offer except the free account. Every response carries X-Request-Id; send your own (8 to 128 of letters, digits, \".\", \"_\", \"-\") or one is minted. Each key may make 45 requests per clock minute across every route; responses after the key is accepted carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds), and a 429 rate_limited carries Retry-After. Human-readable reference: /docs/api","contact":{"name":"CaptionPass","url":"https://www.captionpass.com/docs/api","email":"support@captionpass.com"}},"servers":[{"url":"https://www.captionpass.com","description":"CaptionPass production"}],"tags":[{"name":"Process","description":"Fix a caption file for a platform"},{"name":"Library","description":"Produce evidence: add files with a signed record each, read their answers, download records, the library report"},{"name":"Account","description":"Who the key acts as, its terms and usage"},{"name":"API keys","description":"Key management"}],"paths":{"/api/v1/process":{"post":{"operationId":"processCaption","summary":"Process caption file (multipart)","tags":["Process"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Processed captions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessSuccess"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Declared Content-Length or file too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"The engine could not parse or check the file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"SRT, VTT, SBV, ASS, TTML, or JSON IR"},"preset":{"type":"string","enum":["youtube","tiktok","html5","generic","lms","instagram-reels","linkedin","vimeo","facebook","zoom","developer-json"],"default":"youtube"},"fixProfile":{"type":"string","enum":["warn-only","layout-preserve-breaks","auto-split-sentences","auto-split-cps"]},"standard":{"type":"string","enum":["wcag-2.1-aa","en-301-549","fcc-79.1","dcmp"],"description":"Accessibility standard to grade against. Independent of preset. Adds report.standard; an unrecognised value is rejected."}}},"example":{"file":"sample.srt","preset":"youtube"}}}}}},"/api/v1/library/files":{"post":{"operationId":"addLibraryFiles","summary":"Add caption files to the library: each is checked, signed and counted against the workspace's hours","tags":["Library"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"One result per file; a refused file never fails the rest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAddResponse"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The workspace's access has ended. It is read-only: every file, record and report can still be read through the API, and nothing new can be added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Declared Content-Length or file too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"description":"Each file is checked by the same engine as the app, signed, stored, and its running time counted against the workspace's caption hours. A file already in the library comes back as `duplicate` and costs nothing, so sending the same files again is safe. A read-only workspace answers 403 `access_ended`. Only a free account's monthly hours ever refuse a file (`over_allowance`); granted and paid access is counted, never stopped. `vendorId` names who captioned the files, from the workspace's own vendor list; an id the workspace does not have rejects every file with `unknown_vendor` and adds nothing. `replaces` names the file a corrected file is for (one file per request); a file with no open fix request is rejected with `not_requested`. Without `replaces`, an added file is still matched to an open fix request by its wording, and the result says so in `matched` or `candidates`.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","maxItems":10,"items":{"type":"string","format":"binary"},"description":"Up to 10 caption files: SRT, VTT, TTML, SBV, ASS or JSON captions. A single `file` part also works."},"group":{"type":"string","maxLength":80,"description":"A free-text group, such as a course or a collection."},"vendorId":{"type":"string","description":"Who captioned these files: a vendor id from the workspace's vendor list (managed in the app; the ids are in the report's `scorecard.rows[].vendorId`). The workspace's statement, never written into the signed record."},"replaces":{"type":"string","description":"The fileId of the file this corrected file is for. Send exactly one file with it. The file must have an open fix request."}}},"example":{"files":["sample.srt"],"group":"API examples"}}}}},"get":{"operationId":"listLibraryFiles","summary":"One page of the library, newest first, with the whole library summed","tags":["Library"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"One page of the library, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryListResponse"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"description":"One page of files, newest first, with `summary` covering the whole library. Send `nextCursor` back as `cursor` until `hasMore` is false. A file added during a walk neither repeats nor skips another.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `nextCursor` of the previous page."}]}},"/api/v1/library/files/{fileId}":{"get":{"operationId":"getLibraryFile","summary":"One file: its answers for every criterion, and its signed record","tags":["Library"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"The file and its signed record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryFileResponse"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{8,64}$"}}]}},"/api/v1/library/files/{fileId}/record":{"get":{"operationId":"downloadLibraryRecord","summary":"Download the signed record, verifiable at /api/verify-receipt without an account","tags":["Library"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"The signed record, as an attachment. Check it with POST /api/verify-receipt { receipt }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedRecord"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{8,64}$"}}]}},"/api/v1/library/report":{"get":{"operationId":"getLibraryReport","summary":"The library report, as JSON","tags":["Library"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"The library report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryReport"}}}},"303":{"description":"The report is larger than one answer carries: follow Location to download it","headers":{"Location":{"description":"A link to the report, valid for 5 minutes","schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"type":"object","required":["url","expiresIn","bytes","files"],"properties":{"url":{"type":"string","format":"uri"},"expiresIn":{"type":"integer"},"bytes":{"type":"integer"},"files":{"type":"integer"}}}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"description":"One document across every file, not paged. Past 5,000,000 bytes it is written to a file and the answer is 303 See Other, with `Location` and `url` a link to it that works for 5 minutes; a client that follows redirects receives the report either way."}},"/api/v1/me":{"get":{"operationId":"getMe","summary":"Who the key acts as, and the terms its workspace runs on","tags":["Account"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/usage":{"get":{"operationId":"getUsage","summary":"Daily usage snapshot","tags":["Account"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/api-keys":{"get":{"operationId":"listApiKeys","summary":"List API keys (masked)","tags":["API keys"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createApiKey","summary":"Create API key (one-time secret)","tags":["API keys"],"security":[{"BearerAuth":[]}],"responses":{"201":{"description":"Key created with one-time secret","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}},"example":{"name":"CI integration","scopes":["process:write","account:read","usage:read"]}}}}}},"/api/v1/api-keys/{keyId}/renew":{"post":{"operationId":"renewApiKey","summary":"Renew an API key (extends expiresAt; the secret does not change)","tags":["API keys"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/api-keys/{keyId}":{"delete":{"operationId":"deleteApiKey","summary":"Revoke API key","tags":["API keys"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid JSON or multipart body, bad preset or standard, missing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing Bearer token, or a key nobody has heard of.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Missing scope (details.missingScope), terms that do not include the API (details.missingFeature: v1_api), a role that does not allow it, or a call that did not come through www.captionpass.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No route matches that method and path, or the named resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"The key's rate limit for this clock minute is used up. Retry-After says how long to wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Unhandled server failure. The message is deliberately generic; the detail is in our logs, not in your response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"A backing store is not available. Nothing was changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"cp_live_…","description":"API key from Dashboard → Settings → API keys"}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized","api_key_revoked","api_key_expired","forbidden","access_ended","access_suspended","rate_limited","quota_exceeded","bad_request","payload_too_large","payload_too_large","processing_failed","not_found","internal_error","unavailable"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string","description":"The same value as the X-Request-Id response header. Quote it when you contact us."}}}}},"LibraryFile":{"type":"object","description":"One file in the library and its answers for every criterion of every standard.","required":["fileId","fileName","uploadedAt","sha256","durationMs","counts","criteria","receiptId","verdict","signed"],"properties":{"fileId":{"type":"string"},"fileName":{"type":"string"},"group":{"type":"string"},"uploadedBy":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}}},"uploadedAt":{"type":"string","format":"date-time"},"bytes":{"type":"integer"},"sha256":{"type":"string","description":"SHA-256 of the file's bytes as delivered, byte-order mark included, so it matches sha256sum. Files added before engine 0.2.0 carry the hash of their text without a byte-order mark."},"cueCount":{"type":"integer"},"durationMs":{"type":"integer","description":"Caption running time, which the workspace's hours count."},"counts":{"type":"object","additionalProperties":{"type":"integer"}},"standards":{"type":"array","items":{"type":"object"}},"criteria":{"type":"array","items":{"type":"object"}},"failing":{"type":"array","items":{"type":"object"}},"findingsTotal":{"type":"integer"},"receiptId":{"type":"string"},"verdict":{"type":"string","enum":["pass","fail"]},"engineVersion":{"type":"string"},"signed":{"type":"boolean"},"vendorId":{"type":"string","description":"Who captioned it, from the workspace's vendor list. Absent when none is named."},"replaces":{"type":"string","description":"On a corrected file: the fileId of the file it replaces."},"replacedBy":{"type":"string","description":"On a replaced file: the corrected file that replaced it. A replaced file stays readable and leaves the library's totals."},"origin":{"type":"object","description":"Set when the file is a caption track from a connected YouTube channel rather than an upload.","properties":{"kind":{"type":"string","enum":["youtube"]},"sourceId":{"type":"string"},"videoId":{"type":"string"},"trackId":{"type":"string"},"trackLastUpdated":{"type":"string","format":"date-time"}}}}},"LibraryAddResult":{"type":"object","required":["status","fileName"],"properties":{"status":{"type":"string","enum":["added","duplicate","rejected"]},"fileName":{"type":"string"},"file":{"$ref":"#/components/schemas/LibraryFile"},"existing":{"type":"object","properties":{"fileId":{"type":"string"},"fileName":{"type":"string"}}},"requestId":{"type":"string","description":"On a duplicate: the open fix request, when the bytes are the requested file's own."},"matched":{"type":"object","description":"On an added file that settled a fix request: the request, the file it replaces, how it was matched, and whether the request is now resolved.","properties":{"requestId":{"type":"string"},"replaces":{"type":"string"},"how":{"type":"string","enum":["chosen","api","matched"]},"resolved":{"type":"boolean"}}},"candidates":{"type":"array","description":"On an added file that more than one open fix request could belong to: those requests. The file is added unmatched, for a person to choose.","items":{"type":"object","properties":{"requestId":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"}}}},"reason":{"type":"string","enum":["empty","too_large","media_file","binary","not_utf8","no_captions","too_many_captions","unreadable","over_allowance","not_requested","unknown_vendor"]},"message":{"type":"string"}}},"LibraryAddResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/LibraryAddResult"}},"summary":{"type":"object","properties":{"added":{"type":"integer"},"duplicate":{"type":"integer"},"rejected":{"type":"integer"}}}}},"LibraryListResponse":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/LibraryFile"}},"summary":{"type":"object","additionalProperties":true,"description":"The whole library, on every page."},"hasMore":{"type":"boolean"},"nextCursor":{"type":"string","description":"Present when more files remain. Send it back as `cursor`."}}},"LibraryFileResponse":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/LibraryFile"},"record":{"$ref":"#/components/schemas/SignedRecord"}}},"SignedRecord":{"type":"object","description":"The signed record for one file. Records made now are the newest version; older ones keep the version they were signed with and verify as they did. A version 4 record of a corrected file carries `replaces`: the record it replaces and whether the spoken words are the same. Anyone can check it at /verify or POST /api/verify-receipt, without an account.","required":["receiptId","version"],"properties":{"receiptId":{"type":"string"},"version":{"type":"integer","enum":[2,3,4]},"replaces":{"type":"object","description":"Version 4 on, only on the record of a corrected file matched to a fix request.","additionalProperties":true}},"additionalProperties":true},"LibraryReport":{"type":"object","description":"The library report across every file: per standard, per criterion, and per file, with what was measured of accuracy. The summary and standards count current files only; a file replaced by a corrected file is listed with `replacedBy`.","required":["kind","version","vendorsAssignedBy","scorecard","workspace","generatedAt","summary","standards","files","requests"],"properties":{"kind":{"type":"string","enum":["captionpass.library-report"]},"version":{"type":"integer","enum":[5]},"vendorsAssignedBy":{"type":"string","enum":["workspace"],"description":"Every vendor named in the report was named by the workspace; CaptionPass does not decide who captioned a file."},"workspace":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"summary":{"type":"object","additionalProperties":true,"description":"Totals over current files, and `accuracy`: measured from a recorded batch, or not measured."},"standards":{"type":"array","items":{"type":"object","additionalProperties":true}},"files":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"fileId":{"type":"string"},"fileName":{"type":"string"},"recordId":{"type":"string"},"answer":{"type":"string","enum":["pass","fail"]},"vendor":{"type":"string","nullable":true,"description":"The vendor's name, as the workspace named it."},"replaces":{"type":"string","nullable":true},"replacedBy":{"type":"string","nullable":true}}}},"requests":{"type":"array","description":"Every fix request: the file, the vendor's name when it was made, its state, the criteria it asks about, and each corrected file matched to it.","items":{"type":"object","additionalProperties":true,"properties":{"requestId":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"vendor":{"type":"string","nullable":true},"state":{"type":"string","enum":["open","resolved","closed"]},"createdAt":{"type":"string","format":"date-time"},"resolvedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"closeReason":{"type":"string","nullable":true},"criteria":{"type":"array","items":{"type":"object","additionalProperties":true}},"correctedFiles":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"scorecard":{"type":"object","nullable":true,"additionalProperties":true,"description":"The vendor scorecard, counted as the Vendors page counts it: one row per vendor (`rows[].vendorId`, `name`, `kind`, first deliveries, failures per criterion, fixes, and accuracy only from a sample of that vendor's files) and one for files naming no vendor; comparisons only where the statistics hold. Null when no vendor is named.","properties":{"rows":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"vendorId":{"type":"string","nullable":true},"name":{"type":"string"},"kind":{"type":"string","enum":["company","staff","automatic"],"nullable":true},"firstDeliveries":{"type":"integer"}}}}}},"inventory":{"type":"object","additionalProperties":true,"description":"Only when a manifest listed a video with no captions or flagged any video (PASS-462): `videos` listed with no captions, their `videoMs` (video hours, never caption hours), `withoutRunningTime`, `public` and `courseRequired` as `{ videos, withoutCaptions }`, `flagsBy: \"workspace\"` (the institution's own flags), and the `list` of those videos."},"videoLibrary":{"type":"array","description":"Only when the workspace has a connected YouTube channel: per channel, its videos by answer as of when the list was last read, and the video hours with no captions (never caption hours).","items":{"type":"object","properties":{"channel":{"type":"string"},"kind":{"type":"string","enum":["youtube"]},"readAt":{"type":"string","format":"date-time","nullable":true},"videos":{"type":"integer"},"passing":{"type":"integer"},"failing":{"type":"integer"},"noCaptions":{"type":"integer"},"notYetKnown":{"type":"integer"},"noCaptionsVideoMs":{"type":"integer"},"monitored":{"type":"boolean","description":"Whether new uploads are watched: Program and Contract."},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"removed":{"type":"integer","description":"Videos gone from the channel, not counted in `videos`."},"tracksStale":{"type":"integer","description":"Checked videos whose track lists are older than 30 days."},"earlierVersions":{"type":"integer","description":"Earlier versions of edited tracks kept in the library, not counted."}}}}}},"ProcessSuccess":{"type":"object","properties":{"report":{"type":"object","description":"Diagnostic report. Carries `standard` — a clause-by-clause verdict — only when the request named one."},"output":{"type":"string","description":"Delivery caption file body"},"aidedOutput":{"type":"string"},"aidedReport":{"type":"object"},"suggestions":{"type":"array","items":{"type":"object"}},"aidedSameAsDelivery":{"type":"boolean"},"deliveryStatus":{"type":"string","enum":["ready","will_adapt","needs_attention"]},"aidedStatus":{"type":"string","enum":["ready","will_adapt","needs_attention"]},"remainingApiRunsToday":{"type":"integer"}}}}}}