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

# Get batch results

> Download results as JSONL, one line per record, once the job has finished.



## OpenAPI

````yaml /openapi.yaml get /v1/batches/{id}/results
openapi: 3.1.0
info:
  title: Tacet API
  version: 2026-10
  description: |
    Send a state and typed questions; get calibrated probabilities back as JSON.
    Every answer is one of the options you listed, with a probability for each.
servers:
  - url: https://api.tacetai.com
security:
  - bearerAuth: []
tags:
  - name: Decide
    description: Answer questions about one state, synchronously.
  - name: Batches
    description: >-
      Answer the same questions for a large JSONL file of records,
      asynchronously.
paths:
  /v1/batches/{id}/results:
    get:
      tags:
        - Batches
      summary: Get batch results
      description: >-
        Download results as JSONL, one line per record, once the job has
        finished.
      operationId: getBatchResults
      parameters:
        - $ref: '#/components/parameters/BatchId'
      responses:
        '200':
          description: One JSON object per line.
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/BatchResult'
              example: >
                {"custom_id": "ticket-88213", "answers": {"safety": {"type":
                "noul", "probs": {"no": 0.04, "yes": 0.96}, "top": "yes",
                "confidence": 0.96}}}
        '401':
          $ref: '#/components/responses/InvalidKey'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: python
          label: Python
          source: |
            for row in client.batches.results("batch_3k9x2m"):
                if row.answers["safety"].probs["yes"] > 0.9:
                    flag_for_review(row.custom_id)
        - lang: typescript
          label: TypeScript
          source: |
            for await (const row of client.batches.results("batch_3k9x2m")) {
              if (row.answers.safety.probs.yes > 0.9) flagForReview(row.custom_id);
            }
        - lang: bash
          label: curl
          source: |
            curl https://api.tacetai.com/v1/batches/batch_3k9x2m/results \
              -H "Authorization: Bearer $TACET_API_KEY" \
              -o results.jsonl
components:
  parameters:
    BatchId:
      name: id
      in: path
      required: true
      description: The batch id returned when the job was created.
      schema:
        type: string
        example: batch_3k9x2m
  schemas:
    BatchResult:
      type: object
      required:
        - custom_id
      properties:
        custom_id:
          type: string
          description: The id you gave the record in the input file.
        answers:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Answer'
        error:
          $ref: '#/components/schemas/Error'
    Answer:
      type: object
      required:
        - type
        - probs
        - top
        - confidence
      properties:
        type:
          $ref: '#/components/schemas/QuestionType'
        probs:
          type: object
          description: A calibrated probability for every option. Values sum to 1.
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
        top:
          type: string
          description: The option with the highest probability.
        confidence:
          type: number
          description: The probability of `top`.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - invalid_question
            - invalid_key
            - state_too_long
            - rate_limited
            - not_found
            - server_error
        message:
          type: string
    QuestionType:
      type: string
      enum:
        - noul
        - choice
        - score
      description: >-
        `noul` checks a condition (no / yes), `choice` picks from named options,
        `score` assigns an ordered level.
  responses:
    InvalidKey:
      description: '`invalid_key`: check the Authorization header.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: '`not_found`: no batch with that id.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Create a key in the Tacet console. Keep it on your server; never ship it
        in a browser or app.

````

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