• v0.1.0 cf7fd89c18

    v0.1.0 Stable

    2nd1st released this 2026-05-31 21:28:27 +08:00 | 93 commits to main since this release

    api-log v0.1.0 is the first public backend release: a transparent LLM gateway trace recorder for sub2api, CLIProxyAPI (CPA), new-api, and other OpenAI-compatible gateway stacks.

    Quick start

    docker pull ghcr.io/2nd1st/api-log:0.1.0
    

    Minimal Docker Compose shape:

    services:
      gateway:
        # sub2api / CPA / new-api / your existing gateway
        expose: ["7860"]
    
      api-log:
        image: ghcr.io/2nd1st/api-log:0.1.0
        ports:
          - "7861:7861"
          - "7862:7862"
        environment:
          APILOG_PROXY_UPSTREAM: http://gateway:7860
        volumes:
          - ./api-log-data:/data
    

    Point clients at http://localhost:7861 instead of the gateway port. Read captured traces from the authenticated read API on http://localhost:7862.

    Supported protocol surfaces

    • OpenAI Chat Completions: /v1/chat/completions
    • Anthropic Messages: /v1/messages
    • OpenAI Responses: /v1/responses
    • OpenAI Image Generations: /v1/images/generations
    • Gemini generate/stream surfaces used by compatible gateways

    Streaming responses are captured as SSE event arrays where the protocol exposes SSE.

    Security notice

    api-log records raw HTTP traffic. `Authorization` and `x-api-key` headers are written to JSONL exactly as clients sent them. Treat the `data/` directory like production API-key material: run api-log only on trusted networks, restrict filesystem access, and apply disk-encryption / backup policy accordingly.

    The proxy listener does not authenticate clients. Network access control belongs at the operator layer.

    Viewer

    The companion UI is released separately:

    https://github.com/2nd1st/api-log-viewer/releases/tag/v0.1.0

    This backend can serve the pinned viewer bundle at `/viewer/` by default. The backend fetches the pinned dist.zip, verifies its SHA-256, extracts it into `data/viewer-cache/`, and serves it without embedding HTML into the binary.

    Out of scope

    Token accounting, redaction, billing, and eval pipelines are not built into api-log — they run as downstream JSONL processors. Replay returns recorded responses to read-API callers only; it never re-contacts the upstream LLM gateway. Hosted viewer updates are pinned by backend release; there is no auto-update path by design.

    v0.1.x direction

    Protocol edge cases, read-API filters, viewer pin updates, and adopter docs for sub2api / CPA / new-api deployments.

    Downloads