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

# batch_submit

> Queue inference and receive a batch ID.



## OpenAPI

````yaml openapi/biohub-platform-batch-openapi.json POST /api/v1/batch/submit
openapi: 3.1.0
info:
  title: Biohub Platform Batch API
  version: 1.0.0
servers:
  - url: https://biohub.ai
security:
  - HTTPBearer: []
paths:
  /api/v1/batch/submit:
    post:
      summary: Queue inference items
      description: >-
        Queue one or more inputs for the selected inference endpoint and return
        their batch ID. Read /batch/list for batch progress and /batch/status
        for an individual item's result.
      operationId: batch_submit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSubmitRequest'
      responses:
        '200':
          description: The inputs were queued; inference has not necessarily completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSubmitResponse'
        '400':
          description: Invalid envelope, endpoint, model, or item count.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchError'
        '422':
          description: No supported model rate-limit configuration is available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchError'
        '429':
          description: A rate limit or credit check refused the submission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchError'
        '500':
          description: Submission failed; some items may already have been queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchError'
components:
  schemas:
    BatchSubmitRequest:
      title: BatchSubmitRequest
      type: object
      required:
        - endpoint
        - payload
      properties:
        endpoint:
          type: string
          enum:
            - fold_max_accuracy
          description: Run maximum-accuracy folding asynchronously.
        payload:
          type: array
          minItems: 1
          maxItems: 2000
          items:
            $ref: '#/components/schemas/FoldMaxAccuracyRequest'
          description: >-
            One or more inputs. Payload length times repeat must not exceed
            2000.
        repeat:
          type: integer
          minimum: 1
          maximum: 2000
          default: 1
          description: >-
            Run each input this many times. Payload length times repeat must not
            exceed 2000.
      example:
        endpoint: fold_max_accuracy
        payload:
          - model: esmfold2-2026-05-cutoff-2025
            all_atom_input:
              sequences:
                - id: A
                  type: protein
                  sequence: MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ
            include_pae: true
    BatchSubmitResponse:
      title: BatchSubmitResponse
      type: object
      description: >-
        Every Batch API route answers with this envelope. A failure carries
        `message` instead of `data`.
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            message:
              type: string
            batch_id:
              type: string
              description: >-
                Identifies the batch. Pass it to /batch/list to read its items
                or /batch/cancel to cancel queued items.
            total_items:
              type: integer
              description: Payload length times `repeat`.
            task_id:
              type: string
              description: >-
                Present only when the batch holds exactly one item, where there
                is one task it could mean. A larger batch numbers its items
                `<batch_id>-00000`, `<batch_id>-00001` and so on, so you can
                address an item without listing first.
        request_id:
          type: string
    BatchError:
      title: BatchError
      type: object
      description: >-
        Every Batch API route answers with this envelope. A failure carries
        `message` instead of `data`.
      properties:
        status:
          type: string
          const: error
        message:
          type: string
          description: What is wrong with the request, and how to correct it.
        request_id:
          type: string
          description: Quote this when you report a problem with the call.
        results_expire_at:
          type: string
          format: date-time
          description: >-
            Present on a 410 from /batch/status: when the item's results
            expired.
    FoldMaxAccuracyRequest:
      properties:
        model:
          type: string
          enum:
            - esmfold2-2026-05-cutoff-2025
          description: >-
            The model served by fold_max_accuracy. Required in every payload
            item.
        potential_sequence_of_concern:
          default: false
          description: >-
            Disclose potential sequences of concern. For approved users, such
            sequences will not go through additional safety filtering. Reach out
            if you are interested in using this.
          title: Potential Sequence Of Concern
          type: boolean
        all_atom_input:
          $ref: '#/components/schemas/FoldAllAtomInput'
          description: (ESMFold2) All atom input (protein, RNA, DNA, and ligand) to fold.
        include_pae:
          default: false
          description: >-
            (ESMFold2) Whether to include Predicted Aligned Error (PAE) matrix
            in the response.
          title: Include Pae
          type: boolean
        include_pair_chains_iptm:
          default: false
          description: >-
            (ESMFold2) Whether to include pair-chain IPTM predictions in the
            response.
          title: Include Pair Chains Iptm
          type: boolean
        include_embeddings:
          default: false
          description: >-
            (ESMFold2) Whether to include sequence and pair embeddings in the
            response.
          title: Include Embeddings
          type: boolean
      required:
        - model
        - all_atom_input
      title: FoldMaxAccuracyRequest
      type: object
      description: >-
        One maximum-accuracy folding input. The service generates its own MSA;
        caller-supplied MSAs and folding recipe parameters are not supported.
      example:
        model: esmfold2-2026-05-cutoff-2025
        all_atom_input:
          sequences:
            - id: A
              type: protein
              sequence: MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ
        include_pae: true
    FoldAllAtomInput:
      properties:
        sequences:
          items:
            discriminator:
              mapping:
                dna: '#/components/schemas/DNAInput'
                ligand: '#/components/schemas/LigandInput'
                protein: '#/components/schemas/ProteinInput'
                rna: '#/components/schemas/RNAInput'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/ProteinInput'
              - $ref: '#/components/schemas/RNAInput'
              - $ref: '#/components/schemas/DNAInput'
              - $ref: '#/components/schemas/LigandInput'
          title: Sequences
          type: array
        covalent_bonds:
          anyOf:
            - items:
                $ref: '#/components/schemas/CovalentBond'
              type: array
            - type: 'null'
          default: null
          description: List of covalent bonds between chains in the molecular complex.
          title: Covalent Bonds
        pocket:
          anyOf:
            - $ref: '#/components/schemas/PocketConditioning'
            - type: 'null'
          default: null
          description: Pocket conditioning for binder design.
        distogram_conditioning:
          anyOf:
            - items:
                $ref: '#/components/schemas/DistogramConditioning'
              type: array
            - type: 'null'
          default: null
          description: List of distogram conditioning for chains.
          title: Distogram Conditioning
      required:
        - sequences
      title: FoldAllAtomInput
      type: object
    DNAInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Id
        sequence:
          title: Sequence
          type: string
        modifications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Modification'
              type: array
            - type: 'null'
          default: null
          title: Modifications
        type:
          const: dna
          title: Type
          type: string
      required:
        - sequence
        - type
      title: DNAInput
      type: object
    LigandInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Id
        smiles:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Smiles
        ccd:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Ccd
        type:
          const: ligand
          title: Type
          type: string
      required:
        - type
      title: LigandInput
      type: object
    ProteinInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Id
          description: >-
            Chain identifier, or a list of identifiers to request multiple
            copies. Every copy counts toward the input length and credit
            consumption.
        sequence:
          title: Sequence
          type: string
        modifications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Modification'
              type: array
            - type: 'null'
          default: null
          title: Modifications
        type:
          const: protein
          title: Type
          type: string
      required:
        - sequence
        - type
      title: ProteinInput
      type: object
    RNAInput:
      properties:
        id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Id
        sequence:
          title: Sequence
          type: string
        modifications:
          anyOf:
            - items:
                $ref: '#/components/schemas/Modification'
              type: array
            - type: 'null'
          default: null
          title: Modifications
        type:
          const: rna
          title: Type
          type: string
      required:
        - sequence
        - type
      title: RNAInput
      type: object
    CovalentBond:
      properties:
        chain_id1:
          description: First chain ID in the covalent bond.
          title: Chain Id1
          type: string
        res_idx1:
          description: Residue index in the first chain.
          title: Res Idx1
          type: integer
        atom_idx1:
          description: Atom index in the first residue.
          title: Atom Idx1
          type: integer
        chain_id2:
          description: Second chain ID in the covalent bond.
          title: Chain Id2
          type: string
        res_idx2:
          description: Residue index in the second chain.
          title: Res Idx2
          type: integer
        atom_idx2:
          description: Atom index in the second residue.
          title: Atom Idx2
          type: integer
      required:
        - chain_id1
        - res_idx1
        - atom_idx1
        - chain_id2
        - res_idx2
        - atom_idx2
      title: CovalentBond
      type: object
    PocketConditioning:
      properties:
        binder_chain_id:
          description: Chain ID of the binder.
          title: Binder Chain Id
          type: string
        contacts:
          description: List of contacts as tuples of (chain_id, residue_index).
          items:
            maxItems: 2
            minItems: 2
            prefixItems:
              - type: string
              - type: integer
            type: array
          title: Contacts
          type: array
      required:
        - binder_chain_id
        - contacts
      title: PocketConditioning
      type: object
    DistogramConditioning:
      properties:
        chain_id:
          description: Chain ID for distogram conditioning.
          title: Chain Id
          type: string
        distogram:
          description: Distogram matrix.
          items:
            items:
              type: integer
            type: array
          title: Distogram
          type: array
      required:
        - chain_id
        - distogram
      title: DistogramConditioning
      type: object
    Modification:
      properties:
        position:
          description: >-
            Zero-indexed position in the sequence where modification should be
            applied.
          title: Position
          type: integer
        ccd:
          description: Chemical Component Dictionary (CCD) code for the modification.
          title: Ccd
          type: string
      required:
        - position
        - ccd
      title: Modification
      type: object
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````