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

# generate

> (ESM3) Generates an output track conditioned on inputs



## OpenAPI

````yaml openapi/biohub-platform-openapi.json POST /api/v1/generate
openapi: 3.1.0
info:
  title: Biohub Platform API
  version: 1.0.0
servers:
  - url: https://biohub.ai
security: []
paths:
  /api/v1/generate:
    post:
      tags:
        - v1
      summary: (ESM3) Generates an output track conditioned on inputs
      operationId: generate_api_v1_generate_post
      parameters:
        - name: accept
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Accept
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateResponse'
            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:
    GenerateRequest:
      properties:
        model:
          type: string
          enum:
            - esm3-open-2024-03
          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
        track:
          type: string
          description: >-
            Track to generate: sequence, structure, secondary_structure, sasa,
            or function.
        invalid_ids:
          items:
            type: integer
          type: array
          description: Token indices that should not be sampled.
          default: []
        schedule:
          type: string
          enum:
            - cosine
            - linear
          description: >-
            Unmasking schedule for generation. Controls the number of tokens to
            unmask during each round of iterative generation.
          default: cosine
        strategy:
          type: string
          enum:
            - random
            - entropy
          description: >-
            Unmasking strategy to use. Controls which tokens to unmask during
            each round of iterative generation. 'random' will unmask a correct
            number of tokens randomly. 'entropy' will unmask the tokens with the
            lowest logit entropy first. Default was random. Updated on
            02/14/2025.
          default: random
        num_steps:
          type: integer
          maximum: 100
          minimum: 1
          description: >-
            Number of steps for generation. There is diminishing return for
            decoding steps more than 20. Note that this needs to be less than or
            equal to the sequence length. Default was 8. Updated on 02/14/2025.
          default: 20
        temperature:
          type: number
          minimum: 0
          description: Temperature for sampling. Default was 1.0. Updated on 02/14/2025.
          default: 0.5
        temperature_annealing:
          type: boolean
          description: >-
            Whether temperature should be annealed during generation. Default
            was False. Updated on 02/14/2025.
          default: true
        top_p:
          type: number
          maximum: 1
          exclusiveMinimum: 0
          description: Top-p sampling.
          default: 1
        condition_on_coordinates_only:
          type: boolean
          description: >-
            Use coordinates instead of structure tokens as generation
            conditioning.
          default: true
        inputs:
          $ref: '#/components/schemas/Tracks'
        only_compute_backbone_rmsd:
          type: boolean
          description: >-
            Only compute the RMSD of the backbone atoms. Affects the returned
            crmsd.
          default: false
        include_pae:
          type: boolean
          description: >-
            Whether to include Predicted Aligned Error (PAE) matrix in the
            response. Local inference ignores this flag.
          default: false
      type: object
      required:
        - model
        - track
        - inputs
    GenerateResponse:
      properties:
        model:
          type: string
          enum:
            - esm3-open-2024-03
          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.
        outputs:
          anyOf:
            - $ref: '#/components/schemas/Tracks'
            - type: 'null'
      type: object
      required:
        - model
        - created
        - tokens_used
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    Tracks:
      properties:
        sequence:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Sequence of amino acids. As input, this can be partially masked out
            with `_`, for example to get logprob over masked positions
        secondary_structure:
          anyOf:
            - type: string
            - type: 'null'
          description: Secondary structure in 8-class DSSP format.
        sasa:
          anyOf:
            - items:
                anyOf:
                  - type: integer
                  - type: number
                  - type: 'null'
              type: array
            - type: 'null'
          description: >-
            Solvent accessible surface area (SASA) as a list of floats. Nones
            are replaced with padding. 03/18/2025: A bug was fixed where 'inf'
            prior to this date was returned encoded as '-1', it will instead be
            1000 going forward
        function:
          anyOf:
            - items:
                prefixItems:
                  - type: string
                  - type: integer
                  - type: integer
                type: array
                maxItems: 3
                minItems: 3
              type: array
            - type: 'null'
          description: >-
            Function annotations, as a list of 3-tuples: (interpro tag, start,
            end). Start and end are 1-indexed, inclusive. We support interpro
            tags from version 95.0.
        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.
        plddt:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          description: >-
            Per position plddt predictions for a protein. Usually produced by
            structure decoder.
        ptm:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Predicted TM score of a protein. Usually produced by structure
            decoder.
        crmsd:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Constrained RMSD between the generated protein coordinates and the
            input protein coordinates. Produced by the generate endpoint.
        globularity:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Globularity of the generated protein. Produced by the generate
            endpoint.
        interface:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Annotations on residues that participate in a multimer interface.
        interface_ptm:
          anyOf:
            - type: number
            - type: 'null'
          description: Interface TM score of a protein.
        pae:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          description: >-
            Predicted Aligned Error matrix for the protein. Shape is L x L.
            Values are rounded to 2 decimals (well within 0.5 A bin width)
      type: object
    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

````