Docs

Quick start, editor setup and FAQ for the OpenAI-compatible API.

Guardrails

A guardrails object is a reusable rule set owned by one workspace. Attach it to any number of keys; editing it changes all of them at once.

Fields

  • Name
  • Allowed models: empty means every enabled model. Otherwise the key may call only these; anything else gets 403 model_not_allowed. Tick Every <provider> model to allow a whole provider (asix-jiutian/*), including models added later. Through the API, asix-* allows every ASIX-hosted model. Aliases (perisairouter/smart, perisairouter/fast, perisairouter/cheap) count as models: listing an alias permits whichever member of its chain answers. perisairouter/auto is different: listed together with concrete models, it picks only among those; listed with aliases only, it picks from its whole pool. Listing perisairouter/auto also allows its presets (perisairouter/auto:code and the rest); listing a preset allows only that preset. For a model you name directly, its fallback is used only if that fallback is on the list too; if nothing on the list can answer, the request gets 400 no_eligible_provider.
  • Blocked providers: removed from every fallback chain for this key. If a chain becomes empty the call returns 400 no_eligible_provider. Use this to keep a key on ASIX-hosted models only.
  • Max tokens per request: Peris.ai Router clamps the client's max_tokens down to this; the request is not rejected.
  • perisairouter/auto cost tier: Any price (default), Low, Medium or High. Only affects requests for perisairouter/auto. Low keeps it to the cheaper half of its candidates by price, High to the dearer half, Medium to all of them. A tier set here wins over the "perisai_router": {"cost_tier": "..."} a request sends; with Any price each request decides.
  • Content checks: personal data, secrets and credentials, blocked terms, and prompt injection. Each is Off (default), Monitor (report in the x-perisai-router-flagged header, change nothing), Redact (swap each finding for a placeholder such as [REDACTED_CARD] before any provider sees it) or Refuse (400 guardrail_blocked, nothing billed). Personal data covers card numbers, NIK, NPWP, email addresses and phone numbers; secrets cover API keys, tokens, private keys and passwords in URLs; blocked terms are your own words and phrases, one per line. Prompt injection can be monitored or refused, not redacted. Replies that are not streamed are redacted too. Streamed replies are not, though what Logs keeps of them is. Every endpoint is checked, not only chat: embeddings, Responses, moderations, speech and image prompts, and tool call arguments. Realtime and live sessions cannot be inspected, so a key with content checks is refused there.
  • External guardrail: a checking service your platform admin has set up, applied to prompts, replies or both. It can refuse (400 guardrail_blocked) or return redacted text, and x-perisai-router-external-guardrail says what it did. If it does not answer the request gets 503 guardrail_unavailable (retry it). It covers the same endpoints as the content checks. Streamed replies are not sent to it.
  • Store request bodies: off by default. When on, prompts and completions are kept 7 days and visible in Logs to people who can see the key. Turn on only for debugging.

Who can edit

Owner, Superadmin and the workspace's Admin. Members can read.

Default guardrails

Every workspace can name one guardrails object as default (Settings > Workspace). New keys in that workspace get it automatically.

Deleting

Only with zero attached keys. Detach first (key detail > Guardrails > None).

  • Production key: allowed models = the one or two you actually use; blocked providers = anything outside Indonesia if data residency matters; max tokens = your real ceiling; logging off.
  • Debug key: same models, logging on, short expiration.
  • Key for customer data: personal data and secrets on Redact, prompt injection on Refuse. Start new checks on Monitor for a few days and read the x-perisai-router-flagged header before refusing anything.