api-medic
A diagnostic tool for HTTP API issues. Paste a curl, upload a HAR, or fire a live request — get a structured report with plain-language findings across DNS, TLS, redirects, CORS, auth, body, and rate limiting.
Try it now
api-medic.markandrewmarquez.com — no install. The Demos tab has eight pre-built scenarios; the Run tab fires a live request from the browser (HTTPS-only, SSRF-guarded, throttled); the HAR tab takes any HAR export from DevTools.
What gets checked
20 diagnostic checks across five categories. IDs are stable and namespaced so you can filter, suppress, or reference individual findings without coupling to the human-readable title.
| Category | Checks |
|---|---|
| Network & transport (6) | network.dns.no_records, network.dns.slow, network.tls.expired, network.tls.expiring_soon, network.tls.weak_protocol, network.tls.cn_mismatch |
| HTTP semantics (5) | http.cors.misconfigured, http.headers.duplicate, http.redirect.loop, http.redirect.too_many, http.redirect.protocol_downgrade |
| Auth (4) | auth.missing, auth.jwt.expired, auth.jwt.not_yet_valid, auth.header.whitespace |
| Body / content (3) | body.malformed_json, body.content_length_mismatch, body.encoding_mismatch |
| Rate limiting (2) | rate_limit.hit (429 + Retry-After context), rate_limit.approaching (X-RateLimit-Remaining < 10% of limit) |
JWT signatures aren't verified — claims are decoded for exp / nbf checks only. Signature verification needs the issuer's secret/public key, which is out of scope for a client-side diagnostic.
See docs/architecture.md for the full check spec, evidence shape, and design rationale per check.
Install
pip install api-medic
Requires Python 3.10+. The wheel includes the local web UI bundle — no separate frontend install.
Quickstart
# Bare URL — shorthand for `api-medic run`
api-medic https://api.example.com/v1/users
# Full request: method, headers, body
api-medic run https://api.example.com/v1/users \
--method POST \
--header "Authorization: Bearer ..." \
--header "Content-Type: application/json" \
--body '{"name": "Alex Doe"}'
# Analyze a curl command (defaults to executing it)
api-medic from-curl 'curl -X GET https://api.example.com/v1/users -H "Authorization: Bearer ..."'
# Analyze a captured HAR file (no execution)
api-medic from-har session.har
# Launch the local web UI on http://localhost:8765
api-medic serve
Output flags: --output {terminal,json,markdown,html} (default terminal), --save <path>, --no-color, --verbose.
Surfaces
Four ways to use it, all powered by the same core engine — every surface produces a byte-identical Report given the same input.
┌────────┐ ┌──────────────┐ ┌─────────────┐ ┌─────────────────┐
│ CLI │ │ Local web UI │ │ Hosted demo │ │ Browser ext │
└───┬────┘ └──────┬───────┘ └──────┬──────┘ └────────┬────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌────────────────────────────────────────────────────────────────┐
│ api_medic.core.engine │
│ parser · runner (httpx + dnspython + cryptography) · │
│ 20 checks · renderers (terminal · json · markdown · html) │
└────────────────────────────────────────────────────────────────┘
│
▼
Pydantic Report
- CLI —
pip install api-medic, full feature set, four output formats. - Local web UI —
api-medic serveruns the same engine behind a browser frontend athttp://localhost:8765. No outbound calls except to the target you're diagnosing. - Hosted demo — api-medic.markandrewmarquez.com. Captured (HAR/curl) and live-run modes. Live runs are HTTPS-only, SSRF-guarded, and throttled (2 req/sec, burst 5). A redirect to plain HTTP is refused with an error, so
http.redirect.protocol_downgradecan't fire on a hosted live run; use the CLI orapi-medic serveto diagnose a downgrade. Stateless — no payload is persisted; seePRIVACY.md. - Browser extension — Chrome / Firefox MV3 DevTools panel that captures requests in-browser and posts them to the hosted analyzer. Install it from the Chrome Web Store or Firefox Add-ons; see
extension/README.mdto build and load it from source.
Architecture
A pure-Python core engine (parser + runner + 20 checks + four renderers) wrapped by four surfaces. The Lambda surface ships the runner alongside an SSRF guard for live requests; FastAPI / uvicorn are excluded so the cold-start budget stays intact even with httpx, dnspython, and cryptography shipped. The browser extension is a thin capture layer — analysis runs server-side on the hosted Lambda, which is why the same Report component renders identically in the panel and on the hosted demo.
See docs/architecture.md for the full v1 spec, including the Pydantic data model, per-check rationale, and AWS deployment topology.
Contributing
Issues and PRs welcome at github.com/marky224/api-medic. Quality gates enforced in CI: pytest, ruff check . && ruff format --check ., mypy, and make types to keep the TypeScript types in sync with the Pydantic models.
License
MIT — see LICENSE.
Metadata
Release files for api-medic 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| api_medic-1.3.0.tar.gz | 7.8 MB | With provenance | Details for api_medic-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| api_medic-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for api_medic-1.3.0-py3-none-any.whl |
Total release size: 7.9 MB
Release files / api_medic-1.3.0.tar.gz
| Download URL | api_medic-1.3.0.tar.gz |
|---|---|
| Size | 7.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d256dbbc161f724b6d0d40a5dca27ca625d2b807299d11cc2a7fb4d91e9c13ad
|
|
BLAKE2b-256 checksum How to use checksums |
39b8b29d285c695a3ebdb32b1c2dd132f286f50f6ab32f6c10b1a487aad4e86e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / api_medic-1.3.0-py3-none-any.whl
| Download URL | api_medic-1.3.0-py3-none-any.whl |
|---|---|
| Size | 132.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e8bf46e99fe7fad021100f7e308276b83454b6ef085b8f7dc26e65f13e4aaab
|
|
BLAKE2b-256 checksum How to use checksums |
433821e1b0745846cd79bdd5ce3ad3bd6ee7c5b045505300fea18c57a77ccbd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for api-medic 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for api_medic-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.