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

# Create Inference Job

> Create a new inference job.

The job is created in 'pending' status. Add files using the upload endpoints,
then files will be queued for processing automatically.



## OpenAPI

````yaml post /api/v1/inference-jobs
openapi: 3.1.0
info:
  title: Relay API
  description: Voice AI Artifact Detection Platform
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/inference-jobs:
    post:
      tags:
        - inference
      summary: Create Inference Job
      description: >-
        Create a new inference job.


        The job is created in 'pending' status. Add files using the upload
        endpoints,

        then files will be queued for processing automatically.
      operationId: create_inference_job_api_v1_inference_jobs_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferenceJobCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    InferenceJobCreate:
      properties:
        model_id:
          type: string
          format: uuid
          title: Model Id
        config:
          $ref: '#/components/schemas/InferenceConfig'
      type: object
      required:
        - model_id
      title: InferenceJobCreate
      description: Request to create an inference job.
    InferenceJobResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        model_id:
          type: string
          format: uuid
          title: Model Id
        config:
          additionalProperties: true
          type: object
          title: Config
        status:
          type: string
          title: Status
        total_files:
          type: integer
          title: Total Files
        processed_files:
          type: integer
          title: Processed Files
        failed_files:
          type: integer
          title: Failed Files
        total_detections:
          type: integer
          title: Total Detections
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
      type: object
      required:
        - id
        - tenant_id
        - model_id
        - config
        - status
        - total_files
        - processed_files
        - failed_files
        - total_detections
        - error_message
        - created_at
        - started_at
        - completed_at
      title: InferenceJobResponse
      description: Inference job response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InferenceConfig:
      properties:
        threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Threshold
          default: 0.5
        merge_window_ms:
          type: integer
          maximum: 5000
          minimum: 0
          title: Merge Window Ms
          default: 200
        min_duration_ms:
          type: integer
          maximum: 1000
          minimum: 0
          title: Min Duration Ms
          default: 50
      type: object
      title: InferenceConfig
      description: Configuration for inference job.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````