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

# Create a new batch job

> Creates a new batch job that can process multiple content items in bulk. Returns a presigned URL for uploading the input file. The job will automatically start processing once the input file is uploaded.



## OpenAPI

````yaml /openapi.json post /v1/batch-jobs
openapi: 3.0.0
info:
  title: Clavata Public API v1
  description: Endpoints for creating and managing jobs via the Clavata Public API.
  version: 1.0.0
  contact:
    name: Clavata.ai
    url: https://clavata.ai
    email: support@clavata.ai
servers:
  - url: https://gateway.app.clavata.ai:8443
security:
  - Bearer_Token: []
tags:
  - name: Public API
    description: Endpoints for creating and managing jobs via the Clavata Public API.
paths:
  /v1/batch-jobs:
    post:
      tags:
        - Batch Processing
      summary: Create a new batch job
      description: >-
        Creates a new batch job that can process multiple content items in bulk.
        Returns a presigned URL for uploading the input file. The job will
        automatically start processing once the input file is uploaded.
      operationId: GatewayService_CreateBatchJob
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1CreateBatchJobRequest'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1CreateBatchJobResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1GRPCErrorResponse'
        '499':
          description: Precheck Failures (Canceled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1PrecheckFailureResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v1CreateBatchJobRequest:
      type: object
      properties:
        name:
          type: string
          title: The name for the batch job
        policyId:
          type: string
          title: The policy to be used for the batch job
        webhookUrl:
          type: string
          description: The webhook URL to call when the batch job is complete. Optional.
    v1CreateBatchJobResponse:
      type: object
      properties:
        batchJobId:
          type: string
          title: The ID of the batch job that was created
        name:
          type: string
          title: The name of the batch job
        error:
          $ref: '#/components/schemas/v1BatchJobError'
        inputFileUploadUrl:
          type: string
          title: presigned URL at which the input file should be uploaded
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    v1GRPCErrorResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: A [gRPC status code](https://grpc.io/docs/guides/status-codes/)
          title: gRPC Status Code
          readOnly: true
        message:
          type: string
          description: The human-readable error message
          title: Error Message
          readOnly: true
      title: A gRPC Status response
    v1PrecheckFailureResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: A [gRPC status code](https://grpc.io/docs/guides/status-codes/)
          title: gRPC Status Code
          readOnly: true
        message:
          type: string
          description: The human-readable error message
          title: Error Message
          readOnly: true
        details:
          type: array
          items:
            $ref: '#/components/schemas/v1PrecheckFailure'
          description: An array of objects detailing why the content failed the prechecks.
    v1BatchJobError:
      type: object
      properties:
        errorCode:
          $ref: '#/components/schemas/v1BatchJobErrorCode'
        errorMessage:
          type: string
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    v1PrecheckFailure:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/v1PrecheckFailureType'
        message:
          type: string
          title: An error message associated with the failure
        details:
          description: >-
            Details provides Additional about the failure. The shape will be
            different for each failure

            type.
        matchConfidence:
          $ref: '#/components/schemas/v1PrecheckMatchConfidence'
    v1BatchJobErrorCode:
      type: string
      enum:
        - BATCH_JOB_ERROR_UNSPECIFIED
        - BATCH_JOB_ERROR_INVALID_INPUT_FILE
        - BATCH_JOB_ERROR_INVALID_POLICY
        - BATCH_JOB_ERROR_INVALID_POLICY_VERSION
        - BATCH_JOB_ERROR_INVALID_PRIORITY
      default: BATCH_JOB_ERROR_UNSPECIFIED
    v1PrecheckFailureType:
      type: string
      enum:
        - PRECHECK_FAILURE_TYPE_UNSPECIFIED
        - PRECHECK_FAILURE_TYPE_NCMEC
        - PRECHECK_FAILURE_TYPE_UNSUPPORTED_IMAGE_FORMAT
        - PRECHECK_FAILURE_TYPE_INVALID_IMAGE
      default: PRECHECK_FAILURE_TYPE_UNSPECIFIED
      description: |2-
         - PRECHECK_FAILURE_TYPE_UNSPECIFIED: The precheck failure type is not specified
         - PRECHECK_FAILURE_TYPE_NCMEC: The content has been identified as CSAM due to its hash matching an entry in the NCMEC database.
         - PRECHECK_FAILURE_TYPE_UNSUPPORTED_IMAGE_FORMAT: The image format is not supported.
         - PRECHECK_FAILURE_TYPE_INVALID_IMAGE: The provided image is invalid or corrupted.
    v1PrecheckMatchConfidence:
      type: string
      enum:
        - PRECHECK_MATCH_CONFIDENCE_UNSPECIFIED
        - PRECHECK_MATCH_CONFIDENCE_EXACT
        - PRECHECK_MATCH_CONFIDENCE_HIGH
        - PRECHECK_MATCH_CONFIDENCE_MEDIUM
        - PRECHECK_MATCH_CONFIDENCE_LOW
      default: PRECHECK_MATCH_CONFIDENCE_UNSPECIFIED
      description: |2-
         - PRECHECK_MATCH_CONFIDENCE_UNSPECIFIED: Default / legacy / non-CSAM. Not a customer-facing confidence tier.
         - PRECHECK_MATCH_CONFIDENCE_EXACT: Exact match (NCMEC direct md5/sha1 hash lookup). Highest confidence; customers may auto-enforce.
         - PRECHECK_MATCH_CONFIDENCE_HIGH: PhotoDNA perceptual match, closest distance band (near-duplicate).
         - PRECHECK_MATCH_CONFIDENCE_MEDIUM: PhotoDNA perceptual match, middle distance band (moderate similarity).
         - PRECHECK_MATCH_CONFIDENCE_LOW: PhotoDNA perceptual match, farthest distance band (loose similarity; review recommended).
  securitySchemes:
    Bearer_Token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````