ArthurAI Tasks API

Endpoints to manage tasks and their rules

Operations 15

GET /api/v2/tasks Get All Tasks #
POST /api/v2/tasks Create Task #
DELETE /api/v2/tasks/{task_id} Archive Task #
GET /api/v2/tasks/{task_id} Get Task #
POST /api/v2/tasks/{task_id}/unarchive Unarchive Task #
GET /api/v2/agent-tasks Get Agent Tasks #
POST /api/v2/task Redirect To Tasks #
POST /api/v2/tasks/search Search Tasks #
POST /api/v2/tasks/{task_id}/rules Create Task Rule #
PATCH /api/v2/tasks/{task_id}/rules/{rule_id} Update Task Rules #
DELETE /api/v2/tasks/{task_id}/rules/{rule_id} Archive Task Rule #
POST /api/v2/tasks/{task_id}/metrics Create Task Metric #
PATCH /api/v2/tasks/{task_id}/metrics/{metric_id} Update Task Metric #
DELETE /api/v2/tasks/{task_id}/metrics/{metric_id} Archive Task Metric #
POST /api/v1/tasks/{task_id}/demos/chatbot/stream Stream Demo Chatbot #

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/arthurai-tasks-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

arthurai-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Arthur GenAI Engine Agent Discovery Tasks API
  version: 2.1.688
  description: Endpoints to manage tasks and their rules
servers:
- url: https://platform.arthur.ai/api
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Tasks
  description: Endpoints to manage tasks and their rules
