Parasail Batch API

OpenAI-compatible Batch API for asynchronous inference workloads at 50% off serverless pricing (with an additional 30% off cached tokens). Supports /v1/chat/completions and /v1/embeddings in the OpenAI Batch file format (JSONL) with a 24-hour completion window. Includes a Files surface for uploading and downloading input/output/error JSONL files. Ideal for offline enrichment, dataset processing, and large-scale tokenmaxxing.

Parasail Batch API is one of 3 APIs that Parasail publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 2 machine-runnable capabilities that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko and 1 JSON Schema definition.

Tagged areas include AI, Artificial Intelligence, Batch, and Files. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, 2 Naftiko capability specs, and 1 JSON Schema.

OpenAPI Specification

parasail-batch-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Parasail Batch API
  description: |
    OpenAI-compatible Batch API for offline, asynchronous inference workloads at 50% off
    serverless pricing (with cached tokens at an additional 30% off). Supports
    /v1/chat/completions and /v1/embeddings in the OpenAI Batch file format (JSONL).
  version: '1.0'
  contact:
    name: Parasail
    url: https://docs.parasail.io/parasail-docs/
servers:
  - url: https://api.parasail.io/v1
    description: Parasail Batch endpoint
security:
  - bearerAuth: []
tags:
  - name: Batch
    description: Create, list, retrieve, and cancel batch inference jobs.
  - name: Files
    description: Upload and manage input/output JSONL files used by Batch jobs.
paths:
  /batches:
    post:
      tags: [Batch]
      operationId: createBatch
      summary: Create Batch
      description: Submit a new batch inference job that processes a previously-uploaded JSONL file.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCreateRequest'
      responses:
        '200':
          description: The created batch job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Batch'
    get:
      tags: [Batch]
      operationId: listBatches
      summary: List Batches
      description: List your batch inference jobs.
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: after
          schema:
            type: string
      responses:
        '200':
          description: A list of batch jobs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchList'
  /batches/{batch_id}:
    get:
      tags: [Batch]
      operationId: getBatch
      summary: Retrieve Batch
      description: Retrieve the status and output file references for a batch job.
      parameters:
        - in: path
          name: batch_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The batch job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Batch'
  /batches/{batch_id}/cancel:
    post:
      tags: [Batch]
      operationId: cancelBatch
      summary: Cancel Batch
      description: Cancel an in-flight batch job.
      parameters:
        - in: path
          name: batch_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The cancelled batch job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Batch'
  /files:
    post:
      tags: [Files]
      operationId: uploadFile
      summary: Upload File
      description: Upload a JSONL file to use as input or to download as output from a batch job.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required: [file, purpose]
              properties:
                file:
                  type: string
                  format: binary
                purpose:
                  type: string
                  enum: [batch]
      responses:
        '200':
          description: The uploaded file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
    get:
      tags: [Files]
      operationId: listFiles
      summary: List Files
      description: List files uploaded to the Batch API.
      responses:
        '200':
          description: A list of files.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileList'
  /files/{file_id}:
    get:
      tags: [Files]
      operationId: getFile
      summary: Retrieve File
      description: Retrieve metadata for an uploaded file.
      parameters:
        - in: path
          name: file_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
    delete:
      tags: [Files]
      operationId: deleteFile
      summary: Delete File
      description: Delete an uploaded file.
      parameters:
        - in: path
          name: file_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The deletion result.
  /files/{file_id}/content:
    get:
      tags: [Files]
      operationId: getFileContent
      summary: Download File Content
      description: Download the raw bytes for a previously-uploaded file (including batch output files).
      parameters:
        - in: path
          name: file_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The file contents.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Send your Parasail API key as a Bearer token.
  schemas:
    BatchCreateRequest:
      type: object
      required: [input_file_id, endpoint, completion_window]
      properties:
        input_file_id:
          type: string
          description: ID of an uploaded JSONL file containing the batch requests.
        endpoint:
          type: string
          enum: ['/v1/chat/completions', '/v1/embeddings']
        completion_window:
          type: string
          enum: ['24h']
        metadata:
          type: object
          additionalProperties:
            type: string
    Batch:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: batch
        endpoint:
          type: string
        input_file_id:
          type: string
        output_file_id:
          type: string
        error_file_id:
          type: string
        status:
          type: string
          enum: [validating, in_progress, finalizing, completed, expired, cancelling, cancelled, failed]
        request_counts:
          type: object
          properties:
            total:
              type: integer
            completed:
              type: integer
            failed:
              type: integer
        created_at:
          type: integer
        completed_at:
          type: integer
        cancelled_at:
          type: integer
        metadata:
          type: object
    BatchList:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Batch'
        has_more:
          type: boolean
    File:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: file
        bytes:
          type: integer
        created_at:
          type: integer
        filename:
          type: string
        purpose:
          type: string
    FileList:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/File'