API Proxy

Route any REST API call through a BunnyLogs logspace and automatically record every request and response in real time.

Paid plan required. API proxy is available on paid plans only. Upgrade →
How it works

Once proxy is enabled on a logspace, replace the base URL of any API call with:

https://bunnylogs.com/proxy/<logspace-uuid>/<target-host>

BunnyLogs forwards the request verbatim to https://<target-host>, returns the response unchanged to the caller, and logs both sides live in the stream.

Any number of different APIs can be proxied through the same logspace — the target host is part of the URL, so no pre-configuration is required per destination.

Setup
  1. Go to Settings → Logspaces and open a logspace.
  2. Scroll to the API Proxy card and click Enable proxy.
  3. Copy your proxy base URL and use it in your code.
URL structure
https://bunnylogs.com/proxy/<uuid>/<target-host>/<path>
Original call Proxied call
POST https://api.stripe.com/v1/charges POST https://bunnylogs.com/proxy/<uuid>/api.stripe.com/v1/charges
GET https://api.openai.com/v1/models GET https://bunnylogs.com/proxy/<uuid>/api.openai.com/v1/models
GET https://api.github.com/repos/org/repo/issues?state=open GET https://bunnylogs.com/proxy/<uuid>/api.github.com/repos/org/repo/issues?state=open

All HTTP methods are supported. Query strings, request bodies, and headers pass through unchanged.

What gets logged

Each proxied call produces one log entry in the stream. The program field is set to the target hostname so entries from different APIs are easy to distinguish:

→ POST api.stripe.com/v1/charges  ←  200  (142ms)

authorization: Bearer ***
content-type: application/json

{"amount": 2000, "currency": "usd", "source": "tok_visa"}

Response:
{"id": "ch_3abc...", "status": "succeeded", "amount": 2000, ...}
  • Method, host, path, and query string of the outbound request.
  • Response status and latency inline on the first line.
  • Request headersAuthorization, X-Api-Key, Cookie, and similar headers are automatically masked to Bearer *** in the log. The real value is still forwarded to the target.
  • Request body (first 10 KB).
  • Response body (first 10 KB).

The log level reflects the HTTP status: INFO for 2xx/3xx, WARNING for 4xx, ERROR for 5xx and network failures.

Code examples

curl

PROXY="https://bunnylogs.com/proxy/<uuid>"

# Stripe
curl -X POST "$PROXY/api.stripe.com/v1/charges" \
  -u sk_live_...: \
  -d amount=2000 -d currency=usd

# OpenAI
curl "$PROXY/api.openai.com/v1/models" \
  -H "Authorization: Bearer $OPENAI_API_KEY"

Python (requests)

import requests

PROXY = "https://bunnylogs.com/proxy/<uuid>"

# Call any API — just swap the base URL
resp = requests.post(
    f"{PROXY}/api.stripe.com/v1/charges",
    auth=("sk_live_...", ""),
    data={"amount": 2000, "currency": "usd"},
)
print(resp.json())  # real Stripe response

Node.js (fetch)

const PROXY = "https://bunnylogs.com/proxy/<uuid>";

const resp = await fetch(`${PROXY}/api.openai.com/v1/chat/completions`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "gpt-4o",
    messages: [{ role: "user", content: "Hello" }],
  }),
});
const data = await resp.json();
Security notes
  • The logspace UUID acts as the access credential — keep it private.
  • Sensitive headers are masked in the log but forwarded in full to the target.
  • Request and response bodies are truncated at 10 KB in the log; full payloads are still forwarded.
  • All targets are reached over HTTPS. Plain HTTP targets are not supported.
  • The proxy follows redirects and enforces a 30-second timeout per request.