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

# Run assessments in batch

## Scope and credits

| Requirement     | Value                                         |
| --------------- | --------------------------------------------- |
| Required scopes | `read:assessments`, `batch:assessments`       |
| Credits         | 8 credits per item, based on batch item count |


## OpenAPI

````yaml POST /v2/assessments/batch
openapi: 3.1.0
info:
  description: Deterministic, evidence-backed threat assessment API for machine consumers.
  title: Threat Investigator API v2
  version: 0.1.0
servers: []
security: []
paths:
  /v2/assessments/batch:
    post:
      tags:
        - Assessments
      summary: Batch structured assessments
      operationId: assessments_batch_v2_assessments_batch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssessmentBatchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AssessmentBatchRequest:
      additionalProperties: false
      properties:
        agent_context:
          $ref: '#/components/schemas/AgentContext'
        items:
          items:
            discriminator:
              mapping:
                actor_assessment:
                  $ref: '#/components/schemas/ActorAssessmentBatchItem'
                cve_assessment:
                  $ref: '#/components/schemas/CveAssessmentBatchItem'
                environment_assessment:
                  $ref: '#/components/schemas/EnvironmentAssessmentBatchItem'
                ioc_assessment:
                  $ref: '#/components/schemas/IocAssessmentBatchItem'
                threat_assessment:
                  $ref: '#/components/schemas/ThreatAssessmentBatchItem'
              propertyName: assessment_type
            oneOf:
              - $ref: '#/components/schemas/ThreatAssessmentBatchItem'
              - $ref: '#/components/schemas/CveAssessmentBatchItem'
              - $ref: '#/components/schemas/ActorAssessmentBatchItem'
              - $ref: '#/components/schemas/EnvironmentAssessmentBatchItem'
              - $ref: '#/components/schemas/IocAssessmentBatchItem'
          maxItems: 50
          minItems: 1
          title: Items
          type: array
        stop_on_error:
          default: false
          title: Stop On Error
          type: boolean
      required:
        - agent_context
        - items
      title: AssessmentBatchRequest
      type: object
    BatchResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BatchResultItem'
          title: Items
          type: array
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
      required:
        - items
        - metadata
      title: BatchResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentContext:
      additionalProperties: false
      properties:
        client:
          anyOf:
            - $ref: '#/components/schemas/AgentClientInfo'
            - type: 'null'
        constraints:
          anyOf:
            - $ref: '#/components/schemas/AgentConstraints'
            - type: 'null'
        objective:
          maxLength: 280
          minLength: 8
          title: Objective
          type: string
        parent_step_id:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          title: Parent Step Id
        priority:
          anyOf:
            - enum:
                - low
                - normal
                - high
                - urgent
              type: string
            - type: 'null'
          title: Priority
        requested_outcome:
          maxLength: 280
          minLength: 3
          title: Requested Outcome
          type: string
        run_id:
          maxLength: 64
          minLength: 4
          title: Run Id
          type: string
        step_id:
          maxLength: 64
          minLength: 1
          title: Step Id
          type: string
        tags:
          anyOf:
            - items:
                type: string
              maxItems: 12
              type: array
            - type: 'null'
          title: Tags
        workflow_stage:
          enum:
            - resolve
            - evidence
            - relationships
            - assessment
            - hunt
            - hydrate
            - batch
            - finalize
            - other
          title: Workflow Stage
          type: string
      required:
        - objective
        - requested_outcome
        - workflow_stage
        - run_id
        - step_id
      title: AgentContext
      type: object
    ActorAssessmentBatchItem:
      additionalProperties: false
      properties:
        assessment_type:
          const: actor_assessment
          title: Assessment Type
          type: string
        payload:
          $ref: '#/components/schemas/ActorAssessmentRequest'
      required:
        - assessment_type
        - payload
      title: ActorAssessmentBatchItem
      type: object
    CveAssessmentBatchItem:
      additionalProperties: false
      properties:
        assessment_type:
          const: cve_assessment
          title: Assessment Type
          type: string
        payload:
          $ref: '#/components/schemas/CveAssessmentRequest'
      required:
        - assessment_type
        - payload
      title: CveAssessmentBatchItem
      type: object
    EnvironmentAssessmentBatchItem:
      additionalProperties: false
      properties:
        assessment_type:
          const: environment_assessment
          title: Assessment Type
          type: string
        payload:
          $ref: '#/components/schemas/EnvironmentAssessmentRequest'
      required:
        - assessment_type
        - payload
      title: EnvironmentAssessmentBatchItem
      type: object
    IocAssessmentBatchItem:
      additionalProperties: false
      properties:
        assessment_type:
          const: ioc_assessment
          title: Assessment Type
          type: string
        payload:
          $ref: '#/components/schemas/IocAssessmentRequest'
      required:
        - assessment_type
        - payload
      title: IocAssessmentBatchItem
      type: object
    ThreatAssessmentBatchItem:
      additionalProperties: false
      properties:
        assessment_type:
          const: threat_assessment
          title: Assessment Type
          type: string
        payload:
          $ref: '#/components/schemas/ThreatAssessmentRequest'
      required:
        - assessment_type
        - payload
      title: ThreatAssessmentBatchItem
      type: object
    BatchResultItem:
      properties:
        error:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Error
        index:
          title: Index
          type: integer
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
        status:
          enum:
            - ok
            - error
          title: Status
          type: string
      required:
        - index
        - status
      title: BatchResultItem
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AgentClientInfo:
      additionalProperties: false
      properties:
        agent_name:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          title: Agent Name
        agent_version:
          anyOf:
            - maxLength: 32
              type: string
            - type: 'null'
          title: Agent Version
        framework:
          anyOf:
            - maxLength: 32
              type: string
            - type: 'null'
          title: Framework
      title: AgentClientInfo
      type: object
    AgentConstraints:
      additionalProperties: false
      properties:
        latency_budget_ms:
          anyOf:
            - maximum: 30000
              minimum: 50
              type: integer
            - type: 'null'
          title: Latency Budget Ms
        max_results_budget:
          anyOf:
            - maximum: 200
              minimum: 1
              type: integer
            - type: 'null'
          title: Max Results Budget
        min_resolution_confidence:
          anyOf:
            - maximum: 1
              minimum: 0
              type: number
            - type: 'null'
          title: Min Resolution Confidence
        strict_mode:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strict Mode
      title: AgentConstraints
      type: object
    ActorAssessmentRequest:
      additionalProperties: false
      properties:
        agent_context:
          anyOf:
            - $ref: '#/components/schemas/AgentContext'
            - type: 'null'
        context:
          anyOf:
            - $ref: '#/components/schemas/AssessmentContext'
            - type: 'null'
        expected_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Expected Types
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Options
        query:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          title: Query
        resolution:
          anyOf:
            - $ref: '#/components/schemas/ResolutionOptions'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/AssessmentSubject'
            - type: 'null'
        time_range:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Time Range
      title: ActorAssessmentRequest
      type: object
    CveAssessmentRequest:
      additionalProperties: false
      properties:
        agent_context:
          anyOf:
            - $ref: '#/components/schemas/AgentContext'
            - type: 'null'
        context:
          anyOf:
            - $ref: '#/components/schemas/AssessmentContext'
            - type: 'null'
        expected_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Expected Types
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Options
        query:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          title: Query
        resolution:
          anyOf:
            - $ref: '#/components/schemas/ResolutionOptions'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/AssessmentSubject'
            - type: 'null'
        time_range:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Time Range
      title: CveAssessmentRequest
      type: object
    EnvironmentAssessmentRequest:
      additionalProperties: false
      properties:
        agent_context:
          anyOf:
            - $ref: '#/components/schemas/AgentContext'
            - type: 'null'
        context:
          anyOf:
            - $ref: '#/components/schemas/AssessmentContext'
            - type: 'null'
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
        environment_context:
          $ref: '#/components/schemas/EnvironmentContext'
        expected_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Expected Types
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Options
        query:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          title: Query
        resolution:
          anyOf:
            - $ref: '#/components/schemas/ResolutionOptions'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/AssessmentSubject'
            - type: 'null'
        time_range:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Time Range
      required:
        - environment_context
      title: EnvironmentAssessmentRequest
      type: object
    IocAssessmentRequest:
      additionalProperties: false
      properties:
        agent_context:
          anyOf:
            - $ref: '#/components/schemas/AgentContext'
            - type: 'null'
        context:
          anyOf:
            - $ref: '#/components/schemas/AssessmentContext'
            - type: 'null'
        expected_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Expected Types
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Options
        query:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          title: Query
        resolution:
          anyOf:
            - $ref: '#/components/schemas/ResolutionOptions'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/AssessmentSubject'
            - type: 'null'
        time_range:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Time Range
      title: IocAssessmentRequest
      type: object
    ThreatAssessmentRequest:
      additionalProperties: false
      properties:
        agent_context:
          anyOf:
            - $ref: '#/components/schemas/AgentContext'
            - type: 'null'
        context:
          anyOf:
            - $ref: '#/components/schemas/AssessmentContext'
            - type: 'null'
        expected_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Expected Types
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Options
        query:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          title: Query
        resolution:
          anyOf:
            - $ref: '#/components/schemas/ResolutionOptions'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/AssessmentSubject'
            - type: 'null'
        time_range:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Time Range
      title: ThreatAssessmentRequest
      type: object
    AssessmentContext:
      additionalProperties: false
      properties:
        affected_cpes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Affected Cpes
        campaign_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Status
        evidence_refs:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/AssessmentEvidenceRef'
                  - type: string
              type: array
            - type: 'null'
          title: Evidence Refs
        intel_confidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Intel Confidence
        known_exploited:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Known Exploited
        known_targets:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Known Targets
        targeted_industries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Targeted Industries
        targeted_regions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Targeted Regions
      title: AssessmentContext
      type: object
    ResolutionOptions:
      additionalProperties: false
      properties:
        include_aliases:
          default: false
          title: Include Aliases
          type: boolean
        include_metadata:
          default: false
          title: Include Metadata
          type: boolean
        max_results:
          default: 5
          maximum: 25
          minimum: 1
          title: Max Results
          type: integer
      title: ResolutionOptions
      type: object
    AssessmentSubject:
      additionalProperties: false
      properties:
        canonical_id:
          title: Canonical Id
          type: string
        canonical_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Canonical Name
        entity_type:
          title: Entity Type
          type: string
      required:
        - entity_type
        - canonical_id
      title: AssessmentSubject
      type: object
    EnvironmentContext:
      additionalProperties: false
      properties:
        control_maturity:
          anyOf:
            - enum:
                - weak
                - moderate
                - strong
              type: string
            - type: 'null'
          title: Control Maturity
        critical_asset_exposure:
          anyOf:
            - enum:
                - none
                - low
                - medium
                - high
              type: string
            - type: 'null'
          title: Critical Asset Exposure
        crown_jewel_asset_count:
          anyOf:
            - maximum: 50000
              minimum: 0
              type: integer
            - type: 'null'
          title: Crown Jewel Asset Count
        detection_coverage:
          anyOf:
            - maximum: 1
              minimum: 0
              type: number
            - type: 'null'
          title: Detection Coverage
        eol_asset_count:
          anyOf:
            - maximum: 50000
              minimum: 0
              type: integer
            - type: 'null'
          title: Eol Asset Count
        externally_exposed_service_count:
          anyOf:
            - maximum: 200000
              minimum: 0
              type: integer
            - type: 'null'
          title: Externally Exposed Service Count
        internet_exposure:
          anyOf:
            - enum:
                - none
                - low
                - medium
                - high
              type: string
            - type: 'null'
          title: Internet Exposure
        mfa_enforced:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mfa Enforced
        patch_latency_days:
          anyOf:
            - maximum: 365
              minimum: 0
              type: integer
            - type: 'null'
          title: Patch Latency Days
        regions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Regions
        sector:
          anyOf:
            - type: string
            - type: 'null'
          title: Sector
      title: EnvironmentContext
      type: object
    AssessmentEvidenceRef:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        type:
          title: Type
          type: string
      required:
        - type
        - id
      title: AssessmentEvidenceRef
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: ApiKey <key_id>:<secret>
      in: header
      name: Authorization
      type: apiKey

````