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

# Create a message batch (Anthropic Message Batches API)



## OpenAPI

````yaml /openapi.json post /v1/messages/batches
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, Fireworks AI, Meta, OpenRouter, Kilo AI, DeepSeek, Z.ai, xAI,
    MiniMax, Xiaomi MiMo, OpenCode Go, Oracle, Ollama, Bailian). Drop-in
    OpenAI-compatible API.
  title: GoModel API
  contact: {}
  version: '1.0'
servers:
  - url: '{base_url}'
    description: Edit the base URL to point at your GoModel deployment.
    variables:
      base_url:
        default: http://localhost:8080
        description: Your GoModel deployment URL
security: []
paths:
  /v1/messages/batches:
    post:
      tags:
        - messages
      summary: Create a message batch (Anthropic Message Batches API)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/anthropicapi.BatchCreateRequest'
        description: Anthropic Message Batches create request
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anthropicapi.MessageBatch'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anthropicapi.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anthropicapi.ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anthropicapi.ErrorResponse'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anthropicapi.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    anthropicapi.BatchCreateRequest:
      type: object
      properties:
        requests:
          type: array
          items:
            $ref: '#/components/schemas/anthropicapi.BatchCreateItem'
    anthropicapi.MessageBatch:
      type: object
      properties:
        archived_at:
          type: string
        cancel_initiated_at:
          type: string
        created_at:
          type: string
        ended_at:
          type: string
        expires_at:
          type: string
        id:
          type: string
        processing_status:
          type: string
        request_counts:
          $ref: '#/components/schemas/anthropicapi.MessageBatchRequestCounts'
        results_url:
          type: string
        type:
          type: string
    anthropicapi.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/anthropicapi.ErrorObject'
        type:
          type: string
    anthropicapi.BatchCreateItem:
      type: object
      properties:
        custom_id:
          type: string
        params:
          type: object
    anthropicapi.MessageBatchRequestCounts:
      type: object
      properties:
        canceled:
          type: integer
        errored:
          type: integer
        expired:
          type: integer
        processing:
          type: integer
        succeeded:
          type: integer
    anthropicapi.ErrorObject:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````