Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

serving-openmed-rest-api

Skill by maziyarpanahi

Sets up OpenMed's FastAPI REST service for clinical NER, PII extraction, and de-identification. It suits developers who need to serve OpenMed over HTTP inside their own infrastructure.

  • Score 79
  • 5.8k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install serving-openmed-rest-api

Built from the published package, never by AI.

git clone --depth 1 https://github.com/maziyarpanahi/openmed /tmp/openmed && mkdir -p ~/.claude/skills && cp -r /tmp/openmed/skills/serving-openmed-rest-api ~/.claude/skills/serving-openmed-rest-api

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install serving-openmed-rest-api in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides the setup of openmed.service, a FastAPI app that exposes OpenMed's clinical NER, PII extraction, and de-identification over HTTP. It covers installing the service extra, launching the app with uvicorn or building it with create_app, and calling the endpoints for health, analysis, PII extraction, de-identification, and model management. It also covers configuring the runtime through environment variables, such as model preloading, keep-alive, resident model limits, and dynamic batching.

The service is designed to be self-hosted. Models run on-device, the source states there is no telemetry, and request schemas reject unknown fields. The skill also gives a Dockerfile example and notes on keeping PHI out of logs. It is aimed at teams building an internal de-identification microservice, an NER backend, or a containerized inference tier.

Written from the project's SKILL.md and checked against it.

What it can do

  • GET /healthReturns liveness, version, and the active configuration profile.
  • POST /analyzeRuns clinical named entity recognition on a text input.
  • POST /pii/extractDetects PII and PHI spans in submitted text.
  • POST /pii/deidentifyMasks, removes, replaces, hashes, or shifts dates in PHI.
  • GET /models/loadedReports the cache and keep-alive status of resident models.
  • POST /models/unloadUnloads one model or all inactive models to free memory.
  • ServiceRuntime env varsConfigures preloading, keep-alive, resident model caps, and batching.
  • Container setupShows a Dockerfile that runs the service on port 8000.

What you need

  • Python
  • pip with the openmed[service] extra (FastAPI, uvicorn, pydantic)
  • Docker (only for the containerized setup)

Try asking

  • Set up OpenMed as a FastAPI service on port 8000 for clinical NER.
  • Write a Dockerfile that serves OpenMed and preloads a clinical NER model.
  • Show me how to call the /pii/deidentify endpoint with mask as the method.

Good to know

  • The app has no built-in authentication, CORS, or TLS. A reverse proxy or gateway is needed.
  • Request and response body logging should be avoided because it can expose PHI.
  • Responses with keep_mapping or policy can re-identify patients and must be handled securely.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/serving-openmed-rest-api/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to serving-openmed-rest-api

All alternatives →

Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database

serving-openmed-rest-api: common questions

Does the OpenMed REST service send data to external servers?

The source says models run on-device and the service has no telemetry. Inference stays on the machine where the service runs.

Which endpoints does the OpenMed REST service expose?

It exposes /health, /analyze, /pii/extract, /pii/deidentify, /models/loaded, and /models/unload. Request fields are validated strictly, and unknown fields are rejected.

How can I reduce first-request latency in the OpenMed service?

Set OPENMED_SERVICE_PRELOAD_MODELS to warm models at startup. The source notes that preloading avoids first-request latency but uses more memory.

How do I install serving-openmed-rest-api?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is serving-openmed-rest-api free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is serving-openmed-rest-api safe to use?

It scores 79 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to serving-openmed-rest-api?

Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.

serving-openmed-rest-api Install

Add to stack

Loading.