{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/calypsoai-com/main/json-schema/calypsoai-com-post-providers-from-system-body-schema.json",
  "title": "PostProvidersFromSystemBody",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/calypsoai-com-openapi.json#/components/schemas/PostProvidersFromSystemBody",
  "properties": {
    "capabilities": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ProviderCapability"
          },
          "type": "array",
          "uniqueItems": true
        },
        {
          "type": "null"
        }
      ],
      "description": "Set of capabilities that the provider will have. Cannot be changed after creation.",
      "title": "Capabilities"
    },
    "default": {
      "default": false,
      "description": "Whether the new provider should the default provider. Has no effect if enable is false.",
      "title": "Default",
      "type": "boolean"
    },
    "enable": {
      "default": false,
      "description": "Enable the new provider for the default project for the group/global settings.",
      "title": "Enable",
      "type": "boolean"
    },
    "inputs": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "Input values that can be accessed in the template.",
      "title": "Inputs"
    },
    "maxRequestsPerSecond": {
      "anyOf": [
        {
          "exclusiveMinimum": 0.0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Deprecated, use requestConcurrencyLimit instead.",
      "title": "Maxrequestspersecond"
    },
    "name": {
      "description": "The name can be used to identify the provider instead of the id. It is case-sensitive, unique and can only contain letters, numbers and dashes.",
      "pattern": "^[a-zA-Z0-9-_]+$",
      "title": "Name",
      "type": "string"
    },
    "projectId": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Limit access to the provider to a given project.",
      "title": "Projectid"
    },
    "redTeam": {
      "default": false,
      "description": "Mark provider for use in attack campaigns.",
      "title": "Redteam",
      "type": "boolean"
    },
    "requestConcurrencyLimit": {
      "anyOf": [
        {
          "$ref": "#/$defs/RequestConcurrencyLimit"
        },
        {
          "type": "null"
        }
      ],
      "description": "Specifies concurrency limits for requests from campaign run attacks."
    },
    "secrets": {
      "anyOf": [
        {
          "additionalProperties": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "$ref": "#/$defs/NewSecret"
              }
            ]
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "Secrets that can be accessed in the template.",
      "title": "Secrets"
    },
    "systemProvider": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "string"
        }
      ],
      "description": "ID or name of the system provider to use the template from.",
      "title": "Systemprovider"
    },
    "tag": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional tag to attach to the provider.",
      "title": "Tag"
    },
    "test": {
      "default": false,
      "description": "Whether to test the provider connection before creation.",
      "title": "Test",
      "type": "boolean"
    }
  },
  "required": [
    "name",
    "systemProvider"
  ],
  "type": "object",
  "$defs": {
    "NewSecret": {
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "value": {
          "format": "password",
          "title": "Value",
          "type": "string",
          "writeOnly": true
        }
      },
      "required": [
        "name",
        "value"
      ],
      "title": "NewSecret",
      "type": "object"
    },
    "ProviderCapability": {
      "enum": [
        "chat",
        "red_team",
        "siem",
        "openai_chat",
        "openai_responses",
        "anthropic_messages",
        "google_generate_content"
      ],
      "title": "ProviderCapability",
      "type": "string"
    },
    "RequestConcurrencyLimit": {
      "properties": {
        "decayPerSecond": {
          "anyOf": [
            {
              "exclusiveMinimum": 0.0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Number of request slots that are opened per second.\n\nSet a value to use the concurrency limit as a rate limit.\n\nFor example, to set a rate limit of 5 requests per second set requests=5 and decayPerSecond=5",
          "title": "Decaypersecond"
        },
        "requests": {
          "description": "Max number of request slots that can be occupied at once.",
          "exclusiveMinimum": 0.0,
          "title": "Requests",
          "type": "integer"
        }
      },
      "required": [
        "requests"
      ],
      "title": "RequestConcurrencyLimit",
      "type": "object"
    }
  }
}