OpenRemap Docs

API reference — the method catalogue

Every method registered with openremap.api, grouped by kind. 27 methods: 20 command, 6 composite, 1 workflow.

This page mirrors the registry at the time of writing. The registry is the live source of truth — run list_methods (see concepts) to see the current catalogue, schemas and descriptions:

import openremap.api as api
for m in api.call("list_methods", {})["methods"]:
    print(m["name"], m["kind"])

Parameter shorthand below: name: type + (required) means no default; = default shows the default; ranges like (8–128) are numeric bounds.


Atomic commands (kind="command") — 20

Each is one cohesive operation in one domain.

Identity & inspection

  • identify — identify an ECU binary: manufacturer, family, confidence, VIN. path: str (required)identify — API
  • checksum — detect which checksum schemes a binary satisfies and their OK/STALE status. path: str (required)checksum — API
  • layout — segment a binary into its flash-layout blocks. path: str (required) · min_run: int = 64 (≥1)layout — API
  • scan_vins — locate VIN candidates in a binary and score them. path: str (required) · min_confidence: float = 0.4 (0–1)scan-vins — API
  • routine — read a code routine around an offset as readable pseudo-code. path: str (required) · offset: int (required) · arch: str (c166|tricore|sh|x86|m680x|m68k|ppc) · before: int = 8 · after: int = 60routine — API

Files & scanning

  • convert — normalise an ECU image (Intel HEX / S-Record / raw) to flat bytes. path: str (required) · format: str = "auto" (auto|ihex|srec|bin) → convert — API
  • scan — batch-classify every file in a directory (never moves files). directory: str (required) · recursive: bool = Falsescan — API
  • scan_maps — one-shot scan for calibration map axes and 2D tables (CLI-shaped). path: str (required) · region_start/region_end: int · min_score: float = 0.85 (0–1) · max_series_tables: int = 16 · whole_file: bool = False · top: int = 20 · classify: bool = False · xrefs: bool = Falsescan-maps — API
  • scan_classify — scan and annotate tables with probabilistic content labels. path: str (required) · min_score = 0.85 · max_series_tables = 16 · whole_file = False · top = 20
  • scan_map_axes — stage 1 of the two-stage scan: detect axes only (cached). path: str (required) · min_axis_length: int = 4 · max_axis_length: int = 32 · min_step: int = 1 · max_step: int = 10000
  • scan_map_tables — stage 2 of the two-stage scan: pair axes into tables (cached). path: str (required) · min_table_score: float = 0.55 · max_series_tables: int = 16

The last three are the building blocks composites compose (analyze, diff_maps and health list them in their steps). They have no dedicated wiki page yet; their schemas are above.

Recipes

  • validate_before — pre-flight strict check that the recipe's original bytes are at the recorded offsets. path: str (required) · recipe: dict (required) · recipe_name: strvalidate — API
  • validate_check — diagnostic: search the whole binary for the recipe's original bytes. path: str (required) · recipe: dict (required) · recipe_name: strvalidate — API
  • validate_after — post-tune confirmation that the modified bytes were written correctly. path: str (required) · recipe: dict (required) · recipe_name: strvalidate — API
  • audit — verify that a stock binary, tuned binary and recipe belong together. stock_path: str (required) · tuned_path: str (required) · recipe: dict (required) · recipe_name: straudit — API
  • merge — merge two recipes built from the same family of originals into one. recipe_a: dict (required) · recipe_b: dict (required) · name_a: str · name_b: str · stock_path: str · strict: bool = Falsemerge — API
  • patch — atomically apply a recipe to a target binary (no validation phases). path: str (required) · recipe: dict (required) · recipe_name: str · skip_validation: bool = False

patch has no dedicated wiki page yet. The safe three-phase tune composite (below) wraps exactly this apply step between its validations.

Meta

  • ping — liveness check, always returns {"ok": True}. No params. → API index
  • version — API/library version and the active native backend. No params. → API index
  • list_methods — the live catalogue: every method's name, kind, description, schema and steps. No params. → concepts

Composites (kind="composite") — 6

Hand-written orchestrations of independent operations/domains, with control flow or coherence that a declarative workflow cannot express. Each lists the methods it composes in its steps.

  • analyze — describe a whole binary: identity, VIN, layout, maps, checksums, health. path: str (required) · fast: bool = False · skip_maps: bool = False · xref_mode: str = "v1" ("v1"|"v2") steps: identify → scan_map_axes → scan_map_tables → check_coherence → healthanalyze — API
  • health — one-shot calibration health check. path: str (required) steps: identify → checksums → scan_map_tables → segment → scan_vinshealth — API
  • cook — diff an original and a modified binary into a .remap recipe. original_path: str (required) · modified_path: str (required) · context_size: int = 32 (8–128) · require_unique: bool = True · annotate_maps: bool = True · description: str steps: diff → scan_map_tables → attach_maps → tag_instruction_regionscook — API
  • cook_volatile — cook a car-portable recipe (volatile instructions classified + excluded). original_path: str (required) · modified_path: str (required) · context_size: int = 32 (8–128) · require_unique: bool = True · no_exclude: bool = False · exclude_uncertain: bool = False · annotate_maps: bool = True steps: diff → classify_volatile → scan_map_tables → attach_maps → tag_instruction_regionscook-volatile — API
  • diff_maps — find matching calibration maps between two binaries and diff them cell-by-cell. stock_path: str (required) · tuned_path: str (required) · region_start/region_end: int · min_score: float = 0.55 · threshold: float = 0.0 · top: int = 50 · whole_file: bool = False · max_series_tables: int = 16 · recipe: dict steps: scan_map_axes → scan_map_tables → match_by_axis → diff_cellsdiff-maps — API
  • tune — the safe three-phase tune: validate before → apply → validate after. path: str (required) · recipe: dict (required) · recipe_name: str · skip_validation: bool = False · force: bool = False steps: validate_before → patch → validate_aftertune — API

Workflows (kind="workflow") — 1

Declarative .toml pipelines (no code) — see workflows.

  • identify_cook — identify both binaries, then cook a recipe in one call. inputs: original_path: str (required) · modified_path: str (required) steps: identify (as original_id) → identify (as modified_id) → cookworkflows

Method pages and surface coverage

Every command's API face lives next to its CLI page at content/<cmd>/api.md; the catalogue above links them. Points worth noting:

  • API-only methods (no CLI command of the same name): the meta trio ping / version / list_methods, the atomic patch, the staged map methods scan_classify / scan_map_axes / scan_map_tables, and the identify_cook workflow.
  • CLI-only commands (no API method): families, the workflow terminal guide and the commands cheat-sheet — see getting-started.
  • scan_maps is the CLI scan-maps method; the three validate_* methods are exposed to the terminal as openremap validate before|check|after.

See also