Native API¶
The native API serves Hangar's web UI, the hangar CLI and automation, at /api/hangar/v1. It is separate from the Hugging Face Hub API that Hangar also serves.
- JSON in and out,
snake_casenames, RFC 3339 UTC times and sizes in bytes. - Errors are RFC 9457 problem details (
application/problem+json). - Lists use cursor pagination:
?cursor=&limit=(default 50, maximum 500), answered with{"items": [...], "next_cursor": "..."}. - Authenticate with
Authorization: Bearer hgr_..., or the browser session cookie plus theX-CSRF-Tokenheader.
The OpenAPI description is openapi.yaml, also in the repository at api/openapi.yaml.