Aleph Alpha Guardrails API

Check content against guardrail policies.

Operations 1

POST /v1/check Post Check Endpoint #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aleph-alpha-guardrails-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aleph-alpha-guardrails-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stateful Responses Guardrails API
  version: 0.4.23
  description: Check content against guardrail policies.
servers:
- url: '{host}'
  variables:
    host:
      default: https://api.pharia.example.com
tags:
- name: Guardrails
  description: Check content against guardrail policies.
paths:
  /v1/check:
    post:
      tags:
      - Guardrails
      summary: Post Check Endpoint
      description: Check content against guardrails for an application.
      operationId: post_check_endpoint_v1_check_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation errors are returned as 400, not 422. This entry exists because FastAPI generates it automatically.
        '425':
          description: Too Early
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - HTTPBearer: []
components:
  schemas:
    CheckRequest:
      properties:
        application_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Application Id
        check_type:
          type: string
          title: Check Type
        input:
          type: string
          title: Input
        context:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Context
      type: object
      required:
      - check_type
      - input
      title: CheckRequest
      description: Inbound request to check content against guardrails.
    Violation:
      properties:
        category:
          type: string
          title: Category
        provider:
          type: string
          title: Provider
        stage:
          type: string
          title: Stage
        step:
          type: integer
          title: Step
        reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Reason
      type: object
      required:
      - category
      - provider
      - stage
      - step
      title: Violation
      description: 'A single guardrail violation.


        Attribution fields (``provider``, ``stage``, ``step``) identify which

        pipeline stage produced the violation so callers running multi-provider

        pipelines can tell regex matches from llama-guard classifications.


        ``reason`` is an optional human-readable explanation. Regex matches do

        not populate it (the category is sufficient); ``provider_error`` and

        richer providers may set it to surface why a step failed or matched.'
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
      - error
      title: ErrorResponse
      description: Structured error envelope.
    CheckResponse:
      properties:
        safe:
          type: boolean
          title: Safe
        violations:
          items:
            $ref: '#/components/schemas/Violation'
          type: array
          title: Violations
      type: object
      required:
      - safe
      - violations
      title: CheckResponse
      description: Result of a guardrail check.
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
        type:
          type: string
          title: Type
        param:
          anyOf:
          - type: string
          - type: 'null'
          title: Param
        code:
          anyOf:
          - type: string
          - type: 'null'
          title: Code
      type: object
      required:
      - message
      - type
      title: ErrorDetail
      description: Structured error detail matching the OpenAI Responses API convention.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer