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

# Get batch request result

> Retrieve the result of a specific request within a batch by its custom_id.



## OpenAPI

````yaml /openapi.json get /batches/{batch_id}/{custom_id}
openapi: 3.1.0
info:
  title: Sail API
  version: '2026-02-18'
  description: >-
    Sail provides OpenAI-compatible Responses and Chat Completions endpoints,
    plus an Anthropic-compatible Messages endpoint. This reference documents the
    currently supported subset of fields.
servers:
  - url: https://api.sailresearch.com/v1
security:
  - BearerAuth: []
tags:
  - name: Models API
    description: Model discovery endpoints.
  - name: Responses API
    description: OpenAI-compatible Responses API endpoints.
  - name: Chat Completions API
    description: OpenAI-compatible Chat Completions API endpoints.
  - name: Messages API
    description: Anthropic-compatible Messages API endpoints.
  - name: Batches API
    description: Submit and manage batches of requests.
paths:
  /batches/{batch_id}/{custom_id}:
    get:
      tags:
        - Batches API
      summary: Get batch request result
      description: >-
        Retrieve the result of a specific request within a batch by its
        custom_id.
      operationId: getBatchRequestResult
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the batch.
        - name: custom_id
          in: path
          required: true
          schema:
            type: string
          description: The custom_id of the request within the batch.
      responses:
        '200':
          description: The response object for the given request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Batch or request not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ResponseObject:
      type: object
      required:
        - id
        - object
        - created_at
        - status
        - model
        - metadata
        - usage
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - response
        created_at:
          type: integer
        status:
          type: string
          enum:
            - pending
            - running
            - failed
            - completed
            - cancelled
        model:
          type: string
        input:
          $ref: '#/components/schemas/ResponseInput'
        output:
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
            - type: object
              additionalProperties: true
            - type: 'null'
        error:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        incomplete_details:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
        max_output_tokens:
          oneOf:
            - type: integer
            - type: 'null'
        reasoning:
          type: object
          additionalProperties: true
        text:
          $ref: '#/components/schemas/ResponseTextConfiguration'
        store:
          type: boolean
        temperature:
          type: number
        top_p:
          type: number
        parallel_tool_calls:
          type: boolean
        tool_choice:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        tools:
          type: array
          items:
            type: object
            additionalProperties: true
        truncation:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        usage:
          $ref: '#/components/schemas/ResponseUsage'
        user:
          oneOf:
            - type: string
            - type: 'null'
        metadata:
          type: object
          additionalProperties: true
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
      additionalProperties: false
    ResponseInput:
      description: >-
        Text input, plus image input (input_image) on multimodal models. Audio,
        files, and item references are not currently supported.
      oneOf:
        - type: string
          minLength: 1
        - type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ResponseInputMessage'
        - $ref: '#/components/schemas/ResponseInputObject'
    ResponseTextConfiguration:
      type: object
      required:
        - format
      properties:
        format:
          oneOf:
            - $ref: '#/components/schemas/ResponseTextFormat'
            - $ref: '#/components/schemas/ResponseJsonSchemaFormat'
      additionalProperties: false
    ResponseUsage:
      type: object
      required:
        - input_tokens
        - input_tokens_details
        - output_tokens
        - output_tokens_details
        - total_tokens
      properties:
        input_tokens:
          type: integer
        input_tokens_details:
          $ref: '#/components/schemas/ResponseUsageDetails'
        output_tokens:
          type: integer
        output_tokens_details:
          $ref: '#/components/schemas/ResponseUsageDetails'
        total_tokens:
          type: integer
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
      additionalProperties: false
    ErrorObject:
      type: object
      required:
        - message
        - type
      properties:
        message:
          type: string
        type:
          type: string
        param:
          oneOf:
            - type: string
            - type: 'null'
        code:
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
      additionalProperties: true
    ResponseInputMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
            - user
            - assistant
            - tool
            - function
        content:
          oneOf:
            - type: string
            - type: array
              minItems: 1
              items:
                oneOf:
                  - $ref: '#/components/schemas/ResponseInputTextPart'
                  - $ref: '#/components/schemas/ResponseInputImagePart'
        name:
          type: string
        tool_calls:
          type: array
          items:
            type: object
            additionalProperties: true
        tool_call_id:
          type: string
        function_call:
          type: object
          additionalProperties: true
      additionalProperties: false
    ResponseInputObject:
      type: object
      required:
        - messages
      properties:
        messages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ResponseInputMessage'
      additionalProperties: false
    ResponseTextFormat:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
      additionalProperties: false
    ResponseJsonSchemaFormat:
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
          enum:
            - json_schema
        name:
          type: string
        description:
          type: string
        schema:
          type: object
          additionalProperties: true
        strict:
          type: boolean
      additionalProperties: false
    ResponseUsageDetails:
      type: object
      required:
        - cached_tokens
        - reasoning_tokens
      properties:
        cached_tokens:
          type: integer
        reasoning_tokens:
          type: integer
      additionalProperties: false
    ResponseInputTextPart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - input_text
        text:
          type: string
      additionalProperties: false
    ResponseInputImagePart:
      type: object
      description: >-
        Image content part. Image input is supported only on multimodal models;
        see the Models page.
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - input_image
        image_url:
          type: string
          description: >-
            Public http(s) URL or a base64 data URI
            (data:<media-type>;base64,<data>).
        detail:
          type: string
          enum:
            - auto
            - low
            - high
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````