> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-chore-model-provisioning-beta-feature-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create batch



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml post /batches
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /batches:
    post:
      tags:
        - Batch
      operationId: createBatch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/OpenAIBatchJob'
                - $ref: '#/components/schemas/BedrockBatchJob'
                - $ref: '#/components/schemas/VertexBatchJob'
                - $ref: '#/components/schemas/PortkeyBatchJob'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Batch'
components:
  schemas:
    OpenAIBatchJob:
      type: object
      required:
        - input_file_id
        - completion_window
        - endpoint
      properties:
        input_file_id:
          type: string
        completion_window:
          type: string
          enum:
            - immediate
            - 24h
        endpoint:
          type: string
          enum:
            - /v1/chat/completions
            - /v1/completions
            - /v1/embeddings
        metadata:
          type: object
          additionalProperties: true
          nullable: true
      title: OpenAI Params
    BedrockBatchJob:
      type: object
      required:
        - model
        - role_arn
      properties:
        job_name:
          type: string
        output_data_config:
          type: string
        model:
          type: string
        role_arn:
          type: string
      allOf:
        - $ref: '#/components/schemas/OpenAIBatchJob'
      title: Bedrock Params
    VertexBatchJob:
      type: object
      required:
        - model
      properties:
        job_name:
          type: string
        output_data_config:
          type: string
        model:
          type: string
      allOf:
        - $ref: '#/components/schemas/OpenAIBatchJob'
      title: Vertex Params
    PortkeyBatchJob:
      type: object
      required:
        - model
      properties:
        job_name:
          type: string
        output_data_config:
          type: string
        model:
          type: string
        role_arn:
          type: string
        portkey_options:
          allOf:
            - $ref: '#/components/schemas/PortkeyBatchOptions'
        provider_options:
          anyOf:
            - type: object
              title: Bedrock Options
              properties:
                job_name:
                  type: string
                output_data_config:
                  type: string
                model:
                  type: string
                role_arn:
                  type: string
              required:
                - model
                - role_arn
            - type: object
              title: Vertex Options
              properties:
                job_name:
                  type: string
                output_data_config:
                  type: string
                model:
                  type: string
              required:
                - model
      allOf:
        - $ref: '#/components/schemas/OpenAIBatchJob'
      title: Portkey Params
    Batch:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - batch
        endpoint:
          type: string
        errors:
          type: object
          properties:
            object:
              type: string
            data:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  param:
                    type: string
                    nullable: true
                  line:
                    type: integer
                    nullable: true
        input_file_id:
          type: string
        completion_window:
          type: string
        status:
          type: string
          enum:
            - validating
            - failed
            - in_progress
            - finalizing
            - completed
            - expired
            - cancelling
            - cancelled
        output_file_id:
          type: string
        error_file_id:
          type: string
        created_at:
          type: integer
        in_progress_at:
          type: integer
        expires_at:
          type: integer
        finalizing_at:
          type: integer
        completed_at:
          type: integer
        failed_at:
          type: integer
        expired_at:
          type: integer
        cancelling_at:
          type: integer
        cancelled_at:
          type: integer
        request_counts:
          type: object
          properties:
            total:
              type: integer
            completed:
              type: integer
            failed:
              type: integer
          required:
            - total
            - completed
            - failed
        metadata:
          type: object
          x-oaiTypeLabel: map
          nullable: true
      required:
        - id
        - object
        - endpoint
        - input_file_id
        - completion_window
        - status
        - created_at
    PortkeyBatchOptions:
      type: object
      required:
        - x-portkey-virtual-key
      properties:
        x-portkey-virtual-key:
          type: string
        x-portkey-aws-s3-bucket:
          type: string
        x-portkey-vertex-storage-bucket-name:
          type: string
        x-portkey-provider-model:
          type: string
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````