Codag
Sign in
REST API

REST API

Send logs over HTTPS and get back the lines that matter.

Send logs over HTTPS and get back the lines that matter. The authed endpoint takes an Authorization: Bearer <token> header. /v1/free/compact is unauthenticated so you can try Codag without a key.

  • POST /v1/free/compact: no auth. Deterministic drain compaction.
  • POST /v1/compact: Bearer token. Deterministic drain for Codag Free; inference-based compaction for Codag Pro.

Both endpoints share the same input shape: a list of log lines, with optional metadata.

# POST /v1/compact   (same shape for /v1/free/compact)
# Authorization: Bearer <api-token>
{
  "lines": [
    { "line_id": 0, "message": "OutOfMemoryError: Java heap space", "level": "error", "service": "api" },
    { "line_id": 1, "message": "Connection timed out to db-prod-02", "level": "error", "service": "api" }
  ],
  "metadata": { "incident_type": "oom_cascade" }
}