Skip to main content

changex-api

A thin HTTP/REST API over the ChangeX core spine, so any app or model can drive provenance-first tracked editing of Word documents over plain HTTP — a local/offline LLM with no function-calling, a curl script, or a ChatGPT custom GPT Action that imports the auto-generated OpenAPI schema.

It wraps changex-core and reuses the exact MCP tool semantics (changex-mcp): an op discriminator selects one small intent, the exact before substring is always carried so blind overwrites are refused, and an oversized op is rejected so the model splits the change.

Run

# install (workspace) and launch on 127.0.0.1:8000
uv sync
changex-api                     # or: python -m changex_api
# custom bind / port:
changex-api --host 0.0.0.0 --port 9000   # non-local host REQUIRES a token:
CHANGEX_API_TOKEN=secret changex-api --host 0.0.0.0

Bind is 127.0.0.1 by default. A non-local host is refused unless CHANGEX_API_TOKEN is set; when it is, every non-/healthz route requires Authorization: Bearer <token>.

Endpoints

Method & path Purpose
POST /sessions Open a .docx for tracked editing (returns a handle).
GET /sessions/{handle}/outline Bounded, paginated paragraph outline (discover node_ids).
POST /sessions/{handle}/edit One small, intent-named tracked edit.
POST /sessions/{handle}/save Write the native-revisions .docx + .changex journal.
GET /sessions/{handle}/changes The structured provenance journal.
POST /open Passive (no-tool-calling) capture: snapshot a docx.
POST /seal Diff the edited docx vs the baseline; append passive ops.
POST /report Render an HTML/markdown redline (by handle or .changex path).
GET /healthz Liveness probe (never requires auth).

OpenAPI / function-calling schemas

FastAPI serves the schema at /openapi.json — that file IS the ChatGPT custom GPT Action schema; point a GPT's Action import at it. Static copies plus OpenAI/Gemini function-calling schemas live in the repo's integrations/:

  • integrations/openapi.json — the dumped OpenAPI 3.1 schema (ChatGPT Actions).
  • integrations/openai-functions.json — OpenAI tools format.
  • integrations/gemini-functions.json — Gemini functionDeclarations format.

Metadata

Release files for changex-api 0.1.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for changex-api 0.1.27
File Size Uploaded Provenance Actions
changex_api-0.1.27.tar.gz 11.5 kB Without provenance Details for changex_api-0.1.27.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for changex-api 0.1.27
File Interpreter ABI Platform Actions
changex_api-0.1.27-py3-none-any.whl Python 3 none any Details for changex_api-0.1.27-py3-none-any.whl

Total release size: 24.9 kB

Release files / changex_api-0.1.27.tar.gz

Download URL changex_api-0.1.27.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5313e4652e4980bd99d9ea3d32c354aa85e773588e1818b142b11723845f6300
BLAKE2b-256 checksum
How to use checksums
5e2100946a6f3e5decaaa17cef1ab5ffb5790e505d46a4d7522fd8c783a4b6d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / changex_api-0.1.27-py3-none-any.whl

Download URL changex_api-0.1.27-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2b03487d62171a173d2b9d67d2cd3dca06c2628918cc94ed364f65cb4a71f7e
BLAKE2b-256 checksum
How to use checksums
853fc1a795eee5631621ce3c827a44af389c7a8aad72ec74fd9d6322928b00b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for changex-api 0.1.27

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page