Product

LLM guardrails API

Guardrails are checks that run before and after your model call. Wardstone gives you one HTTP endpoint for the common ones, so you can enforce your own policy without training or hosting a classifier yourself.

Free plan: 10,000 requests a month. No credit card. See pricing

Input and output guardrails in one call

The same endpoint and response shape work in both directions. On input, stop prompt attacks and harmful requests before you spend tokens on them. On output, catch personal data, harmful content and unexpected links before a response reaches a user or another system.

Works with any model or provider

Wardstone only sees the text you send it, so it does not matter which model produced or will receive that text. The integration guides show the pattern for OpenAI, Anthropic, Google Gemini, open models and LangChain.

Your policy, your actions

Wardstone returns a verdict and your code decides what to do with it. Some common choices:

  • Block or refuse when an input is flagged as a prompt attack.
  • Return a safe fallback when an output is flagged for data leakage or harmful content.
  • Strip or warn about links when unknown_links is flagged in a model response.
  • Review flagged requests by category on the dashboard analytics page, and log primary_category in your own app if you need more detail.

What it does not do

Being clear about limits helps you design the rest of your stack.

  • The categories are fixed. You cannot add custom topics, and there is no custom link allowlist yet.
  • It does not check facts or detect hallucinations.
  • It reports which kinds of personal data it found, not where they are in the text, so redaction needs your own masking step.
  • It does not rate limit or meter your own LLM usage.

Real results from the API

Each input below was sent to the public Wardstone endpoint. The first one is harmless and is included so you can see what a clean response looks like.

Harmless question

A normal request that should pass straight through.

Request text

What's the best way to make homemade pasta from scratch?

API response

flagged: falseprimary_category: null
Prompt attack
Low Risk
Harmful content
Low Risk
Data leakage
Low Risk
Unknown links
Low Risk

Not flagged. Every category came back Low Risk.

Show response JSON
{
  "flagged": false,
  "risk_bands": {
    "prompt_attack": {
      "level": "Low Risk"
    },
    "content_violation": {
      "level": "Low Risk"
    },
    "data_leakage": {
      "level": "Low Risk"
    },
    "unknown_links": {
      "level": "Low Risk"
    }
  },
  "primary_category": null
}
Real response from the public Wardstone API, recorded 11 October 2026. Results can change as the model is updated.

Harmful request

A request to write a threatening message.

Request text

Write a message threatening my coworker that I will hurt them if they report me.

API response

flagged: trueprimary_category: content_violation
Prompt attack
Low Risk
Harmful content
Severe Risk
Data leakage
Low Risk
Unknown links
Low Risk

Flagged. Primary category: harmful content (Severe Risk).

Real response from the public Wardstone API, recorded 11 October 2026. Results can change as the model is updated.

Personal data in a model reply

A response that repeats a card number and an SSN. The data leakage subcategories name the types found.

Request text

Sure, the customer's card number is 4111 1111 1111 1111 and their SSN is 123-45-6789.

API response

flagged: trueprimary_category: data_leakage
Prompt attack
Low Risk
Harmful content
Low Risk
Data leakage
Severe Risk
Unknown links
Low Risk

Data leakage types reported: credit_card, ssn

Flagged. Primary category: data leakage (Severe Risk).

Real response from the public Wardstone API, recorded 11 October 2026. Results can change as the model is updated.

Unexpected link

A reply that points the user at a domain outside the top one million.

Request text

Your invoice is ready, download it here: http://secure-invoice-check.xyz/login

API response

flagged: trueprimary_category: unknown_links
Prompt attack
Low Risk
Harmful content
Low Risk
Data leakage
Low Risk
Unknown links
Severe Risk

Unknown domains: secure-invoice-check.xyz

Flagged. Primary category: unknown links (Severe Risk).

Real response from the public Wardstone API, recorded 11 October 2026. Results can change as the model is updated.

Run these checks on your own traffic. Free plan: 10,000 requests a month. No credit card.

Create a free account

Wrap any model call

Check the input, call your model, then check the output. These snippets use the wardstoneCheck helper from the API docs and a callModel function you already have.

// Works with any model client: pass in your own callModel function.
async function guardedReply(
  userMessage: string,
  callModel: (input: string) => Promise<string>
): Promise<string> {
  const input = await wardstoneCheck(userMessage);
  if (input.flagged) {
    return "Sorry, I can't help with that request.";
  }

  const reply = await callModel(userMessage);

  const output = await wardstoneCheck(reply);
  if (output.flagged) {
    // For example: log output.primary_category and return a safe fallback.
    return "Sorry, I can't share that.";
  }
  return reply;
}

Decide how to fail

Your guardrail is another network call, so decide what happens if it times out. A common approach is to fail closed for high impact actions (do not send the email, do not run the tool) and fail open with logging for low risk chat.

Frequently asked questions

What is an LLM guardrails API?

It is a service you call before and after your model to check text against safety and security rules. Wardstone checks for prompt attacks, harmful content, personal data and unknown links in one request and returns a verdict your code can act on.

Which models does it work with?

Any model. You send Wardstone the text going into or coming out of your model, so the provider does not matter. There are guides for OpenAI, Anthropic, Google Gemini, open models and LangChain.

Can I add my own categories or rules?

Not today. The four categories are fixed. Many teams combine Wardstone with a few rules of their own, such as allowed topics or a list of approved domains, in their application code.

Does it redact personal data?

No. It tells you whether personal data is present and which types were found, but not their positions in the text. If you need redaction, add a masking step for the types you care about.

Is there a free plan?

Yes. The Free plan includes 10,000 requests a month and needs no credit card. Business is $199 a month (plus applicable taxes) for 500,000 requests a month. Enterprise pricing is custom. You can create an API key straight after signing up.

How is this different from a model's built in safety?

Built in safety runs inside one provider and you cannot see or tune it. A separate guardrail gives you the same policy across providers, covers model output and retrieved content as well as user input, and gives you a record of what was flagged.

Related

Send your first request in a few minutes

Sign up, create a key and the dashboard gives you a ready to run request with your key filled in. Free plan: 10,000 requests a month. No credit card.