> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get guardrail



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml get /guardrails/{guardrailId}
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /guardrails/{guardrailId}:
    servers:
      - url: https://api.apps.paloaltonetworks.com/ai_gw/v2
        description: Managed
    get:
      tags:
        - Guardrails
      operationId: getGuardrail
      parameters:
        - name: guardrailId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardrailDetails'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GuardrailDetails:
      allOf:
        - $ref: '#/components/schemas/GuardrailSummary'
        - type: object
          properties:
            checks:
              type: array
              items:
                $ref: '#/components/schemas/GuardrailCheck'
            actions:
              $ref: '#/components/schemas/GuardrailActions'
            mcp_server_mappings:
              type: array
              items:
                $ref: '#/components/schemas/McpServerMapping'
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
    GuardrailSummary:
      type: object
      required:
        - id
        - name
        - slug
        - created_at
        - last_updated_at
        - owner_id
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        target:
          type: string
          enum:
            - llm
            - mcp_tools
          default: llm
        organisation_id:
          type: string
          format: uuid
        workspace_id:
          type: string
          format: uuid
          nullable: true
        status:
          type: string
          enum:
            - active
            - archived
        created_at:
          type: string
          format: date-time
        last_updated_at:
          type: string
          format: date-time
        owner_id:
          type: string
          format: uuid
        updated_by:
          type: string
          format: uuid
          nullable: true
    GuardrailCheck:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          enum:
            - default.jwt
            - default.modelWhitelist
            - default.isAllLowerCase
            - default.regexMatch
            - default.sentenceCount
            - default.wordCount
            - default.characterCount
            - default.jsonSchema
            - default.jsonKeys
            - default.contains
            - default.validUrls
            - default.containsCode
            - default.webhook
            - default.endsWith
            - default.alluppercase
            - default.requiredMetadataKeys
            - default.allowedRequestTypes
            - portkey.moderateContent
            - portkey.language
            - portkey.pii
            - portkey.gibberish
            - sydelabs.sydeguard
            - aporia.validateProject
            - pillar.scanPrompt
            - pillar.scanResponse
            - patronus.phi
            - patronus.pii
            - patronus.isConcise
            - patronus.isHelpful
            - patronus.isPolite
            - patronus.noApologies
            - patronus.noGenderBias
            - patronus.noRacialBias
            - patronus.retrievalAnswerRelevance
            - patronus.toxicity
            - patronus.custom
            - mistral.moderateContent
            - bedrock.guard
            - promptfoo.guard
            - promptfoo.pii
            - promptfoo.harm
            - acuvity.scan
            - lasso.classify
            - azure.contentSafety
            - azure.pii
            - panw-prisma-airs.intercept
        parameters:
          oneOf:
            - $ref: '#/components/schemas/JWTParameters'
            - $ref: '#/components/schemas/ModelWhitelistParameters'
            - $ref: '#/components/schemas/RegexMatchParameters'
            - $ref: '#/components/schemas/SentenceCountParameters'
            - $ref: '#/components/schemas/WordCountParameters'
            - $ref: '#/components/schemas/CharacterCountParameters'
            - $ref: '#/components/schemas/JSONSchemaParameters'
            - $ref: '#/components/schemas/JSONKeysParameters'
            - $ref: '#/components/schemas/ContainsParameters'
            - $ref: '#/components/schemas/ValidUrlsParameters'
            - $ref: '#/components/schemas/ContainsCodeParameters'
            - $ref: '#/components/schemas/WebhookParameters'
            - $ref: '#/components/schemas/EndsWithParameters'
            - $ref: '#/components/schemas/UppercaseParameters'
            - $ref: '#/components/schemas/RequiredMetadataKeysParameters'
            - $ref: '#/components/schemas/AllowedRequestTypesParameters'
            - $ref: '#/components/schemas/SydeGuardParameters'
            - $ref: '#/components/schemas/AporiaParameters'
            - $ref: '#/components/schemas/PillarScanParameters'
            - $ref: '#/components/schemas/PatronusParameters'
            - $ref: '#/components/schemas/PatronusCustomParameters'
            - $ref: '#/components/schemas/PortkeyModerationParameters'
            - $ref: '#/components/schemas/PortkeyLanguageParameters'
            - $ref: '#/components/schemas/PortkeyPIIParameters'
            - $ref: '#/components/schemas/MistralModerationParameters'
            - $ref: '#/components/schemas/BedrockGuardParameters'
            - $ref: '#/components/schemas/PromptfooParameters'
            - $ref: '#/components/schemas/AcuvityScanParameters'
            - $ref: '#/components/schemas/AzureContentSafetyParameters'
            - $ref: '#/components/schemas/AzurePIIParameters'
            - $ref: '#/components/schemas/PANWPrismaParameters'
            - $ref: '#/components/schemas/BasicParameters'
        name:
          type: string
        is_enabled:
          type: boolean
          default: true
    GuardrailActions:
      type: object
      properties:
        deny:
          type: boolean
          default: false
        async:
          type: boolean
          default: false
        on_success:
          type: object
          properties:
            feedback:
              type: object
              properties:
                value:
                  type: number
                  default: 5
                weight:
                  type: number
                  default: 1
                metadata:
                  type: string
                  default: ''
              required:
                - value
                - weight
                - metadata
          required:
            - feedback
        on_fail:
          type: object
          properties:
            feedback:
              type: object
              properties:
                value:
                  type: number
                  default: -5
                weight:
                  type: number
                  default: 1
                metadata:
                  type: string
                  default: ''
              required:
                - value
                - weight
                - metadata
          required:
            - feedback
      required:
        - deny
        - async
        - on_success
        - on_fail
    McpServerMapping:
      type: object
      required:
        - id
        - guardrail_id
        - mcp_server_id
        - run_on
      properties:
        id:
          type: string
          format: uuid
        guardrail_id:
          type: string
          format: uuid
        mcp_server_id:
          type: string
          format: uuid
        run_on:
          type: array
          items:
            type: string
            enum:
              - input
              - output
          minItems: 1
        capability_ids:
          type: array
          items:
            type: string
            format: uuid
    Error:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: false
        param:
          type: string
          nullable: true
        type:
          type: string
          nullable: false
      required:
        - type
        - message
        - param
        - code
    JWTParameters:
      title: JWT Parameters
      type: object
      required:
        - jwksUri
        - headerKey
      properties:
        jwksUri:
          type: string
          format: uri
        headerKey:
          type: string
        cacheMaxAge:
          type: number
          default: 86400
        clockTolerance:
          type: number
          default: 5
        maxTokenAge:
          type: string
          default: 1d
        algorithms:
          type: array
          items:
            type: string
          default:
            - RS256
    ModelWhitelistParameters:
      title: Model Whitelist Parameters
      type: object
      required:
        - models
      properties:
        models:
          type: array
          items:
            type: string
    RegexMatchParameters:
      title: Regex Match Parameters
      type: object
      required:
        - rule
      properties:
        rule:
          type: string
        not:
          type: boolean
          default: false
    SentenceCountParameters:
      title: Sentence Count Parameters
      type: object
      properties:
        minSentences:
          type: number
          default: 0
        maxSentences:
          type: number
          default: 99999
        not:
          type: boolean
          default: false
    WordCountParameters:
      title: Word Count Parameters
      type: object
      properties:
        minWords:
          type: number
          default: 0
        maxWords:
          type: number
          default: 99999
        not:
          type: boolean
          default: false
    CharacterCountParameters:
      title: Character Count Parameters
      type: object
      properties:
        minCharacters:
          type: number
          default: 0
        maxCharacters:
          type: number
          default: 9999999
        not:
          type: boolean
          default: false
    JSONSchemaParameters:
      title: JSON Schema Parameters
      type: object
      required:
        - schema
      properties:
        schema:
          type: object
          additionalProperties: true
        not:
          type: boolean
          default: false
    JSONKeysParameters:
      title: JSON Keys Parameters
      type: object
      required:
        - keys
        - operator
      properties:
        keys:
          type: array
          items:
            type: string
        operator:
          type: string
          enum:
            - any
            - all
            - none
          default: any
    ContainsParameters:
      title: Contains Parameters
      type: object
      required:
        - words
        - operator
      properties:
        words:
          type: array
          items:
            type: string
        operator:
          type: string
          enum:
            - any
            - all
            - none
          default: any
    ValidUrlsParameters:
      title: Valid URLs Parameters
      type: object
      properties:
        onlyDNS:
          type: boolean
          default: false
        not:
          type: boolean
          default: false
    ContainsCodeParameters:
      title: Contains Code Parameters
      type: object
      required:
        - format
      properties:
        format:
          type: string
          enum:
            - SQL
            - Python
            - TypeScript
            - JavaScript
            - Java
            - C#
            - C++
            - C
            - Ruby
            - PHP
            - Swift
            - Kotlin
            - Go
            - Rust
            - Scala
            - R
            - Perl
            - Shell
            - HTML
            - CSS
            - XML
            - JSON
            - YAML
            - Markdown
            - Dockerfile
        not:
          type: boolean
          default: false
    WebhookParameters:
      title: Webhook Parameters
      type: object
      required:
        - webhookURL
      properties:
        webhookURL:
          type: string
          format: uri
        headers:
          type: object
          additionalProperties: true
        timeout:
          type: number
          default: 3000
        failOnError:
          type: boolean
          default: false
    EndsWithParameters:
      title: Ends With Parameters
      type: object
      required:
        - suffix
      properties:
        suffix:
          type: string
        not:
          type: boolean
          default: false
    UppercaseParameters:
      title: Uppercase Parameters
      type: object
      properties:
        not:
          type: boolean
          default: false
    RequiredMetadataKeysParameters:
      title: Required Metadata Keys Parameters
      type: object
      required:
        - metadataKeys
        - operator
      properties:
        metadataKeys:
          type: array
          items:
            type: string
        operator:
          type: string
          enum:
            - all
            - any
            - none
          default: all
    AllowedRequestTypesParameters:
      title: Allowed Request Types Parameters
      type: object
      properties:
        allowedTypes:
          type: array
          items:
            type: string
            enum:
              - complete
              - chatComplete
              - embed
              - rerank
              - moderate
              - proxy
              - imageGenerate
              - createSpeech
              - createTranscription
              - createTranslation
              - realtime
              - uploadFile
              - listFiles
              - retrieveFile
              - deleteFile
              - retrieveFileContent
              - createBatch
              - retrieveBatch
              - cancelBatch
              - listBatches
              - getBatchOutput
              - listFinetunes
              - createFinetune
              - retrieveFinetune
              - cancelFinetune
              - createModelResponse
              - getModelResponse
              - deleteModelResponse
              - listResponseInputItems
              - messages
        blockedTypes:
          type: array
          items:
            type: string
            enum:
              - complete
              - chatComplete
              - embed
              - rerank
              - moderate
              - proxy
              - imageGenerate
              - createSpeech
              - createTranscription
              - createTranslation
              - realtime
              - uploadFile
              - listFiles
              - retrieveFile
              - deleteFile
              - retrieveFileContent
              - createBatch
              - retrieveBatch
              - cancelBatch
              - listBatches
              - getBatchOutput
              - listFinetunes
              - createFinetune
              - retrieveFinetune
              - cancelFinetune
              - createModelResponse
              - getModelResponse
              - deleteModelResponse
              - listResponseInputItems
              - messages
    SydeGuardParameters:
      title: SydeGuard Parameters
      type: object
      properties:
        prompt_injection_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        toxicity_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        evasion_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        timeout:
          type: number
          default: 5000
    AporiaParameters:
      title: Aporia Parameters
      type: object
      required:
        - projectID
      properties:
        projectID:
          type: string
        timeout:
          type: number
          default: 5000
    PillarScanParameters:
      title: Pillar Scan Parameters
      type: object
      required:
        - scanners
      properties:
        scanners:
          type: array
          items:
            type: string
            enum:
              - prompt_injection
              - pii
              - secrets
              - toxic_language
              - invisible_characters
        timeout:
          type: number
          default: 5000
    PatronusParameters:
      title: Patronus Parameters
      type: object
      properties:
        redact:
          type: boolean
          default: false
        timeout:
          type: number
          default: 5000
    PatronusCustomParameters:
      title: Patronus Custom Parameters
      type: object
      required:
        - profile
      properties:
        profile:
          type: string
        timeout:
          type: number
          default: 15000
    PortkeyModerationParameters:
      title: Portkey Moderation Parameters
      type: object
      required:
        - categories
      properties:
        categories:
          type: array
          items:
            type: string
            enum:
              - hate
              - hate/threatening
              - harassment
              - harassment/threatening
              - self-harm
              - self-harm/intent
              - self-harm/instructions
              - sexual
              - sexual/minors
              - violence
              - violence/graphic
        timeout:
          type: number
          default: 5000
    PortkeyLanguageParameters:
      title: Portkey Language Parameters
      type: object
      properties:
        language:
          type: string
          enum:
            - eng_Latn
            - zho_Hans
            - spa_Latn
            - ara_Arab
            - por_Latn
            - ind_Latn
            - fra_Latn
            - jpn_Jpan
            - rus_Cyrl
            - deu_Latn
            - kor_Hang
            - tur_Latn
            - ita_Latn
            - pes_Arab
            - pol_Latn
            - vie_Latn
            - nld_Latn
            - hin_Deva
            - tha_Thai
            - heb_Hebr
            - ben_Beng
            - swe_Latn
            - ces_Latn
            - ron_Latn
            - ell_Grek
            - ukr_Cyrl
            - dan_Latn
            - fin_Latn
            - nor_Latn
            - hun_Latn
            - cat_Latn
            - bul_Cyrl
            - msa_Latn
            - hrv_Latn
            - arb_Latn
            - slk_Latn
            - lit_Latn
            - lav_Latn
            - srp_Cyrl
            - slv_Latn
            - est_Latn
            - urd_Arab
            - fil_Latn
            - aze_Latn
            - tam_Taml
            - tel_Telu
            - mar_Deva
            - kan_Knda
            - fas_Arab
        not:
          type: boolean
          default: false
        timeout:
          type: number
          default: 5000
    PortkeyPIIParameters:
      title: Portkey PII Parameters
      type: object
      required:
        - categories
      properties:
        redact:
          type: boolean
          default: false
        categories:
          type: array
          items:
            type: string
            enum:
              - EMAIL_ADDRESS
              - PHONE_NUMBER
              - LOCATION_ADDRESS
              - NAME
              - IP_ADDRESS
              - CREDIT_CARD
              - SSN
        timeout:
          type: number
          default: 5000
    MistralModerationParameters:
      title: Mistral Moderation Parameters
      type: object
      required:
        - categories
      properties:
        categories:
          type: array
          items:
            type: string
            enum:
              - sexual
              - hate_and_discrimination
              - violence_and_threats
              - dangerous_and_criminal_content
              - selfharm
              - health
              - financial
              - law
              - pii
        timeout:
          type: number
          default: 5000
    BedrockGuardParameters:
      title: Bedrock Guard Parameters
      type: object
      required:
        - guardrailVersion
        - guardrailId
      properties:
        guardrailVersion:
          type: string
        guardrailId:
          type: string
        redact:
          type: boolean
          default: false
        timeout:
          type: number
          default: 5000
    PromptfooParameters:
      title: Promptfoo Parameters
      type: object
      properties:
        redact:
          type: boolean
          default: false
        timeout:
          type: number
          default: 5000
    AcuvityScanParameters:
      title: Acuvity Scan Parameters
      type: object
      properties:
        prompt_injection:
          type: boolean
          default: true
        prompt_injection_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        toxic:
          type: boolean
          default: true
        toxic_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        jail_break:
          type: boolean
          default: true
        jail_break_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        malicious_url:
          type: boolean
          default: true
        malicious_url_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        biased:
          type: boolean
          default: true
        biased_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        harmful:
          type: boolean
          default: true
        harmful_threshold:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          default: 0.5
        language:
          type: boolean
          default: true
        language_values:
          type: string
          enum:
            - english
            - chinese
            - spanish
            - french
            - german
            - japanese
            - gibberish
          default: english
        pii:
          type: boolean
          default: true
        pii_redact:
          type: boolean
          default: false
        pii_categories:
          type: array
          items:
            type: string
            enum:
              - email_address
              - ssn
              - person
              - aba_routing_number
              - address
              - bank_account
              - bitcoin_wallet
              - credit_card
              - driver_license
              - itin_number
              - location
              - medical_license
              - money_amount
              - passport_number
              - phone_number
        secrets:
          type: boolean
          default: true
        secrets_redact:
          type: boolean
          default: false
        secrets_categories:
          type: array
          items:
            type: string
            enum:
              - credentials
              - aws_secret_key
              - github
              - openai
              - stripe
              - jwt
              - private_key
        timeout:
          type: number
          default: 5000
    AzureContentSafetyParameters:
      title: Azure Content Safety Parameters
      type: object
      properties:
        blocklistNames:
          type: array
          items:
            type: string
          default: []
        apiVersion:
          type: string
          default: '2024-09-01'
        severity:
          type: number
          default: 2
        categories:
          type: array
          items:
            type: string
            enum:
              - Hate
              - SelfHarm
              - Sexual
              - Violence
        timeout:
          type: number
          default: 5000
    AzurePIIParameters:
      title: Azure PII Parameters
      type: object
      properties:
        domain:
          type: string
          enum:
            - none
            - phi
          default: none
        apiVersion:
          type: string
          default: '2024-11-01'
        modelVersion:
          type: string
          default: latest
        redact:
          type: boolean
          default: false
        timeout:
          type: number
          default: 5000
    PANWPrismaParameters:
      title: PANW Prisma Parameters
      type: object
      required:
        - profile_name
      properties:
        profile_name:
          type: string
        ai_model:
          type: string
        app_user:
          type: string
    BasicParameters:
      title: Basic Parameters
      type: object
      additionalProperties: true
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````