paths:
  /api/v2/tasks:
    get:
      tags:
      - Tasks
      summary: Get All Tasks
      description: '[Deprecated] Use /tasks/search endpoint. This endpoint will be removed in a future release.'
      operationId: get_all_tasks_api_v2_tasks_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TaskResponse'
                type: array
                title: Response Get All Tasks Api V2 Tasks Get
      deprecated: true
      security:
      - API Key: []
    post:
      tags:
      - Tasks
      summary: Create Task
      description: Register a new task. When a new task is created, all existing default rules will be auto-applied for this new task. Optionally specify if the task is agentic.
      operationId: create_task_api_v2_tasks_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTaskRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - API Key: []
  /api/v2/tasks/{task_id}:
    delete:
      tags:
      - Tasks
      summary: Archive Task
      description: Archive task. Also archives all task-scoped rules. Associated default rules are unaffected.
      operationId: archive_task_api_v2_tasks__task_id__delete
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Tasks
      summary: Get Task
      description: Get tasks.
      operationId: get_task_api_v2_tasks__task_id__get
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/tasks/{task_id}/unarchive:
    post:
      tags:
      - Tasks
      summary: Unarchive Task
      description: Unarchive a previously archived task. Also unarchives all task-scoped rules and metrics that were archived with it.
      operationId: unarchive_task_api_v2_tasks__task_id__unarchive_post
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/agent-tasks:
    get:
      tags:
      - Tasks
      summary: Get Agent Tasks
      description: Get agentic tasks with enriched agent metadata (tools, sub-agents, models). Returns only agentic tasks.
      operationId: get_agent_tasks_api_v2_agent_tasks_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EnrichedTaskResponse'
                type: array
                title: Response Get Agent Tasks Api V2 Agent Tasks Get
      security:
      - API Key: []
  /api/v2/task:
    post:
      tags:
      - Tasks
      summary: Redirect To Tasks
      description: Redirect to /tasks endpoint.
      operationId: redirect_to_tasks_api_v2_task_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v2/tasks/search:
    post:
      tags:
      - Tasks
      summary: Search Tasks
      description: Search tasks. Can filter by task IDs, task name substring, and agentic status.
      operationId: search_tasks_api_v2_tasks_search_post
      security:
      - API Key: []
      parameters:
      - name: sort
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/PaginationSortMethod'
          description: Sort the results (asc/desc)
          default: desc
        description: Sort the results (asc/desc)
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          description: Page size. Default is 10. Must be greater than 0 and less than 5000.
          default: 10
          title: Page Size
        description: Page size. Default is 10. Must be greater than 0 and less than 5000.
      - name: page
        in: query
        required: false
        schema:
          type: integer
          description: Page number
          default: 0
          title: Page
        description: Page number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchTasksRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchTasksResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/tasks/{task_id}/rules:
    post:
      tags:
      - Tasks
      summary: Create Task Rule
      description: 'Create a rule to be applied only to this task. Available rule types are KeywordRule, ModelHallucinationRuleV2, ModelSensitiveDataRule, PIIDataRule, PromptInjectionRule, RegexRule, ToxicityRule.Note: The rules are cached by the validation endpoints for 60 seconds.'
      operationId: create_task_rule_api_v2_tasks__task_id__rules_post
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewRuleRequest'
            examples:
              example1:
                summary: Sensitive Data Example
                description: Sensitive Data Example with its required configuration
                value:
                  name: Sensitive Data Rule
                  type: ModelSensitiveDataRule
                  apply_to_prompt: true
                  apply_to_response: false
                  config:
                    examples:
                    - example: John has O negative blood group
                      result: true
                    - example: Most of the people have A positive blood group
                      result: false
                    hint: specific individual's blood types
              example2:
                summary: Regex Example
                description: Regex Example with its required configuration. Be sure to properly encode requests using JSON libraries. For example, the regex provided encodes to a different string when encoded to account for escape characters.
                value:
                  name: SSN Regex Rule
                  type: RegexRule
                  apply_to_prompt: true
                  apply_to_response: true
                  config:
                    regex_patterns:
                    - \d{3}-\d{2}-\d{4}
                    - \d{5}-\d{6}-\d{7}
              example3:
                summary: Keywords Rule Example
                description: Keywords Rule Example with its required configuration
                value:
                  name: Blocked Keywords Rule
                  type: KeywordRule
                  apply_to_prompt: true
                  apply_to_response: true
                  config:
                    keywords:
                    - Blocked_Keyword_1
                    - Blocked_Keyword_2
              example4:
                summary: Prompt Injection Rule Example
                description: Prompt Injection Rule Example, no configuration required
                value:
                  name: Prompt Injection Rule
                  type: PromptInjectionRule
                  apply_to_prompt: true
                  apply_to_response: false
              example5:
                summary: Hallucination Rule V1 Example (Deprecated)
                description: Hallucination Rule Example, no configuration required (This rule is deprecated. Use ModelHallucinationRuleV2 instead.)
                value:
                  name: Hallucination Rule
                  type: ModelHallucinationRule
                  apply_to_prompt: false
                  apply_to_response: true
              example6:
                summary: Hallucination Rule V2 Example
                description: Hallucination Rule Example, no configuration required
                value:
                  name: Hallucination Rule
                  type: ModelHallucinationRuleV2
                  apply_to_prompt: false
                  apply_to_response: true
              example7:
                summary: Hallucination Rule V3 Example (Beta)
                description: Hallucination Rule Example, no configuration required. This rule is in beta and must be enabled by the system administrator.
                value:
                  name: Hallucination Rule
                  type: ModelHallucinationRuleV3
                  apply_to_prompt: false
                  apply_to_response: true
              example8:
                summary: PII Rule Example
                description: PII Rule Example, no configuration required. "disabled_pii_entities", "confidence_threshold", and "allow_list" accepted. Valid value for "confidence_threshold" is 0.0-1.0. Valid values for "disabled_pii_entities" are CREDIT_CARD,CRYPTO,DATE_TIME,EMAIL_ADDRESS,IBAN_CODE,IP_ADDRESS,NRP,LOCATION,PERSON,PHONE_NUMBER,MEDICAL_LICENSE,URL,US_BANK_NUMBER,US_DRIVER_LICENSE,US_ITIN,US_PASSPORT,US_SSN
                value:
                  name: PII Rule
                  type: PIIDataRule
                  apply_to_prompt: true
                  apply_to_response: true
                  config:
                    disabled_pii_entities:
                    - EMAIL_ADDRESS
                    - PHONE_NUMBER
                    confidence_threshold: '0.5'
                    allow_list:
                    - arthur.ai
                    - Arthur
              example9:
                summary: Toxicity Rule Example
                description: Toxicity Rule Example, no configuration required. Threshold accepted
                value:
                  name: Toxicity Rule
                  type: ToxicityRule
                  apply_to_prompt: true
                  apply_to_response: true
                  config:
                    threshold: 0.5
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/tasks/{task_id}/rules/{rule_id}:
    patch:
      tags:
      - Tasks
      summary: Update Task Rules
      description: Enable or disable an existing rule for this task including the default rules.
      operationId: update_task_rules_api_v2_tasks__task_id__rules__rule_id__patch
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRuleRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Tasks
      summary: Archive Task Rule
      description: Archive an existing rule for this task.
      operationId: archive_task_rule_api_v2_tasks__task_id__rules__rule_id__delete
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Rule Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/tasks/{task_id}/metrics:
    post:
      tags:
      - Tasks
      summary: Create Task Metric
      description: Create metrics for a task. Only agentic tasks can have metrics.
      operationId: create_task_metric_api_v2_tasks__task_id__metrics_post
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMetricRequest'
            examples:
              example1:
                type: QueryRelevance
                name: My User Query Relevance
                metric_metadata: This is a test metric metadata
              example2:
                type: QueryRelevance
                name: My User Query Relevance with Config
                metric_metadata: This is a test metric metadata
                config:
                  relevance_threshold: 0.8
                  use_llm_judge: false
              example3:
                type: ResponseRelevance
                name: My Response Relevance
                metric_metadata: This is a test metric metadata
                config:
                  use_llm_judge: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/tasks/{task_id}/metrics/{metric_id}:
    patch:
      tags:
      - Tasks
      summary: Update Task Metric
      description: Update a task metric.
      operationId: update_task_metric_api_v2_tasks__task_id__metrics__metric_id__patch
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      - name: metric_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Metric Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMetricRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Tasks
      summary: Archive Task Metric
      description: Archive a task metric.
      operationId: archive_task_metric_api_v2_tasks__task_id__metrics__metric_id__delete
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Task Id
      - name: metric_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Metric Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/tasks/{task_id}/demos/chatbot/stream:
    post:
      tags:
      - Tasks
      summary: Stream Demo Chatbot
      description: Stream a demo chatbot response.
      operationId: stream_demo_chatbot_api_v1_tasks__task_id__demos_chatbot_stream_post
      security:
      - API Key: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatbotRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RegexConfig:
      properties:
        regex_patterns:
          items:
            type: string
          type: array
          title: Regex Patterns
          description: List of Regex patterns to be used for validation. Be sure to encode requests in JSON and account for escape characters.
      additionalProperties: false
      type: object
      required:
      - regex_patterns
      title: RegexConfig
      example:
        regex_patterns:
        - \d{3}-\d{2}-\d{4}
        - \d{5}-\d{6}-\d{7}
    TaskResponse:
      properties:
        id:
          type: string
          title: Id
          description: ' ID of the task'
        name:
          type: string
          title: Name
          description: Name of the task
        created_at:
          type: integer
          title: Created At
          description: Time the task was created in unix milliseconds
        updated_at:
          type: integer
          title: Updated At
          description: Time the task was created in unix milliseconds
        is_agentic:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Agentic
          description: Whether the task is agentic or not
        is_system_task:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is System Task
          description: Whether this is a system-managed task (e.g., for traces without a task_id or service name, or for Arthur-created traces)
          default: false
        is_autocreated:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Autocreated
          description: Whether this task was automatically created by Arthur
          default: false
        is_archived:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Archived
          description: Whether this task is archived
          default: false
        agent_metadata:
          anyOf:
          - $ref: '#/components/schemas/AgentMetadataResponse'
          - type: 'null'
          description: Metadata to describe the creation source/provider for registered agents.
        rules:
          items:
            $ref: '#/components/schemas/RuleResponse'
          type: array
          title: Rules
          description: List of all the rules for the task.
        metrics:
          anyOf:
          - items:
              $ref: '#/components/schemas/MetricResponse'
            type: array
          - type: 'null'
          title: Metrics
          description: List of all the metrics for the task.
      type: object
      required:
      - id
      - name
      - created_at
      - updated_at
      - rules
      title: TaskResponse
    PIIConfig:
      properties:
        disabled_pii_entities:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Disabled Pii Entities
          description: 'Optional. List of PII entities to disable. Valid values are: CREDIT_CARD,CRYPTO,DATE_TIME,EMAIL_ADDRESS,IBAN_CODE,IP_ADDRESS,NRP,LOCATION,PERSON,PHONE_NUMBER,MEDICAL_LICENSE,URL,US_BANK_NUMBER,US_DRIVER_LICENSE,US_ITIN,US_PASSPORT,US_SSN'
        confidence_threshold:
          anyOf:
          - type: number
          - type: 'null'
          title: Confidence Threshold
          description: 'Optional. Float (0, 1) indicating the level of tolerable PII to consider the rule passed or failed. Min: 0 (less confident) Max: 1 (very confident). Default: 0'
          default: 0
          deprecated: true
        allow_list:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Allow List
          description: Optional. List of strings to pass PII validation.
      additionalProperties: false
      type: object
      title: PIIConfig
      example:
        allow_list:
        - arthur.ai
        - Arthur
        confidence_threshold: '0.5'
        disabled_pii_entities:
        - PERSON
        - URL
    DataSource:
      properties:
        url:
          type: string
          title: Url
          description: URL of the data source.
      type: object
      required:
      - url
      title: DataSource
      description: Data source used by an agent.
    GCPAgentMetadataResponse:
      properties:
        project_id:
          type: string
          title: Project Id
          description: Project ID of the agent.
        region:
          type: string
          title: Region
          description: Region of the agent.
        resource_id:
          type: string
          title: Resource Id
          description: Resource ID of the agent.
      type: object
      required:
      - project_id
      - region
      - resource_id
      title: GCPAgentMetadataResponse
      description: GCP-specific agent metadata for responses.
    ToolCall:
      properties:
        type:
          type: string
          title: Type
          description: The type of tool call. Currently the only type supported is 'function'.
          default: function
        id:
          type: string
          title: Id
          description: Unique identifier for the tool call
        function:
          $ref: '#/components/schemas/ToolCallFunction'
          description: Function details
      type: object
      required:
      - id
      - function
      title: ToolCall
    AgentCreationSource:
      anyOf:
      - $ref: '#/components/schemas/GCPAgentCreationSource'
      - $ref: '#/components/schemas/OTELAgentCreationSource'
      - $ref: '#/components/schemas/ManualAgentCreationSource'
      title: AgentCreationSource
    NewRuleRequest:
      properties:
        name:
          type: string
          title: Name
          description: Name of the rule
          examples:
          - SSN Regex Rule
        type:
          type: string
          title: Type
          description: Type of the rule. It can only be one of KeywordRule, RegexRule, ModelSensitiveDataRule, ModelHallucinationRule, ModelHallucinationRuleV2, PromptInjectionRule, PIIDataRule
          examples:
          - RegexRule
        apply_to_prompt:
          type: boolean
          title: Apply To Prompt
          description: Boolean value to enable or disable the rule for llm prompt
          examples:
          - true
        apply_to_response:
          type: boolean
          title: Apply To Response
          description: Boolean value to enable or disable the rule for llm response
          examples:
          - false
        config:
          anyOf:
          - $ref: '#/components/schemas/KeywordsConfig'
          - $ref: '#/components/schemas/RegexConfig'
          - $ref: '#/components/schemas/ExamplesConfig'
          - $ref: '#/components/schemas/ToxicityConfig'
          - $ref: '#/components/schemas/PIIConfig'
          - type: 'null'
          title: Config
          description: Config of the rule
      type: object
      required:
      - name
      - type
      - apply_to_prompt
      - apply_to_response
      title: NewRuleRequest
      example1:
        description: Sensitive Data Example with its required configuration
        summary: Sensitive Data Example
        value:
          apply_to_prompt: true
          apply_to_response: false
          config:
            examples:
            - example: John has O negative blood group
              result: true
            - example: Most of the people have A positive blood group
              result: false
            hint: specific individual's blood types
          name: Sensitive Data Rule
          type: ModelSensitiveDataRule
      example2:
        description: Regex Example with its required configuration. Be sure to properly encode requests using JSON libraries. For example, the regex provided encodes to a different string when encoded to account for escape characters.
        summary: Regex Example
        value:
          apply_to_prompt: true
          apply_to_response: true
          config:
            regex_patterns:
            - \d{3}-\d{2}-\d{4}
            - \d{5}-\d{6}-\d{7}
          name: SSN Regex Rule
          type: RegexRule
      example3:
        description: Keywords Rule Example with its required configuration
        summary: Keywords Rule Example
        value:
          apply_to_prompt: true
          apply_to_response: true
          config:
            keywords:
            - Blocked_Keyword_1
            - Blocked_Keyword_2
          name: Blocked Keywords Rule
          type: KeywordRule
      example4:
        description: Prompt Injection Rule Example, no configuration required
        summary: Prompt Injection Rule Example
        value:
          apply_to_prompt: true
          apply_to_response: false
          name: Prompt Injection Rule
          type: PromptInjectionRule
      example5:
        description: Hallucination Rule Example, no configuration required (This rule is deprecated. Use ModelHallucinationRuleV2 instead.)
        summary: Hallucination Rule V1 Example (Deprecated)
        value:
          apply_to_prompt: false
          apply_to_response: true
          name: Hallucination Rule
          type: ModelHallucinationRule
      example6:
        description: Hallucination Rule Example, no configuration required
        summary: Hallucination Rule V2 Example
        value:
          apply_to_prompt: false
          apply_to_response: true
          name: Hallucination Rule
          type: ModelHallucinationRuleV2
      example7:
        description: Hallucination Rule Example, no configuration required. This rule is in beta and must be enabled by the system administrator.
        summary: Hallucination Rule V3 Example (Beta)
        value:
          apply_to_prompt: false
          apply_to_response: true
          name: Hallucination Rule
          type: ModelHallucinationRuleV3
      example8:
        description: PII Rule Example, no configuration required. "disabled_pii_entities", "confidence_threshold", and "allow_list" accepted. Valid value for "confidence_threshold" is 0.0-1.0. Valid values for "disabled_pii_entities" are CREDIT_CARD,CRYPTO,DATE_TIME,EMAIL_ADDRESS,IBAN_CODE,IP_ADDRESS,NRP,LOCATION,PERSON,PHONE_NUMBER,MEDICAL_LICENSE,URL,US_BANK_NUMBER,US_DRIVER_LICENSE,US_ITIN,US_PASSPORT,US_SSN
        summary: PII Rule Example
        value:
          apply_to_prompt: true
          apply_to_response: true
          config:
            allow_list:
            - arthur.ai
            - Arthur
            confidence_threshold: '0.5'
            disabled_pii_entities:
            - EMAIL_ADDRESS
            - PHONE_NUMBER
          name: PII Rule
          type: PIIDataRule
      example9:
        description: Toxicity Rule Example, no configuration required. Threshold accepted
        summary: Toxicity Rule Example
        value:
          apply_to_prompt: true
          apply_to_response: true
          config:
            threshold: 0.5
          name: Toxicity Rule
          type: ToxicityRule
    NewMetricRequest:
      properties:
        type:
          $ref: '#/components/schemas/MetricType'
          description: Type of the metric. It can only be one of QueryRelevance, ResponseRelevance, ToolSelection
          examples:
          - UserQueryRelevance
        name:
          type: string
          title: Name
          description: Name of metric
          examples:
          - My User Query Relevance
        metric_metadata:
          type: string
          title: Metric Metadata
          description: Additional metadata for the metric
        config:
          anyOf:
          - $ref: '#/components/schemas/RelevanceMetricConfig'
          - type: 'null'
          description: Configuration for the metric. Currently only applies to UserQueryRelevance and ResponseRelevance metric types.
      type: object
      required:
      - type
      - name
      - metric_metadata
      title: NewMetricRequest
      example1:
        metric_metadata: This is a test metric metadata
        name: My User Query Relevance
        type: QueryRelevance
      example2:
        config:
          relevance_threshold: 0.8
          use_llm_judge: false
        metric_metadata: This is a test metric metadata
        name: My User Query Relevance with Config
        type: QueryRelevance
      example3:
        config:
          use_llm_judge: true
        metric_metadata: This is a test metric metadata
        name: My Response Relevance
        type: ResponseRelevance
    OTELAgentCreationSource:
      properties:
        type:
          type: string
          const: OTEL
          title: Type
          default: OTEL
        service_names:
          items:
            type: string
          type: array
          title: Service Names
          description: Service names associated with this agent
      type: object
      title: OTELAgentCreationSource
      description: Creation source for OTEL-discovered agents (auto-created from traces).
    Example

# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/arthurai/refs/heads/main/openapi/arthurai-tasks-api-openapi.yml