docs

git clone https://github.com/notamitgamer/docs.git
· rebuilt hourlyOpen on GitHub
root / osma / utility.mdx

utility.mdx (1257B)


      1 ---
      2 title: "Utility Endpoints"
      3 ---
      4 
      5 import Copyright from "/snippets/copyright.mdx";
      6 
      7 These endpoints are available on both the NPM and PyPI APIs. Examples below use the NPM base URL.
      8 
      9 ## GET /debug-ip
     10 
     11 Returns the IP address the API proxy recorded for your request, along with parsed headers — useful for troubleshooting rate-limit blocks across networks.
     12 
     13 ```bash
     14 curl https://notamitgamer-osma-npm-api.hf.space/debug-ip
     15 ```
     16 
     17 ## GET /get-bypass
     18 
     19 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.
     20 
     21 | Parameter | Type | Required | Description |
     22 |---|---|---|---|
     23 | `secret` | string | required | The developer bypass secret |
     24 
     25 ```bash
     26 curl "https://notamitgamer-osma-npm-api.hf.space/get-bypass?secret=YOUR_SECRET_HERE"
     27 ```
     28 
     29 ```json
     30 {
     31   "bypass_token": "1714420000:a1b2c3d4...",
     32   "valid_for_seconds": 3600,
     33   "usage": "Send as header: X-Bypass-Token: <token>"
     34 }
     35 ```
     36 
     37 ## GET /rebuild
     38 
     39 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.
     40 
     41 <Copyright />