Skip to main content

    BioBERT API & automation

    BioBERT job payloads for the ner, re and qa tasks and the entity-span JSON they return. BioBERT is deprecated and chat cannot call it.

    This page lets you run BioBERT programmatically — submitting NER, relation extraction, or question answering jobs, polling status, and downloading annotated results. The task type you choose and the entity or relationship types you request most shape what comes back.

    Not available in chat

    BioBERT is deprecated on the platform and not registered with the orchestrator, so chat cannot call it. A current LLM performs BioBERT's entity extraction and relevance ranking natively over text retrieved with PubMed; for curated identifiers an LLM must not invent (NCBI Gene IDs, MeSH terms), use PubTator3. Existing BioBERT job results remain viewable.

    API overview

    BioBERT API enables programmatic access to biomedical text mining tasks including Named Entity Recognition (NER), Relation Extraction (RE), and Question Answering (QA). The underlying model is pre-trained on PubMed abstracts (4.5B words) and PMC full-text articles (13.5B words), providing superior performance on biomedical NLP benchmarks.

    Job submission

    • Create a BioBERT job through the Jobs API with POST /api/v1/jobs
    • Specify task type: ner (Named Entity Recognition), re (Relation Extraction), or qa (Question Answering)
    • Upload text files (TXT, CSV) or provide PubMed IDs for automatic abstract retrieval
    • For NER: specify entity types (genes, diseases, chemicals, species, mutations)
    • For RE: specify relationship types (drug-disease, gene-disease, protein-protein)
    • For QA: provide context text and question(s)

    Request example

    {
      "task_type": "ner",
      "entity_types": ["gene", "disease", "chemical"],
      "input_type": "text",
      "texts": ["BRCA1 mutations increase breast cancer risk..."],
      "confidence_threshold": 0.8
    }

    Polling status

    • Poll GET /api/v1/jobs/{jobId} until completion
    • Status values: queued, running, succeeded, failed
    • Large batches may take several minutes depending on document count
    • Progress updates available for batch jobs showing processed/total documents
    • Respect rate limit headers; use exponential backoff for polling

    Downloading results

    • The finished job record lists the annotated text or CSV artifacts; see Artifacts & Storage
    • NER results: JSON with entity spans, types, and confidence scores
    • RE results: JSON with entity pairs, relationship types, and evidence text
    • QA results: Answers with confidence scores and supporting passages
    • All outputs include original text offsets for highlighting

    Output example (NER)

    {
      "entities": [
        {
          "text": "BRCA1",
          "type": "gene",
          "start": 0,
          "end": 5,
          "confidence": 0.97
        },
        {
          "text": "breast cancer",
          "type": "disease",
          "start": 25,
          "end": 38,
          "confidence": 0.94
        }
      ]
    }

    Error handling

    • Text too long: Automatic segmentation into 512-token chunks with overlap for context preservation
    • Invalid characters: Automatic cleanup of encoding issues and special characters
    • Empty text: Skipped with warning in batch mode; returns error in single-document mode
    • Rate limiting: 429 status with Retry-After header
    • Model timeout: Retry with smaller batch size

    Supported entity types

    Entity TypeDescriptionExample
    geneGene and protein namesBRCA1, TP53, EGFR
    diseaseDisease and condition namesbreast cancer, diabetes
    chemicalDrug and chemical namesmetformin, aspirin
    speciesOrganism nameshuman, mouse, E. coli
    mutationGenetic variantsV600E, c.1234A>G

    Programmatic workflow

    1. Prepare input: Format text or collect PubMed IDs
    2. Submit job: POST with task type and parameters
    3. Poll status: Monitor until completion
    4. Download results: Retrieve annotated output
    5. Process entities: Parse JSON for downstream analysis

    Was this page helpful?

    On this page

    On this page

    Loading...