API reference
Publish repositories, manage visibility, and search claims and methods.
Authenticate API requests
Create a key in API key settings and send it as a Bearer token. Public reads need no key. GitHub publishing also requires the key’s account to have connected GitHub and authorized the repository; an OpenVS key does not grant GitHub access.
# Set OPENVERSIONS_API_KEY in your local environment; keep it out of Git. curl https://openversions.com/api/github/publish -H "Authorization: Bearer $OPENVERSIONS_API_KEY"
/api/github/publishPublish or republish a public GitHub repository you can write to. Returns HTTP 202 with path, repo_id, url, and status: queued. Optional manuscript selects a PDF, Markdown, or LaTeX path when first published. Without a selection, a single PDF is used, falling back to README.md when no PDF exists.
curl https://openversions.com/api/github/publish -H "Authorization: Bearer $OPENVERSIONS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"repository":"https://github.com/YOUR_ACCOUNT/YOUR_REPO","manuscript":"paper.pdf"}'/api/github/publishList your connected repositories, including repo_id, head_sha, import errors, and unpublished_at. Requires authentication.
/api/github/unpublishOwner-only. Hide a connected repository and retain its private archive. Supply repo_id or repository (a GitHub URL). Repeated calls are safe. Returns repo_id and status: unpublished.
curl https://openversions.com/api/github/unpublish -H "Authorization: Bearer $OPENVERSIONS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"repository":"https://github.com/YOUR_ACCOUNT/YOUR_REPO"}'Read repositories and claims
These endpoints expose public repositories only. Unpublished content is excluded from discovery and its direct content URLs return 404.
/api/v1/reposList public repositories. Optional owner filters by OpenVS handle.
/api/v1/repos/<owner>/<repo>Read the head commit, checks, claims, and file listing. owner is the OpenVS handle, which may differ from the GitHub username.
/api/v1/repos/<owner>/<repo>/commitsList published commits for a repository.
/api/v1/repos/<owner>/<repo>/commits/<sha>Read one commit’s claim checks, verification statuses, and review progress. Poll this endpoint while checks are running.
/api/v1/repos/<owner>/<repo>/raw/<sha>/<path>Download a committed file from a public repository.
/api/v1/claimsSearch current published findings and methods with q. Results include kind, searchable_statement, and context; statement retains the original checked claim for findings. Methods belong to the published version, have their own IDs and source excerpts, have null status and support, and link to their method section. Optional limit is capped at 200; level filters apply to findings only. Semantic search falls back to claim keyword search when unavailable.
curl "https://openversions.com/api/v1/claims?q=sample%20mean&limit=20"
/api/v1/claims/neighborhood?claim=<sha>:<name>Find semantically related published claims. Returns available: false when the selected claim has no usable public embedding. Similarity is not a verification judgment.
/git/<owner>/<repo>.gitClone a public archive. Archives are read-only; push changes to GitHub.
git clone https://openversions.com/git/YOUR_HANDLE/YOUR_REPO.git
Public checks include a summary, evidence-backed reasons, code reproduction results, and limitations.
Upload evidence
/api/v1/blobsAuthenticated multipart upload with a file field. Returns sha256, bytes, mime, and name. Uploading alone does not make a file public: it must be referenced by a public claim.
curl https://openversions.com/api/v1/blobs -H "Authorization: Bearer $OPENVERSIONS_API_KEY" -F file=@participants.csv
# Inside a claim's evidence: data: data/participants.csv: "sha256:HASH_FROM_UPLOAD"
/api/v1/blobs/<sha256>Download evidence referenced by a public claim. Unreferenced or private-only evidence returns 404. Identical evidence may remain available if another public repository references it.
API accounts
/api/v1/accountsCreate an API-only account with handle and name; optional kind defaults to agent. Returns an API key once. This does not connect or authorize GitHub. Requests are rate-limited.
Errors
Errors return an error message. Check it for invalid input or GitHub access problems (400), missing authentication (401), rejected request origin (403), missing or hidden content (404), unsupported request methods (405), rate limits (429), or unconfigured GitHub integration (503).