{"openapi":"3.1.0","info":{"title":"Prune API","description":"OpenAI/Anthropic-compatible LLM proxy. Authenticate with `Authorization: Bearer prune_...`. Docs: https://www.withprune.com/docs","version":"1.0.0"},"servers":[{"url":"https://api.withprune.com"}],"paths":{"/healthz":{"get":{"summary":"Liveness","description":"Fast liveness probe - no database or Redis (use before AI traffic).","operationId":"liveness_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/live":{"get":{"summary":"Liveness","description":"Fast liveness probe - no database or Redis (use before AI traffic).","operationId":"liveness_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Readiness Check","description":"Readiness probe - DB + Redis (cached ~3s). Use /health/live for burst\nchecks. Full diagnostic detail requires X-Internal-Secret in production;\nanonymous callers get status + component up/down only.","operationId":"readiness_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"summary":"Readiness Check","description":"Readiness probe - DB + Redis (cached ~3s). Use /health/live for burst\nchecks. Full diagnostic detail requires X-Internal-Secret in production;\nanonymous callers get status + component up/down only.","operationId":"readiness_check_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/status":{"get":{"summary":"Public Status","description":"Public status contract - always the minimal safe subset (status +\ncomponent up/down), regardless of auth. This is the one meant to be\ngenuinely public; use /health or /health/ready with X-Internal-Secret\nfor operator diagnostics.","operationId":"public_status_health_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/models":{"get":{"tags":["compat"],"summary":"List Openai Models","operationId":"list_openai_models_v1_models_get","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Openai Models V1 Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["compat"],"summary":"Openai Chat Completions","operationId":"openai_chat_completions_v1_chat_completions_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/embeddings":{"post":{"tags":["compat"],"summary":"Openai Embeddings Compat","description":"OpenAI-compatible embeddings via the Prune gateway.","operationId":"openai_embeddings_compat_v1_embeddings_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/responses":{"post":{"tags":["compat"],"summary":"Openai Responses Not Implemented","description":"OpenAI Responses API is not bridged yet - fail clearly for coding agents.","operationId":"openai_responses_not_implemented_v1_responses_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages":{"post":{"tags":["compat"],"summary":"Anthropic Messages","description":"Claude Code / Anthropic SDK compatible Messages endpoint.\n\nPrefer Anthropic vault when the model is Anthropic-shaped and a key is\nstored. If Anthropic vault is empty (or the model is an OpenRouter catalog\nid like ``openai/gpt-4o-mini`` / ``deepseek/...``), route through OpenRouter\nand translate the OpenAI-shaped response back to Anthropic Messages.","operationId":"anthropic_messages_v1_messages_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/anthropic/messages":{"post":{"tags":["proxy"],"summary":"Proxy Anthropic","operationId":"proxy_anthropic_v1_proxy_anthropic_messages_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/openai/chat/completions":{"post":{"tags":["proxy"],"summary":"Proxy Openai","description":"OpenAI Chat Completions - drop-in for ``client.chat.completions.create``.","operationId":"proxy_openai_v1_proxy_openai_chat_completions_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/openai/embeddings":{"post":{"tags":["modality"],"summary":"Proxy Openai Embeddings","description":"POST /v1/proxy/openai/embeddings - OpenAI embeddings via Prune.","operationId":"proxy_openai_embeddings_v1_proxy_openai_embeddings_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/openai/images/generations":{"post":{"tags":["modality"],"summary":"Proxy Openai Images","description":"POST /v1/proxy/openai/images/generations - image gen via Prune.","operationId":"proxy_openai_images_v1_proxy_openai_images_generations_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/openai/audio/speech":{"post":{"tags":["modality"],"summary":"Proxy Openai Tts","description":"POST /v1/proxy/openai/audio/speech - TTS via Prune.","operationId":"proxy_openai_tts_v1_proxy_openai_audio_speech_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/openai/audio/transcriptions":{"post":{"tags":["modality"],"summary":"Proxy Openai Stt","description":"POST /v1/proxy/openai/audio/transcriptions - STT via Prune (multipart).","operationId":"proxy_openai_stt_v1_proxy_openai_audio_transcriptions_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/openai/videos/generations":{"post":{"tags":["modality"],"summary":"Proxy Openai Videos","description":"POST /v1/proxy/openai/videos/generations - video gen via Prune.","operationId":"proxy_openai_videos_v1_proxy_openai_videos_generations_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/compatibility":{"get":{"tags":["models"],"summary":"Model Compatibility Matrix","description":"Returns the full model deprecation compatibility matrix.\nDeprecated model ids map to their recommended replacements.\nNo authentication required - safe for public use.","operationId":"model_compatibility_matrix_v1_models_compatibility_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/public-key":{"get":{"tags":["receipt-signing"],"summary":"Get Public Key","description":"Returns the Ed25519 public key used to sign Prune receipts.\n\n- ``?format=json`` or ``Accept: application/json`` → JSON object\n- ``?format=pem`` or ``Accept: text/plain`` → raw PEM\n\nDefault is JSON so SDKs that call ``resp.json()`` work without headers.\nReturns 204 if receipt signing is not configured.","operationId":"get_public_key_v1_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/public-key.pem":{"get":{"tags":["receipt-signing"],"summary":"Get Public Key Pem File","description":"Raw PEM, for ``curl https://api.withprune.com/v1/public-key.pem > key.pem``.","operationId":"get_public_key_pem_file_v1_public_key_pem_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/verify":{"post":{"tags":["receipt-signing"],"summary":"Verify Receipt Endpoint","description":"Verify a signed Prune receipt (the prune_metadata object from any response).\nIntentionally unauthenticated - anyone holding a receipt can check it.\n\nCanonical path: POST /v1/receipts/verify\nAlias: POST /v1/verify (same body) for shorter scripts / docs that omit \"receipts\".","operationId":"verify_receipt_endpoint_v1_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Verify Receipt Endpoint V1 Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/verify":{"post":{"tags":["receipt-signing"],"summary":"Verify Receipt Endpoint","description":"Verify a signed Prune receipt (the prune_metadata object from any response).\nIntentionally unauthenticated - anyone holding a receipt can check it.\n\nCanonical path: POST /v1/receipts/verify\nAlias: POST /v1/verify (same body) for shorter scripts / docs that omit \"receipts\".","operationId":"verify_receipt_endpoint_v1_receipts_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Verify Receipt Endpoint V1 Receipts Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/receipt":{"get":{"tags":["runs"],"summary":"Read Run Receipt","operationId":"read_run_receipt_v1_runs__run_id__receipt_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Read Run Receipt V1 Runs  Run Id  Receipt Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches/{batch_id}":{"get":{"tags":["batches"],"summary":"Poll Batch","description":"Poll a Prune batch job submitted via X-Prune-Batch: true.","operationId":"poll_batch_v1_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Poll Batch V1 Batches  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches/webhook":{"post":{"tags":["batches"],"summary":"Batch Webhook","description":"Optional provider/worker webhook to update batch status.\n\nAuth: shared secret via X-Prune-Batch-Secret matching PRUNE_BATCH_WEBHOOK_SECRET.","operationId":"batch_webhook_v1_batches_webhook_post","parameters":[{"name":"X-Prune-Batch-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Batch-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Batch Webhook V1 Batches Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/waste-report":{"post":{"tags":["waste-report"],"summary":"Waste Report","description":"List top token-waste sources with estimated savings for each fix.","operationId":"waste_report_v1_waste_report_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WasteReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Waste Report V1 Waste Report Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"post":{"tags":["keys"],"summary":"Create Scoped Key","description":"Mint a scoped key. The raw key is shown once in ``api_key``.","operationId":"create_scoped_key_v1_keys_post","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopedKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Scoped Key V1 Keys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["keys"],"summary":"List Keys","description":"List this account's Prune keys with their scopes (never the secrets).","operationId":"list_keys_v1_keys_get","parameters":[{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Keys V1 Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"delete":{"tags":["keys"],"summary":"Revoke Key","description":"Revoke (deactivate) one of this account's keys. Cannot revoke the calling key.","operationId":"revoke_key_v1_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Key V1 Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/events":{"get":{"tags":["audit"],"summary":"List Audit Events","operationId":"list_audit_events_v1_audit_events_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 lower bound (inclusive)","title":"Since"},"description":"ISO-8601 lower bound (inclusive)"},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 upper bound (exclusive), for paging","title":"Before"},"description":"ISO-8601 upper bound (exclusive), for paging"},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Event Type"}},{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"}},{"name":"X-Prune-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Prune-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Audit Events V1 Audit Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OpenAIProxyRequest":{"properties":{"messages":{"items":{"type":"object"},"type":"array","maxItems":500,"minItems":1,"title":"Messages"},"model":{"type":"string","maxLength":128,"minLength":2,"title":"Model","examples":["gpt-5.5","gpt-4o-mini"]},"max_tokens":{"anyOf":[{"type":"integer","maximum":100000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","default":4096},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","default":1.0},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P"},"response_format":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Response Format","description":"OpenAI response_format (e.g. json_object for structured output)"},"tools":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"OpenAI tool definitions for function calling"},"tool_choice":{"anyOf":[{},{"type":"null"}],"title":"Tool Choice","description":"OpenAI tool_choice (auto, none, required, or specific tool)"},"stream":{"type":"boolean","title":"Stream","description":"Stream SSE response when true","default":false},"prompt_cache_key":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Prompt Cache Key","description":"Stable key for OpenAI/OpenRouter provider-native prefix caching"},"user_api_key":{"anyOf":[{"type":"string","maxLength":512,"minLength":20},{"type":"null"}],"title":"User Api Key","description":"User's OpenAI API key (optional if stored in Prune vault)"}},"additionalProperties":true,"type":"object","required":["messages","model"],"title":"OpenAIProxyRequest","description":"OpenAI Chat Completions API proxy body.\n\nextra=\"allow\": Cursor/Cline/Windsurf and OpenAI SDKs send contract fields\nbeyond the declared set (parallel_tool_calls, seed, logprobs, stop, user,\nfrequency/presence penalties, ...). Undeclared fields must be forwarded\nupstream untouched."},"ProxyRequest":{"properties":{"messages":{"items":{"type":"object"},"type":"array","maxItems":500,"minItems":1,"title":"Messages"},"model":{"type":"string","maxLength":128,"minLength":3,"title":"Model","examples":["claude-opus-4-8"]},"max_tokens":{"type":"integer","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Max Tokens"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","default":1.0},"system":{"anyOf":[{"type":"string"},{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"System"},"stream":{"type":"boolean","title":"Stream","description":"Stream SSE response when true","default":false},"user_api_key":{"anyOf":[{"type":"string","maxLength":512,"minLength":20},{"type":"null"}],"title":"User Api Key","description":"User's Anthropic API key (optional if stored in Prune vault)"}},"additionalProperties":true,"type":"object","required":["messages","model","max_tokens"],"title":"ProxyRequest","description":"Anthropic Messages API proxy body.\n\nextra=\"allow\": coding agents (Claude Code, MCP clients) send contract\nfields beyond the ones declared here - tools, tool_choice, stop_sequences,\ntop_k, thinking, metadata, tool_reference blocks. Everything undeclared\nmust survive parsing and be forwarded upstream untouched."},"ReceiptVerifyRequest":{"properties":{"receipt":{"type":"object","title":"Receipt"}},"type":"object","required":["receipt"],"title":"ReceiptVerifyRequest"},"ScopedKeyCreate":{"properties":{"expires_in_days":{"anyOf":[{"type":"number","maximum":365.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Expires In Days"},"allowed_models":{"items":{"type":"string"},"type":"array","title":"Allowed Models"},"allowed_tools":{"items":{"type":"string"},"type":"array","title":"Allowed Tools"},"denied_tools":{"items":{"type":"string"},"type":"array","title":"Denied Tools"},"allowed_ips":{"items":{"type":"string"},"type":"array","title":"Allowed Ips"},"daily_spend_limit_usd":{"anyOf":[{"type":"number","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Daily Spend Limit Usd"},"monthly_spend_limit_usd":{"anyOf":[{"type":"number","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Spend Limit Usd"},"rate_limit_per_minute":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Minute"}},"type":"object","title":"ScopedKeyCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WasteReportRequest":{"properties":{"messages":{"items":{"type":"object"},"type":"array","title":"Messages"},"tools":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"model":{"type":"string","title":"Model","default":"gpt-4o-mini"},"system":{"anyOf":[{},{"type":"null"}],"title":"System"},"route_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Id"}},"type":"object","title":"WasteReportRequest"}}}}