init() patches the provider SDKs installed in your process, so each call they make is scanned by the Guard API before it leaves. Your client keeps calling the provider directly with its own key; only the scan goes to PromptGuard.
mode and fail_open are in the Python SDK and Node.js SDK guides.
What is patched
Patching is per call surface, not per package. A call not listed here is not scanned, even when its package is patched: the OpenAI embeddings, audio and image endpoints, for example.
The exact surfaces, including which parts of a Responses API input are read, are in each SDK’s README: Python, Node.js.
Frameworks on top of these SDKs
A framework is covered when it calls one of the patched surfaces underneath. LangChain’sChatOpenAI calls the openai package, so its calls are scanned, including inside a LangGraph graph. Frameworks that make their own HTTP calls are not: the Vercel AI SDK’s providers (@ai-sdk/openai and the rest) do not use the openai package, so init() does not see them. Use the Vercel AI integration or the proxy for those.
For the framework-specific hooks, which add chain, tool and agent context to each scan, see Frameworks.
What is not patched
Wheninit() finds a provider library installed that it did not hook, it logs a warning naming it, with a link to this page. Calls through these are not scanned by init(); point their base URL at the proxy instead.
Checking it at runtime
A warning is only read by someone watching the logs at startup. The same facts are available as data, so you can fail a deploy on them:patched holds the names in the first column of the table above, the same in both SDKs.
middleware lists the request-edge middleware running in the process, whether or not init() was called: fastapi when the Python SDK’s FastAPI and ASGI middleware is mounted. A middleware is never a patch, so it never appears in patched. An SDK with none reports an empty list, so the same check reads the same in both languages.