Get a guardrail set
guardrail-sets:readAuthenticationReturns the complete canonical ordered definition, including for archived sets.
Canonical API-authored rows omit configuration_errors.
Legacy or out-of-band rows
A row that is invalid is made response-schema-safe, with precise configuration_errors:
- invalid individual rules are omitted when the containing definition is still representable
- a malformed or missing root or
guardrailscontainer, a stored definition above the 1,048,576-byte encoded limit, or an oversized normalized safe view returns the canonical empty definition
Replace the complete definition in one PATCH to repair it.
The strong ETag versions the stored resource, not the normalized view, and must be treated as opaque. Supplying any request body is a 400 unexpected_body error.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
id*stringuuidGuardrail-set metadata and its normalized ordered definition.
application/json- response
Complete normalized resource. configuration_errors is omitted for canonical rows. When present, it identifies legacy stored fields/rules that were unsafe to emit or an aggregate runtime budget exceeded by the stored definition. When the root and guardrails array are representable, invalid rules are omitted independently. A malformed or missing root/array, a stored definition above the 1,048,576-byte encoded limit, or an oversized normalized safe view returns the canonical empty definition instead. A legacy array above 100 rules is truncated to its first 100 entries and reports too_many_items; those entries are then normalized independently. Aggregate-only diagnostics retain every individually valid rule among those first 100, so this object always remains schema-valid and can be repaired with one complete-definition PATCH.
id*stringuuidslug*GuardrailSetSlugCanonical immutable workspace-unique slug emitted after input normalization. It contains only lowercase ASCII letters, digits, hyphens, and underscores and never includes surrounding whitespace.
^[a-z0-9_-]+$2 <= length <= 64name*GuardrailSetNameHuman label after trimming. The raw and normalized value must each contain 1–200 Unicode characters and no control characters.
1 <= length <= 200description*|Optional authored description. Leading/trailing whitespace is removed; null or a blank string normalizes to null. The raw and normalized value must contain at most 2000 Unicode characters. Newline, carriage return, and tab are accepted; other control characters and unpaired Unicode surrogate escapes are rejected.
length <= 2000archived_at*|date-timecreated_at*stringdate-timeupdated_at*stringdate-timedefinition*Canonical response definition. guardrails is always present and preserves authored rule order.
configuration_errors?array<>Exact legacy-repair diagnostics. Replace the complete definition using the current ETag; do not assume an omitted invalid rule or a rule beyond the 100-entry response boundary still executes. When the returned definition is empty because its root/array could not be represented safely or the stored definition exceeded the encoded-size limit, do not infer that any stored rule executes. An oversized legacy array uses too_many_items. Container/rule diagnostics use stored_value_invalid, too_large, invalid_type, unknown, required, too_many_items, too_few_items, too_long, invalid, invalid_unicode, invalid_format, invalid_enum, duplicate, or not_allowed as applicable. Aggregate diagnostics can use guardrail_instruction_budget_exceeded, guardrail_phrase_budget_exceeded, or guardrail_phrase_character_budget_exceeded without omitting individually valid rules from the returned definition.
1 <= itemscurl -X GET 'https://api.kejue.co/v1/guardrail-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "11111111-1111-4111-8111-111111111111", "slug": "payment_safety", "name": "Payment safety", "description": "Prevent collection of payment credentials.", "archived_at": null, "created_at": "2026-07-20T09:00:00Z", "updated_at": "2026-07-20T09:20:00Z", "definition": { "guardrails": [ { "id": "never-request-card", "severity": "high", "kind": "llm", "instruction": "Never request complete payment credentials." }, { "id": "prohibited-phrases", "severity": "block", "kind": "static", "phrases": [ "read me your password" ] } ] }}