> ## 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.

# fold

> (ESM3, ESMFold2) Folds proteins. Defaults to esmfold2-fast-2026-05 if no model is given



## OpenAPI

````yaml openapi/biohub-platform-openapi.json POST /api/v1/fold
openapi: 3.1.0
info:
  title: Biohub Platform API
  version: 1.0.0
servers:
  - url: https://biohub.ai
security: []
paths:
  /api/v1/fold:
    post:
      tags:
        - v1
      summary: >-
        (ESM3, ESMFold2) Folds proteins. Defaults to esmfold2-fast-2026-05 if no
        model is given
      operationId: fold_api_v1_fold_post
      parameters:
        - name: accept
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Accept
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FoldRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FoldResponse'
            application/vnd.evolutionaryscale.pickle:
              schema:
                type: string
                format: binary
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    FoldRequest:
      properties:
        model:
          type:
            - string
            - 'null'
          enum:
            - esm3-open-2024-03
            - esmfold2-fast-2026-05
            - esmfold2-2026-05
            - null
          description: >-
            You may have access to additional, private models as well. These
            will be visible on the Rate Limits page under the Developer Console
        potential_sequence_of_concern:
          type: boolean
          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.
          default: false
        sequence:
          anyOf:
            - type: string
            - type: 'null'
          description: Input sequence to be folded.
        msa:
          anyOf:
            - $ref: '#/components/schemas/MSA'
            - type: 'null'
          description: (ESMFold2) MSA data for the query sequence.
        num_loops:
          type: integer
          maximum: 20
          minimum: 0
          description: (ESMFold2) Number of trunk loops for iterative refinement.
          default: 20
        num_sampling_steps:
          type: integer
          maximum: 100
          minimum: 1
          description: >-
            (ESMFold2) Diffusion ODE solver steps. Lower for speed, higher for
            quality.
          default: 100
        lm_dropout:
          type: number
          maximum: 1
          minimum: 0
          description: >-
            (ESMFold2) Dropout probability on LM pair embeddings. When > 0,
            dropout is applied.
          default: 0.3
        lm_mask_pct:
          type: number
          maximum: 1
          minimum: 0
          description: >-
            (ESMFold2) Fraction of sequence residues randomly masked before the
            PLM backbone. If not provided, defaults to 0.1 for ESMFOLD2_FAST and
            0.0 for ESMFOLD2
          default: 0
        msa_max_depth:
          anyOf:
            - type: integer
              maximum: 16384
              minimum: 1
            - type: 'null'
          description: >-
            (ESMFold2) Number of MSA rows randomly subsampled each loop. Set to
            null to disable (sets msa_subsample_at_inference to False).
          default: 1024
        msa_column_mask_rate:
          type: number
          maximum: 1
          minimum: 0
          description: >-
            (ESMFold2) Fraction of MSA columns randomly masked in non-query rows
            for inference-time diversity.
          default: 0.1
        include_distogram:
          type: boolean
          description: (ESMFold2) Whether to include distogram predictions in the response.
          default: false
        include_pae:
          type: boolean
          description: >-
            (ESMFold2) Whether to include Predicted Aligned Error (PAE) matrix
            in the response.
          default: false
        include_pair_chains_iptm:
          type: boolean
          description: >-
            (ESMFold2) Whether to include pair-chain IPTM predictions in the
            response.
          default: false
        include_embeddings:
          type: boolean
          description: >-
            (ESMFold2) Whether to include sequence and pair embeddings in the
            response.
          default: false
      type: object
    FoldResponse:
      properties:
        model:
          type: string
          enum:
            - esm3-open-2024-03
            - esmfold2-fast-2026-05
            - esmfold2-2026-05
          description: >-
            You may have access to additional, private models as well. These
            will be visible on the Rate Limits page under the Developer Console
        created:
          type: string
          description: ISO formatted date time
        potential_sequence_of_concern:
          type: boolean
          description: Indicate that the returned sequence may be of potential concerns.
          default: false
        warning_messages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Warning messages returned by FastAPI.
        coordinates:
          anyOf:
            - items:
                items:
                  items:
                    anyOf:
                      - type: number
                      - type: 'null'
                  type: array
                type: array
              type: array
            - type: 'null'
          description: Coordinates of the N, CA, C atom sequence as a Nx37x3 array.
        complex:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Molecular complex with support for proteins, nucleic acids, and
            ligands.
        plddt:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          description: >-
            Per position plddt predictions for a protein or molecular complex.
            Usually produced by structure decoder.
        ptm:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Predicted TM score of a protein or molecular complex. Usually
            produced by structure decoder.
        interface_ptm:
          anyOf:
            - type: number
            - type: 'null'
          description: Interface TM score of a protein or molecular complex.
        pae:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Predicted Aligned Error matrix for the protein or molecular complex.
            Shape is L x L. Values are rounded to 2 decimals (well within 0.5 A
            bin width)
        pair_chains_iptm:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Pair-chain IPTM predictions for a protein. Shape is C x C, where C
            is the number of chains in the protein.
        output_embedding_sequence:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: Output embedding sequence from the model. Only present if requested.
        output_embedding_pair_pooled:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Output embedding pair mean-pooled from the model. Only present if
            requested.
        residue_index:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            Residue indexes from the model. Only present if embeddings are
            requested.
        entity_id:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            Entity ids (e.g. chain ids) from the model. Only present if
            embeddings are requested.
      type: object
      required:
        - model
        - created
        - tokens_used
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    MSA:
      properties:
        sequences:
          items:
            type: string
          type: array
        deletions:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Optional per-(row, match-column) a3m deletion counts, shape (depth,
            query_length).
      type: object
      required:
        - sequences
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````