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

# Batch inference

> Run batch inference using a trained model



## OpenAPI

````yaml POST /inference/batch
openapi: 3.1.0
info:
  title: Gemma Inference Service
  description: Inference service for running inference on trained models
  version: 1.0.0
servers:
  - url: https://inference-service-433968519479.us-central1.run.app
security: []
paths:
  /inference/batch:
    post:
      summary: Batch Inference
      description: Run batch inference using a trained model
      operationId: batch_inference_inference_batch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchInferenceRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchInferenceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BatchInferenceRequest:
      properties:
        hf_token:
          type: string
          title: Hf Token
        model_source:
          type: string
          title: Model Source
        model_type:
          type: string
          enum:
            - adapter
            - merged
            - base
          title: Model Type
        base_model_id:
          type: string
          title: Base Model Id
        messages:
          items:
            items:
              additionalProperties: true
              type: object
            type: array
          type: array
          title: Messages
        use_vllm:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Use Vllm
          default: false
      type: object
      required:
        - hf_token
        - model_source
        - model_type
        - base_model_id
        - messages
      title: BatchInferenceRequest
    BatchInferenceResponse:
      properties:
        results:
          items:
            type: string
          type: array
          title: Results
      type: object
      required:
        - results
      title: BatchInferenceResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````