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

# List Batches

> List your batches, newest first.



## OpenAPI

````yaml https://api.edenai.run/v3/docs/openapi.json get /v3/batches
openapi: 3.1.0
info:
  title: Eden AI API V3
  version: 3.0.0
servers:
  - url: https://api.edenai.run
    description: Production server
security: []
paths:
  /v3/batches:
    get:
      tags:
        - Batches
      summary: List Batches
      description: List your batches, newest first.
      operationId: list_batches_v3_batches_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Batches to return (1-100).
            default: 20
            title: Limit
          description: Batches to return (1-100).
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cursor: return the batches created before this batch id (the
              previous page's `last_id`).
            title: After
          description: >-
            Cursor: return the batches created before this batch id (the
            previous page's `last_id`).
        - name: model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^[^/]+/.+$
              - type: 'null'
            description: >-
              Only the batches run on this model (`<provider>/<model>`, such as
              `openai/<model>` or `anthropic/<model>`), whether their lines
              named it or one of its aliases, deactivated aliases included. A
              batch whose lines named an alias since deleted is listed under
              that alias name only.
            title: Model
          description: >-
            Only the batches run on this model (`<provider>/<model>`, such as
            `openai/<model>` or `anthropic/<model>`), whether their lines named
            it or one of its aliases, deactivated aliases included. A batch
            whose lines named an alias since deleted is listed under that alias
            name only.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - AuthBearer: []
components:
  schemas:
    BatchListResponse:
      properties:
        object:
          type: string
          const: list
          title: Object
          description: Always `list`.
          default: list
        data:
          items:
            $ref: '#/components/schemas/BatchObject'
          type: array
          title: Data
          description: The batches on this page.
        first_id:
          anyOf:
            - type: string
            - type: 'null'
          title: First Id
          description: The id of the first batch on the page.
        last_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Id
          description: >-
            The id of the last batch on the page: pass it as `after` for the
            next.
        has_more:
          type: boolean
          title: Has More
          description: Whether more batches follow this page.
      type: object
      required:
        - data
        - has_more
      title: BatchListResponse
      description: A page of the caller's batches, newest first.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BatchObject:
      properties:
        id:
          type: string
          title: Id
          description: The batch id.
        object:
          type: string
          const: batch
          title: Object
          description: Always `batch`.
          default: batch
        endpoint:
          type: string
          title: Endpoint
          description: The endpoint every request of the batch calls.
          default: /v1/chat/completions
        model:
          type: string
          title: Model
          description: >-
            The model id every line of the batch named, as written:
            `openai/<model>`, `anthropic/<model>`, `mistral/<model>`,
            `amazon/<model>@eu` or `vertex/<model>@eu`, or an alias of it.
        status:
          type: string
          enum:
            - validating
            - in_progress
            - finalizing
            - completed
            - failed
            - expired
            - cancelling
            - cancelled
          title: Status
          description: Where the batch is in its lifecycle.
        request_counts:
          $ref: '#/components/schemas/BatchRequestCounts'
          description: How many requests have finished, refreshed every few minutes.
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: The key/value pairs given at create.
        created_at:
          type: integer
          title: Created At
          description: When the batch was created, Unix seconds.
        finished_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Finished At
          description: When the batch finished and settled, Unix seconds.
        cost:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Cost
          description: >-
            What the batch billed, in US dollars, once it finished; null before.
            Each request that succeeded bills its tokens at the model's batch
            rates; a failed one, or one that never ran, bills zero. A request
            that succeeded with no token count bills an estimate at the same
            rates: its prompt tokens, the output its response shows and a
            reasoning allowance, the output never above the most the request
            could produce. A request the provider counts as completed with no
            result line bills the same estimate with no output shown. When the
            results cannot be read, every request that may have run bills that
            estimate.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Why the batch failed, when it did.
        results_available:
          type: boolean
          title: Results Available
          description: >-
            Whether `GET /v3/batches/{batch_id}/results` is sure to serve this
            batch, read from the stored batch with no call to the provider: it
            has finished, was created at the provider, its recorded provider
            status is ended, and it was created less than 30 days ago, less one
            hour (29 days on Anthropic, which keeps results for 29 days:
            `jobs.results_promised_until`); past it this reads false, and the
            results route still tries and answers 410 once the results are gone.
            False while the batch runs, and for a batch that ended before the
            provider accepted it. A batch settled past its deadline before the
            provider ended it reads false, and the results route checks the
            provider live and can still serve it.
          default: false
      type: object
      required:
        - id
        - model
        - status
        - created_at
      title: BatchObject
      description: A chat batch.
    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
    BatchRequestCounts:
      properties:
        total:
          type: integer
          title: Total
          description: Requests in the batch.
          default: 0
        completed:
          type: integer
          title: Completed
          description: Requests that succeeded.
          default: 0
        failed:
          type: integer
          title: Failed
          description: Requests that failed.
          default: 0
      type: object
      title: BatchRequestCounts
      description: >-
        How many of the batch's requests have finished, as the provider last
        reported them.
  securitySchemes:
    AuthBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.