EvolutionaryScale Forge Folding API

Hosted folding and inverse-folding inference endpoints. `fold` predicts protein backbone coordinates plus pLDDT/PTM confidence from an input sequence; `inverse_fold` designs candidate sequences consistent with an input structure. Includes an `msa` endpoint for fetching multiple sequence alignments used to condition predictions.

OpenAPI Specification

evolutionaryscale-forge-folding-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: EvolutionaryScale Forge Folding API
  description: >
    Hosted folding and inverse-folding inference for protein structure tasks.
    `fold` predicts protein backbone coordinates plus pLDDT and PTM confidence
    from an amino acid sequence; `inverse_fold` designs candidate sequences
    consistent with a target structure. An `msa` endpoint fetches multiple
    sequence alignments that condition fold predictions for improved accuracy.
  version: 2024-08-01
  contact:
    name: EvolutionaryScale Forge
    url: https://forge.evolutionaryscale.ai
  license:
    name: Cambrian Inference Clickthrough License Agreement
    url: https://www.evolutionaryscale.ai/policies/cambrian-inference-clickthrough-license-agreement
servers:
  - url: https://forge.evolutionaryscale.ai
    description: EvolutionaryScale Forge Production
security:
  - BearerAuth: []
tags:
  - name: Structure
    description: Predict protein backbone coordinates from sequence and back.
  - name: MSA
    description: Fetch multiple sequence alignments used by structure predictors.
paths:
  /api/v1/fold:
    post:
      summary: Fold Sequence To Structure
      description: >
        Predict atom37 backbone coordinates, per-residue pLDDT confidence, and
        predicted TM-score (PTM) for an input amino acid sequence. Returns a
        full `ESMProtein` with `coordinates`, `plddt`, and `ptm` populated.
      operationId: fold
      tags:
        - Structure
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FoldRequest'
            examples:
              SimpleFold:
                $ref: '#/components/examples/SimpleFoldExample'
      responses:
        '200':
          description: Predicted structure with confidence scores.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FoldResponse'
        '4XX':
          $ref: '#/components/responses/ErrorResponse'
  /api/v1/inverse_fold:
    post:
      summary: Inverse Fold Structure To Sequence
      description: >
        Generate one or more candidate amino acid sequences that fold to the
        provided structure. Accepts atom37 coordinates plus optional
        per-residue temperature controls.
      operationId: inverseFold
      tags:
        - Structure
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InverseFoldRequest'
      responses:
        '200':
          description: Candidate sequences.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InverseFoldResponse'
        '4XX':
          $ref: '#/components/responses/ErrorResponse'
  /api/v1/msa:
    post:
      summary: Fetch Multiple Sequence Alignment
      description: >
        Fetch a multiple sequence alignment (MSA) for the input sequence. The
        MSA can be passed into subsequent fold calls to improve accuracy.
      operationId: msa
      tags:
        - MSA
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MSARequest'
      responses:
        '200':
          description: MSA returned in A3M format and as a parsed list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MSAResponse'
        '4XX':
          $ref: '#/components/responses/ErrorResponse'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Forge API token issued via forge.evolutionaryscale.ai.
  schemas:
    Coordinates:
      type: array
      description: Per-residue atom37 coordinates, shape [L, 37, 3].
      items:
        type: array
        items:
          type: array
          items:
            type: number
    FoldRequest:
      type: object
      required:
        - sequence
        - model
      properties:
        model:
          type: string
          example: esm3-medium-2024-08
        sequence:
          type: string
          description: Amino acid sequence using one-letter codes.
          example: "MKTAYIAKQRQISFVKAHFSRQLEERLGLIEVQ"
        msa:
          type: array
          description: Optional MSA in A3M format to condition the fold.
          items:
            type: string
        num_recycles:
          type: integer
          default: 3
          minimum: 0
    FoldResponse:
      type: object
      properties:
        sequence:
          type: string
        coordinates:
          $ref: '#/components/schemas/Coordinates'
        plddt:
          type: array
          items:
            type: number
        ptm:
          type: number
    InverseFoldRequest:
      type: object
      required:
        - coordinates
        - model
      properties:
        model:
          type: string
          example: esm3-medium-2024-08
        coordinates:
          $ref: '#/components/schemas/Coordinates'
        temperature:
          type: number
          default: 1.0
          minimum: 0.0
        num_samples:
          type: integer
          default: 1
          minimum: 1
    InverseFoldResponse:
      type: object
      properties:
        sequences:
          type: array
          items:
            type: string
    MSARequest:
      type: object
      required:
        - sequence
      properties:
        sequence:
          type: string
          example: "MKTAYIAKQRQISFVKAHFSRQLEERLGLIEVQ"
        max_depth:
          type: integer
          default: 256
    MSAResponse:
      type: object
      properties:
        a3m:
          type: string
          description: MSA in A3M format.
        sequences:
          type: array
          items:
            type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
            code:
              type: string
  responses:
    ErrorResponse:
      description: Error returned by the Forge API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  examples:
    SimpleFoldExample:
      summary: Fold a short sequence
      value:
        model: esm3-medium-2024-08
        sequence: "MKTAYIAKQRQISFVKAHFSRQLEERLGLIEVQ"
        num_recycles: 3