Request capture
Part of the Rapid Router API reference. One OpenAI-compatible endpoint, https://rapidrouter.ai/api/v1, in front of every model in the catalog.
35Request capture
Capture is off by default. We promise not to store prompt and completion bodies, and that promise holds unless you, the key's owner, flip capture on for your own debugging. When on, the gateway stores the request body and the final response next to the usage log row for non-streaming chat completions made with that key, keeps them for the retention window the key chose, then deletes them.
# Session-authenticated (dashboard login), like the key editor.
curl -X PATCH https://rapidrouter.ai/api/v1/keys/key_... \
-H "Authorization: Bearer <session JWT>" \
-H "Content-Type: application/json" \
-d '{ "capture": true, "capture_days": 7 }'
# capture_days must be 1, 7 or 30. Omitted, retention is 7 days.
# "Keep forever" is deliberately not expressible.Retention is enforced by a sweep that deletes expired bodies, not by a policy document. Stored bodies are readable only by the account that owns the key, via GET /v1/logs/:id/body. Streaming requests are not captured.