Alice WonderFence API

WonderFence provides real-time guardrails for AI-generated content. APIs for evaluating and moderating AI-generated content and interactions to protect against harmful outputs and prompt attacks. ## API Response Key Mapping The following table is a mapping between violation types, their categories, and their corresponding API response keys: Violation Type | Category | API Response Key ---------------|----------|---------------- Impersonation | Security | prompt_attack.impersonation System Prompt Override | Security | prompt_attack.system_prompt_override Encoding | Security | prompt_injection.general_encoding Prompt Injection | Security | prompt_injection.general PII | Privacy | privacy_violation.PII Harassment or Bullying | Safety | abusive_or_harmful.harassment_or_bullying Profanity | Safety | abusive_or_harmful.profanity Hate Speech | Safety | abusive_or_harmful.hate_speech Child Abuse | Safety | abusive_or_harmful.child_abuse Suicide and Self-harm | Safety | self_harm.general Adult Content | Safety | adult_content.general Weapons | Safety | unauthorised_sales.weapons Legal Advice | Safety | deny_topics.legal_advice Financial Advice | Safety | deny_topics.financial_advice

Operations 1

POST /v1/evaluate/message Message #

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/alice-wonderfence-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

alice-wonderfence-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  license:
    name: Alice API Terms of Use
    url: https://app.alice.io/ts-platform/api-terms.pdf
  version: 3.0.0
  title: Alice API Documentation Wonder Fence API
  description: '# About This Guide

    This guide provides comprehensive documentation for Alice''s API offerings:


    **WonderSuite** - Our GenAI protection suite:

    - **WonderBuild**: Red teaming and security assessment tools for AI applications

    - **WonderFence**: Real-time guardrails for AI-generated content


    **ActiveFamily** - Our content moderation platform:

    - **ActiveScore**: AI-driven automated detection API that analyzes items and returns risk scores

    - **ActiveOS**: Self-service UI for organizing items, taking…'
  contact:
    name: Support
    email: support@alice.io
  termsOfService: https://app.alice.io/ts-platform/terms.pdf
servers:
- url: https://api.alice.io
  description: APIs Server
security:
- API Key: []
tags:
- name: WonderFence
  description: WonderFence provides real-time guardrails for AI-generated content.
paths:
  /v1/evaluate/message:
    post:
      summary: Message
      operationId: post-genai-evaluate
      description: 'Endpoint: https://api.alice.io/v1/evaluate/message


        This synchronous endpoint is used to evaluate messages sent to the Alice Guardrails service. It analyzes messages for potential violations and returns appropriate actions based on the analysis.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: The message text to evaluate for potential violations.
                  maxLength: 10240
                message_type:
                  type: string
                  description: The type of message being evaluated.
                  enum:
                  - prompt
                  - response
                session_id:
                  type: string
                  description: The session identifier for the message.
                  maxLength: 100
                user_id:
                  type: string
                  description: The identifier of the user who sent the message.
                  maxLength: 100
                model_context:
                  type: object
                  description: Additional context about the model being used.
                  properties:
                    provider:
                      type: string
                      description: The provider of the model.
                      maxLength: 100
                    name:
                      type: string
                      description: The name of the model.
                      maxLength: 100
                    version:
                      type: string
                      description: The version of the model.
                      maxLength: 100
                    cloud_platform:
                      type: string
                      description: The cloud platform where the model is deployed.
                      maxLength: 100
                  required:
                  - provider
                  - name
                  - version
                app_name:
                  type: string
                  description: The name of the application sending the message.
                  maxLength: 100
                external_moderation:
                  type: object
                  description: Optional external moderation data to be considered in the evaluation.
              required:
              - text
              - message_type
              - session_id
              - user_id
              - model_context
        description: The message and context to evaluate
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  correlation_id:
                    type: string
                    description: The correlation ID for tracking the request.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  action:
                    type: string
                    description: The action to take based on the evaluation.
                    example: block
                  action_text:
                    type: string
                    description: The text description of the action.
                    example: I'm sorry, I cannot answer this question. Please refer to the application usage guidelines and see that you follow them
                  detections:
                    type: array
                    description: The detected violations and their details.
                    items:
                      type: object
                      properties:
                        violation_type:
                          type: string
                          description: The type of violation detected.
                          example: abusive_or_harmful.hate_speech
                        risk_score:
                          type: number
                          description: The risk score for the detected violation.
                          minimum: 0.1
                          maximum: 1
                          example: 0.87
                        detection_type:
                          type: string
                          description: The type of detection method used.
                          enum:
                          - manual
                          example: manual
                        analysis_description:
                          type: string
                          description: A textual description of the violation.
                          example: Content contains hate speech targeting a specific group
                      required:
                      - violation_type
                      - risk_score
                    example:
                    - violation_type: abusive_or_harmful.hate_speech
                      risk_score: 0.87
                    - violation_type: abusive_or_harmful.profanity
                      risk_score: 0.65
                  errors:
                    type: array
                    description: Any errors that occurred during evaluation.
                    items:
                      type: object
                    example: []
                required:
                - correlation_id
                - action
                - action_text
                - detections
                - errors
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '429':
          $ref: '#/components/responses/429'
      tags:
      - WonderFence
components:
  responses:
    '429':
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                example: 429
              error:
                type: string
                example: Too Many Requests
              message:
                type: string
                example: Too Many Requests
              params:
                type: object
                properties:
                  body:
                    type: object
                    description: error type
                    properties:
                      source:
                        type: string
                      keys:
                        type: array
                        items:
                          type: string
                      message:
                        type: string
                        example: Too Many Requests
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                example: 400
              error:
                type: string
                example: Bad Request
              message:
                type: string
                example: \"text\" is required
              params:
                type: object
                properties:
                  body:
                    type: object
                    description: error type
                    properties:
                      source:
                        type: string
                        example: body
                      keys:
                        type: array
                        items:
                          type: string
                      message:
                        type: string
                        example: \"text\" is required
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                example: 401
              error:
                type: string
                example: Unauthorized
              message:
                type: string
                example: Invalid credentials
              params:
                type: object
                properties:
                  body:
                    type: object
                    description: error type
                    properties:
                      source:
                        type: string
                      keys:
                        type: array
                        items:
                          type: string
                      message:
                        type: string
                        example: Invalid credentials
  securitySchemes:
    API_Key:
      name: af-api-key
      type: apiKey
      in: header
      description: '

        '
x-stoplight:
  id: 324cav554fkgg
x-tagGroups:
- name: WonderSuite
  tags:
  - General
  - WonderBuild
  - WonderFence
- name: ActiveFamily
  tags:
  - Integrating with ActiveOS
  - content
  - users
  - collection
  - flags
  - api keys