docs

Log | Files | Refs | Activity

root / src / osma / utility.md

utility.md (1234B)


      1 ---
      2 label: Utility Endpoints
      3 icon: tools
      4 order: 510
      5 ---
      6 
      7 # Utility Endpoints
      8 
      9 These endpoints are available on both the NPM and PyPI APIs. Examples below use the NPM base URL.
     10 
     11 ## GET /debug-ip
     12 
     13 Returns the IP address the API proxy recorded for your request, along with parsed headers — useful for troubleshooting rate-limit blocks across networks.
     14 
     15 ```bash
     16 curl https://notamitgamer-osma-npm-api.hf.space/debug-ip
     17 ```
     18 
     19 ## GET /get-bypass
     20 
     21 Issues a cryptographically signed token that lets you skip all rate limits for 1 hour. Requires the correct `secret` parameter. Include the returned token on subsequent requests as the `X-Bypass-Token` header.
     22 
     23 | Parameter | Type | Required | Description |
     24 |---|---|---|---|
     25 | `secret` | string | required | The developer bypass secret |
     26 
     27 ```bash
     28 curl "https://notamitgamer-osma-npm-api.hf.space/get-bypass?secret=YOUR_SECRET_HERE"
     29 ```
     30 
     31 ```json
     32 {
     33   "bypass_token": "1714420000:a1b2c3d4...",
     34   "valid_for_seconds": 3600,
     35   "usage": "Send as header: X-Bypass-Token: <token>"
     36 }
     37 ```
     38 
     39 ## GET /rebuild
     40 
     41 Forces the server to re-download the latest CSV dataset from HuggingFace and rebuild the SQLite database in the background. Requires the `secret` parameter. Responds with `503` while rebuilding.
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror