{"openapi":"3.1.0","info":{"title":"Mathpix (BYOK) API","version":"0.1.0","description":"Mathpix (BYOK) lets an AI assistant read your own Mathpix data through the Mathpix API with a key you supply (Mathpix app_key (from console.mathpix.com)). Read-only: 9 tools (list_ocr_results, list_pdf_results, get_pdf_status, get_ocr_usage, list_file_jobs, get_file_job, list_file_job_files, get_file_status, list_data_sources). The BYOK key travels with each request, is used for that one call...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-mathpix.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-mathpix/docs"},"termsOfService":"https://connectorbay.com/byok-mathpix/terms"},"servers":[{"url":"https://byok-mathpix.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-mathpix/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_ocr_results":{"post":{"operationId":"list_ocr_results","summary":"Search and list your earlier image, strokes and equation OCR requests with time, endpoint, recognized text and what the ","description":"Search and list your earlier image, strokes and equation OCR requests with time, endpoint, recognized text and what the content contains (printed, handwritten, tables, chemistry). Use for \"Which handwritten images did I send to Mathpix this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page of results to return, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (default 20).","title":"Per Page"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results from this ISO datetime on (included), for example 2026-10-01T00:00:00Z.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results before this ISO datetime (excluded).","title":"To Date"},"text":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only results whose recognized text contains this string.","title":"Text"},"is_printed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include only results with printed text or math.","title":"Is Printed"},"is_handwritten":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include only results with handwriting.","title":"Is Handwritten"},"contains_table":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include only results with tables.","title":"Contains Table"},"contains_chemistry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include only results with chemistry diagrams.","title":"Contains Chemistry"},"contains_diagram":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include only results with diagrams.","title":"Contains Diagram"}},"title":"list_ocr_resultsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_pdf_results":{"post":{"operationId":"list_pdf_results","summary":"List your PDF processing requests with id, source file, status, page counts and times. Use for \"Which PDFs did I process","description":"List your PDF processing requests with id, source file, status, page counts and times. Use for \"Which PDFs did I process with Mathpix recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page of results to return, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (default 20).","title":"Per Page"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results from this ISO datetime on (included), for example 2026-10-01T00:00:00Z.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results before this ISO datetime (excluded).","title":"To Date"}},"title":"list_pdf_resultsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_pdf_status":{"post":{"operationId":"get_pdf_status","summary":"Get the processing status of one PDF request: status, page counts and percent done. Use for \"Is Mathpix PDF 113cee229ab2","description":"Get the processing status of one PDF request: status, page counts and percent done. Use for \"Is Mathpix PDF 113cee229ab27b715b7cc24cfdbb2c33 done\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pdf_id":{"description":"PDF id from list_pdf_results, for example '113cee229ab27b715b7cc24cfdbb2c33'.","maxLength":64,"title":"Pdf Id","type":"string"}},"required":["pdf_id"],"title":"get_pdf_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_ocr_usage":{"post":{"operationId":"get_ocr_usage","summary":"Get aggregated usage counts of your Mathpix account over time, grouped by usage type, request arguments or app id. Use f","description":"Get aggregated usage counts of your Mathpix account over time, grouped by usage type, request arguments or app id. Use for \"How many Mathpix image and PDF requests did I make this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"group_by":{"description":"Group the counts by this field.","enum":["usage_type","request_args_hash","app_id"],"title":"Group By","type":"string"},"timespan":{"description":"Time bucket size, for example 'month'.","maxLength":20,"title":"Timespan","type":"string"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results from this ISO datetime on (included), for example 2026-10-01T00:00:00Z.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results before this ISO datetime (excluded).","title":"To Date"}},"required":["group_by","timespan"],"title":"get_ocr_usageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_file_jobs":{"post":{"operationId":"list_file_jobs","summary":"List your Files API batch jobs, newest first, with job id and creation time; can filter by date range. Use for \"Which Ma","description":"List your Files API batch jobs, newest first, with job id and creation time; can filter by date range. Use for \"Which Mathpix batch jobs did I submit in July 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Earliest submission date to include, yyyy-MM-dd (UTC).","title":"Start"},"end":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Latest submission date to include, yyyy-MM-dd (UTC).","title":"End"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum items per page (1 to 1000, default 100).","title":"Limit"},"paging_state":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"The next_page_token of the previous response, to get the next page.","title":"Paging State"}},"title":"list_file_jobsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_file_job":{"post":{"operationId":"get_file_job","summary":"Get the status and counters of one Files API batch job: files total, completed, errored and pages processed. Use for \"Is","description":"Get the status and counters of one Files API batch job: files total, completed, errored and pages processed. Use for \"Is Mathpix batch job contracts-2026-05 finished\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Files API job id, as supplied at submission or listed by list_file_jobs, for example 'contracts-2026-05'.","maxLength":120,"title":"Job Id","type":"string"}},"required":["job_id"],"title":"get_file_jobArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_file_job_files":{"post":{"operationId":"list_file_job_files","summary":"List the files of one Files API batch job with file id, name and custom id; can show only pending, completed or errored ","description":"List the files of one Files API batch job with file id, name and custom id; can show only pending, completed or errored files. Use for \"Which files failed in Mathpix batch job contracts-2026-05\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"job_id":{"description":"Files API job id, as supplied at submission or listed by list_file_jobs, for example 'contracts-2026-05'.","maxLength":120,"title":"Job Id","type":"string"},"status":{"anyOf":[{"enum":["pending","completed","error"],"type":"string"},{"type":"null"}],"default":null,"description":"Only files in this state.","title":"Status"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Maximum items per page (1 to 1000, default 100).","title":"Limit"},"paging_state":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"The next_page_token of the previous response, to get the next page.","title":"Paging State"}},"required":["job_id"],"title":"list_file_job_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_file_status":{"post":{"operationId":"get_file_status","summary":"Get the processing status of one Files API file: status, progress, pages and the state of each requested output format. ","description":"Get the processing status of one Files API file: status, progress, pages and the state of each requested output format. Use for \"Is Mathpix file b1c9c3a8-55e4-4a09-b7d0-218ba5de4c4d finished\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"file_id":{"description":"Files API file id, for example 'b1c9c3a8-55e4-4a09-b7d0-218ba5de4c4d'.","maxLength":64,"title":"File Id","type":"string"}},"required":["file_id"],"title":"get_file_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_data_sources":{"post":{"operationId":"list_data_sources","summary":"List the cloud storage buckets registered for Files API batch processing with provider, bucket, region and auth method. ","description":"List the cloud storage buckets registered for Files API batch processing with provider, bucket, region and auth method. Secrets are never returned. Use for \"Which cloud buckets are registered with my Mathpix account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_data_sourcesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}