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

# Create Deployment



## OpenAPI

````yaml POST /deployments/add-deployment
openapi: 3.0.0
info:
  title: Enkrypt AI APIs
  version: 2.0.0
servers:
  - url: https://api.enkryptai.com
security:
  - apiKeyAuth: []
tags:
  - name: Guardrails
  - name: Code of Conduct
  - name: Endpoints
  - name: Datasets
  - name: Redteam
  - name: Deployments
  - name: AI Proxy
  - name: Leaderboard
  - name: Archived
  - name: MCP Hub
    description: >-
      MCP Hub vulnerability scanning APIs. Submitting scans (the POST endpoints)
      is open to all authenticated callers. The scan **retrieval** APIs — Get
      Scan Job Status, Get Complete Scan Results, List Scans, and Get MCP Hub
      Scan Statistics (the GET endpoints) — are an **enterprise data-license
      feature**: they require your organization to have MCP Hub API access
      enabled by Enkrypt, otherwise they return `403`. Contact us at
      support@enkryptai.com to enable access.
  - name: MCP Registry Servers
  - name: MCP Gateways
  - name: MCP Playground
paths:
  /deployments/add-deployment:
    post:
      tags:
        - Deployments
      summary: Create Deployment
      operationId: create_deployment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentRequestObject'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddDeploymentResponseObject'
components:
  schemas:
    DeploymentRequestObject:
      title: DeploymentRequestObject
      type: object
      required:
        - name
        - model_saved_name
        - model_version
        - input_guardrails_policy
        - output_guardrails_policy
      properties:
        name:
          title: Name
          type: string
          description: Name of the deployment
          example: test-deployment
        model_saved_name:
          title: Model Saved Name
          type: string
          description: Name of the saved model to use
          example: Test Model
        model_version:
          title: Model Version
          type: string
          description: Version of the model to use
          example: v1
        input_guardrails_policy:
          $ref: '#/components/schemas/InputGuardrailsPolicy'
        output_guardrails_policy:
          $ref: '#/components/schemas/OutputGuardrailsPolicy'
      example:
        name: test-deployment
        model_saved_name: Test Model
        model_version: v1
        input_guardrails_policy:
          policy_name: test-input
          enabled: true
          additional_config:
            pii_redaction: true
          block:
            - topic_detector
            - nsfw
            - toxicity
            - pii
            - injection_attack
            - keyword_detector
            - policy_violation
            - bias
            - sponge_attack
        output_guardrails_policy:
          policy_name: test-output
          enabled: true
          additional_config:
            hallucination: false
            adherence: false
            relevancy: false
          block:
            - topic_detector
            - nsfw
            - toxicity
            - pii
            - injection_attack
            - keyword_detector
            - policy_violation
            - bias
            - adherence
            - relevancy
    AddDeploymentResponseObject:
      title: AddDeploymentResponseObject
      type: object
      properties:
        message:
          title: Message
          type: string
          example: Deployment details added successfully
        data:
          $ref: '#/components/schemas/GetDeploymentResponseObject'
    InputGuardrailsPolicy:
      title: InputGuardrailsPolicy
      type: object
      required:
        - policy_name
        - enabled
        - block
      properties:
        policy_name:
          title: Policy Name
          type: string
          example: test-input
        enabled:
          title: Enabled
          type: boolean
          example: true
        additional_config:
          title: Additional Config
          type: object
          properties:
            pii_redaction:
              title: PII Redaction
              type: boolean
              example: true
        block:
          $ref: '#/components/schemas/BaseBlockOptions'
    OutputGuardrailsPolicy:
      title: OutputGuardrailsPolicy
      type: object
      required:
        - policy_name
        - enabled
        - block
      properties:
        policy_name:
          title: Policy Name
          type: string
          example: test-output
        enabled:
          title: Enabled
          type: boolean
          example: true
        additional_config:
          title: Additional Config
          type: object
          properties:
            hallucination:
              title: Hallucination
              type: boolean
              example: false
            adherence:
              title: Adherence
              type: boolean
              example: false
            relevancy:
              title: Relevancy
              type: boolean
              example: false
        block:
          $ref: '#/components/schemas/OutputBlockOptions'
    GetDeploymentResponseObject:
      title: GetDeploymentResponseObject
      type: object
      allOf:
        - $ref: '#/components/schemas/DeploymentRequestObject'
      properties:
        deployment_id:
          title: Deployment ID
          type: integer
          example: 1234567890
        created_at:
          title: Created At
          type: string
          format: date-time
          example: '2024-10-15T17:22:47.872389+00:00'
        updated_at:
          title: Updated At
          type: string
          format: date-time
          example: '2024-10-15T17:22:47.872389+00:00'
        project_name:
          title: Project Name
          type: string
          example: default
      example:
        name: test-deployment
        model_saved_name: Test Model
        model_version: v1
        input_guardrails_policy:
          additional_config:
            pii_redaction: true
          block:
            - topic_detector
            - nsfw
            - toxicity
            - pii
            - injection_attack
            - keyword_detector
            - policy_violation
            - bias
            - sponge_attack
          policy_name: test-input
          enabled: true
        output_guardrails_policy:
          additional_config:
            relevancy: false
            hallucination: false
            adherence: false
          block:
            - topic_detector
            - nsfw
            - toxicity
            - pii
            - injection_attack
            - keyword_detector
            - policy_violation
            - bias
            - adherence
            - relevancy
          policy_name: test-output
          enabled: true
        updated_at: '2024-12-23T04:43:59.005032+00:00'
        deployment_id: 1234567890
        created_at: '2024-12-23T04:43:59.005032+00:00'
    BaseBlockOptions:
      title: BaseBlockOptions
      type: array
      items:
        title: BaseBlockOptions
        type: string
        enum:
          - topic_detector
          - nsfw
          - toxicity
          - pii
          - injection_attack
          - keyword_detector
          - policy_violation
          - bias
          - sponge_attack
        description: Base block options for input and output guardrails
    OutputBlockOptions:
      title: OutputBlockOptions
      allOf:
        - $ref: '#/components/schemas/BaseBlockOptions'
        - title: OutputBlockOptions
          type: array
          items:
            title: OutputBlockOptions
            type: string
            enum:
              - hallucination
              - adherence
              - relevancy
            description: Additional block options specific to output guardrails
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````