QWED Open Responses provides a verified wrapper for the OpenAI SDK.
Installation
Quick start
Always pass at least one guard. VerifiedOpenAI without guards emits a UserWarning at construction: verification is fail-closed, so with zero guards every response fails verification and either raises ResponseBlocked (block_on_failure=True) or is returned unverified (block_on_failure=False).
The attached _qwed_verification result also exposes:
warnings: guard results that passed with warning severity
request_id: correlation ID when a request_id was supplied in the verification context
binding and verify_binding(): tamper-evidence tying the result to the exact response and guard list
timestamp: timezone-aware UTC timestamp with the +00:00 offset
See the guards reference for details.
Structured outputs
Handling blocked responses
Non-blocking mode
Budget limits with verification context
Pass verification_context to chat.completions.create() or responses.create() to give guards trusted usage totals, such as the running total_cost and total_tokens for a session. VerifiedOpenAI removes verification_context from the request before calling OpenAI, so it never reaches the API. The context is then passed to every guard when the response is verified.
You can also call client.verify(response, context={...}) directly.
Responses API (preview)
Full example