Create a Guarded Response
This page describes the built-in native OpenAI guard boundary at an
example URL. Provider mounts and path prefixes can change the route.
Set store to false and stream to true for SSE. Enabled Rails checks
depend on configuration.
Inspect the request, response, and stream guard declarations. The parameter list omits disabled fields; the request contract retains their declarations.
See field-policy meanings,
supported input and output,
and streaming completion and errors.
Field types describe gateway validation; consult the
provider reference
for upstream requirements. Replace example-model with a model available
from your provider.
Request
Request fields describe the gateway guard boundary. Provider requirements apply separately.
Unlisted fields and case aliases of declared fields are rejected by default.
Guarded Text selected for input checks when enabled in the Rails configuration.
Constrained The gateway enforces the declared value and shape restrictions.
Constrained The gateway enforces the declared value and shape restrictions.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Constrained The gateway enforces the declared value and shape restrictions.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Constrained The gateway enforces the declared value and shape restrictions.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Opaque Forwarded without inspecting or validating its value or nested contents. Provider requirements still apply.
Response
Provider-native JSON or SSE. The JSON example is an illustrative excerpt. Output restrictions apply only when output inspection is enabled. After SSE headers, failures are reported in the stream rather than by changing the HTTP status.