{
  "openapi": "3.1.0",
  "info": {
    "version": "1.0.0"
  },
  "paths": {
    "/api/v1/generate": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3) Generates an output track conditioned on inputs",
        "operationId": "generate_api_v1_generate_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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/GenerateRequest"
              }
            }
          }
        },
        "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/generate_tensor": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3) Generates an output track conditioned on inputs. Accepts and returns raw tokens.",
        "operationId": "generate_tensor_api_v1_generate_tensor_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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/GenerateTensorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateTensorResponse"
                }
              },
              "application/vnd.evolutionaryscale.pickle": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/encode": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3, ESMC) Tokenize sequence, structure, or function annotations",
        "operationId": "encode_api_v1_encode_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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/EncodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EncodeResponse"
                }
              },
              "application/vnd.evolutionaryscale.pickle": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/forward_and_sample": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3) Performs one inference step and samples output tokens",
        "operationId": "forward_and_sample_api_v1_forward_and_sample_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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/ForwardAndSampleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForwardAndSampleResponse"
                }
              },
              "application/vnd.evolutionaryscale.pickle": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/logits": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3, ESMC) Performs one inference step and returns logits, embeddings, and SAE features (ESMC only).",
        "operationId": "logits_api_v1_logits_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "return-bytes",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "default": "false",
              "title": "Return-Bytes"
            }
          },
          {
            "name": "accept",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/LogitsRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogitsResponse"
                }
              },
              "application/vnd.evolutionaryscale.pickle": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/decode": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3, ESMC) Decodes tokens sequence, structure, or function annotations",
        "operationId": "decode_api_v1_decode_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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/DecodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecodeResponse"
                }
              },
              "application/vnd.evolutionaryscale.pickle": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/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",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inverse_fold": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESM3) Inverse folds proteins. Defaults to esm3-open-2024-03 if no model is given",
        "operationId": "inverse_fold_api_v1_inverse_fold_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "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/InverseFoldRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InverseFoldResponse"
                }
              },
              "application/vnd.evolutionaryscale.pickle": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fold_all_atom": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "(ESMFold2) Folds molecular complexes containing proteins, dna, rna, and ligands. Defaults to esmfold2-fast-2026-05 if no model is given",
        "operationId": "fold_all_atom_api_v1_fold_all_atom_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FoldAllAtomRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoldResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CovalentBond": {
        "properties": {
          "chain_id1": {
            "type": "string",
            "description": "First chain ID in the covalent bond."
          },
          "res_idx1": {
            "type": "integer",
            "description": "Residue index in the first chain."
          },
          "atom_idx1": {
            "type": "integer",
            "description": "Atom index in the first residue."
          },
          "chain_id2": {
            "type": "string",
            "description": "Second chain ID in the covalent bond."
          },
          "res_idx2": {
            "type": "integer",
            "description": "Residue index in the second chain."
          },
          "atom_idx2": {
            "type": "integer",
            "description": "Atom index in the second residue."
          }
        },
        "type": "object",
        "required": [
          "chain_id1",
          "res_idx1",
          "atom_idx1",
          "chain_id2",
          "res_idx2",
          "atom_idx2"
        ]
      },
      "DNAInput": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "sequence": {
            "type": "string"
          },
          "modifications": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Modification"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "const": "dna"
          }
        },
        "type": "object",
        "required": [
          "sequence",
          "type"
        ]
      },
      "DecodeRequest": {
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "esm3-open-2024-03",
              "esmc-300m-2024-12",
              "esmc-600m-2024-12",
              "esmc-6b-2024-12"
            ],
            "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
          },
          "inputs": {
            "$ref": "#/components/schemas/Tokens"
          }
        },
        "type": "object",
        "required": [
          "model",
          "inputs"
        ]
      },
      "DecodeResponse": {
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "esm3-open-2024-03",
              "esmc-300m-2024-12",
              "esmc-600m-2024-12",
              "esmc-6b-2024-12"
            ],
            "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": {
            "$ref": "#/components/schemas/Tracks"
          }
        },
        "type": "object",
        "required": [
          "model",
          "created",
          "tokens_used",
          "outputs"
        ]
      },
      "DistogramConditioning": {
        "properties": {
          "chain_id": {
            "type": "string",
            "description": "Chain ID for distogram conditioning."
          }
        },
        "type": "object",
        "required": [
          "chain_id",
          "distogram"
        ]
      },
      "EmbeddingConfig": {
        "properties": {
          "sequence": {
            "type": "boolean",
            "description": "Whether to return the embedding mean-pooled over the sequence length.",
            "default": false
          },
          "per_residue": {
            "type": "boolean",
            "description": "Whether to return per-residue embeddings.",
            "default": false
          }
        },
        "type": "object"
      },
      "Embeddings": {
        "properties": {
          "sequence": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence embedding."
          },
          "per_residue": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per residue embedding."
          }
        },
        "type": "object"
      },
      "EncodeRequest": {
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "esm3-open-2024-03",
              "esmc-300m-2024-12",
              "esmc-600m-2024-12",
              "esmc-6b-2024-12"
            ],
            "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
          },
          "inputs": {
            "$ref": "#/components/schemas/Tracks"
          }
        },
        "type": "object",
        "required": [
          "model",
          "inputs"
        ]
      },
      "EncodeResponse": {
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "esm3-open-2024-03",
              "esmc-300m-2024-12",
              "esmc-600m-2024-12",
              "esmc-6b-2024-12"
            ],
            "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": {
            "$ref": "#/components/schemas/Tokens"
          }
        },
        "type": "object",
        "required": [
          "model",
          "created",
          "tokens_used",
          "outputs"
        ]
      },
      "FoldAllAtomInput": {
        "properties": {
          "sequences": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ProteinInput"
                },
                {
                  "$ref": "#/components/schemas/RNAInput"
                },
                {
                  "$ref": "#/components/schemas/DNAInput"
                },
                {
                  "$ref": "#/components/schemas/LigandInput"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "dna": "#/components/schemas/DNAInput",
                  "ligand": "#/components/schemas/LigandInput",
                  "protein": "#/components/schemas/ProteinInput",
                  "rna": "#/components/schemas/RNAInput"
                }
              }
            },
            "type": "array"
          },
          "covalent_bonds": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CovalentBond"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "List of covalent bonds between chains in the molecular complex."
          },
          "pocket": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PocketConditioning"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pocket conditioning for binder design."
          },
          "distogram_conditioning": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DistogramConditioning"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "List of distogram conditioning for chains."
          }
        },
        "type": "object",
        "required": [
          "sequences"
        ]
      },
      "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; '|' separates chains. The server names the chains A, B, C in the order they appear."
          },
          "msa": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MSA"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "(ESMFold2) MSA data for the query sequence."
          },
          "num_loops": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 0.0,
            "description": "(ESMFold2) Number of trunk loops for iterative refinement.",
            "default": 20
          },
          "num_sampling_steps": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "description": "(ESMFold2) Diffusion ODE solver steps. Lower for speed, higher for quality.",
            "default": 100
          },
          "lm_dropout": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "description": "(ESMFold2) Dropout probability on LM pair embeddings. When > 0, dropout is applied.",
            "default": 0.3
          },
          "lm_mask_pct": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.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.0
          },
          "msa_max_depth": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 16384.0,
                "minimum": 1.0
              },
              {
                "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.0,
            "minimum": 0.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."
          },
          "sequence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Folded protein sequence in coordinate order. Always populated by /fold; null for all-atom folding."
          },
          "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": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per position plddt predictions for a protein or molecular complex. Usually produced by structure decoder. A multi-chain sequence carries one slot per chain separator, reported as null: those positions are not residues and have no confidence. Drop them before taking a mean."
          },
          "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"
        ]
      },
      "ForwardAndSampleRequest": {
        "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
          },
          "inputs": {
            "$ref": "#/components/schemas/Tokens"
          },
          "sampling_config": {
            "$ref": "#/components/schemas/SamplingConfig"
          },
          "embedding_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbeddingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "model",
          "inputs",
          "sampling_config"
        ]
      },
      "ForwardAndSampleResponse": {
        "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."
          },
          "sequence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplingOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling output for sequence track."
          },
          "structure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplingOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling output for structure track."
          },
          "secondary_structure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplingOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling output for secondary structure track."
          },
          "sasa": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplingOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling output for sasa track."
          },
          "function": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplingOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling output for function annotation track."
          },
          "residue_annotation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplingOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling output for residue annotation track."
          },
          "embeddings": {
            "$ref": "#/components/schemas/Embeddings"
          }
        },
        "type": "object",
        "required": [
          "model",
          "created",
          "tokens_used",
          "embeddings"
        ]
      },
      "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.0,
            "minimum": 1.0,
            "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.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.0,
            "exclusiveMinimum": 0.0,
            "description": "Top-p sampling.",
            "default": 1.0
          },
          "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"
        ]
      },
      "GenerateTensorRequest": {
        "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.0,
            "minimum": 1.0,
            "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.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.0,
            "exclusiveMinimum": 0.0,
            "description": "Top-p sampling.",
            "default": 1.0
          },
          "condition_on_coordinates_only": {
            "type": "boolean",
            "description": "Use coordinates instead of structure tokens as generation conditioning.",
            "default": true
          },
          "inputs": {
            "$ref": "#/components/schemas/Tokens"
          }
        },
        "type": "object",
        "required": [
          "model",
          "track",
          "inputs"
        ]
      },
      "GenerateTensorResponse": {
        "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/Tokens"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "model",
          "created",
          "tokens_used"
        ]
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "InverseFoldRequest": {
        "properties": {
          "model": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "esm3-open-2024-03",
              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
          },
          "coordinates": {
            "items": {
              "items": {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array"
              },
              "type": "array"
            },
            "type": "array",
            "description": "Coordinates of the N, CA, C atom sequence as a Nx37x3 array.",
            "default": []
          },
          "inverse_folding_config": {
            "$ref": "#/components/schemas/InverseFoldingConfig"
          },
          "sequence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence for sequence conditioning."
          }
        },
        "type": "object",
        "required": [
          "inverse_folding_config"
        ]
      },
      "InverseFoldResponse": {
        "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."
          },
          "sequence": {
            "type": "string",
            "description": "Inverse folded sequence.",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "model",
          "created",
          "tokens_used"
        ]
      },
      "InverseFoldingConfig": {
        "properties": {
          "invalid_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "description": "Token indices that should not be sampled.",
            "default": []
          },
          "temperature": {
            "type": "number",
            "minimum": 0.0,
            "description": "Temperature for sampling. For inverse folding models, we recommend getting diverse predictions by changing the seed and not by increasing the temperature.",
            "default": 0.1
          }
        },
        "type": "object"
      },
      "LigandInput": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ccd": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "const": "ligand"
          }
        },
        "type": "object",
        "required": [
          "type"
        ]
      },
      "Logits": {
        "properties": {
          "sequence": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence track logits."
          },
          "structure": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Structure track logits."
          },
          "secondary_structure": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Secondary structure track logits."
          },
          "sasa": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "items": {
                        "type": "number"
                      },
                      "type": "array"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Solvent accessible surface area (SASA) track logits."
          },
          "function": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Function annotations logits."
          },
          "residue_annotation": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Residue annotations logits."
          }
        },
        "type": "object"
      },
      "LogitsConfig": {
        "properties": {
          "sequence": {
            "type": "boolean",
            "description": "(ESM3, ESMC) Return sequence logits.",
            "default": false
          },
          "structure": {
            "type": "boolean",
            "description": "(not supported on Forge/Biohub Platform) Return structure logits.",
            "default": false
          },
          "secondary_structure": {
            "type": "boolean",
            "description": "(not supported on Forge/Biohub Platform) Return secondary structure logits.",
            "default": false
          },
          "sasa": {
            "type": "boolean",
            "description": "(not supported on Forge/Biohub Platform) Return sasa logits.",
            "default": false
          },
          "function": {
            "type": "boolean",
            "description": "(not supported on Forge/Biohub Platform) Return function logits.",
            "default": false
          },
          "residue_annotations": {
            "type": "boolean",
            "description": "(ESM3) Return residue annotations logits.",
            "default": false
          },
          "return_embeddings": {
            "type": "boolean",
            "description": "(ESM3, ESMC) Whether embeddings should be returned.",
            "default": false
          },
          "return_mean_embedding": {
            "type": "boolean",
            "description": "(ESM3, ESMC) Whether mean embeddings should be returned.",
            "default": false
          },
          "return_hidden_states": {
            "type": "boolean",
            "description": "(ESMC, ESM3 except Large) Whether to return per-residue hidden states. With ith_hidden_layer=-1, returns all layers as a tensor of shape [n_layers + 1, B, L, D]. With ith_hidden_layer!= -1, returns the selected layer as a tensor of shape [1, B, L, D]. ESM3 requires ith_hidden_layer to be specified.",
            "default": false
          },
          "return_mean_hidden_states": {
            "type": "boolean",
            "description": "(ESMC, ESM3 except Large) Whether hidden states mean-pooled along the sequence length (L) dimension should be returned. Returns a tensor of shape [B, n_layers + 1, D].",
            "default": false
          },
          "ith_hidden_layer": {
            "type": "integer",
            "description": "(ESM3, ESMC) Valid values are 0 to max_ith_hidden_layer (inclusive), where index 0 is the embedding layer. -1 returns all layers, but is not supported for ESMC 6B or any ESM3 model, and needs a binary response (like the Python SDK) rather than plain JSON.\n| Model Name                    | max_ith_hidden_layer           |\n|-------------------------------|--------------------------------|\n| esmc-300-2024-12              | 30                             |\n| esmc-600-2024-12              | 36                             |\n| esmc-6b-2024-12               | 80                             |\n| esm3-small-2024-03            | 48                             |\n| esm3-small-2024-08            | 48                             |\n| esm3-medium-2024-03           | 96                             |\n| esm3-medium-2024-08           | 96                             |\n",
            "default": -1
          },
          "sae_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SAEConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "(ESMC) SAE config for requesting sparse autoencoder features."
          }
        },
        "type": "object"
      },
      "LogitsRequest": {
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "esm3-open-2024-03",
              "esmc-300m-2024-12",
              "esmc-600m-2024-12",
              "esmc-6b-2024-12"
            ],
            "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
          },
          "inputs": {
            "$ref": "#/components/schemas/Tokens"
          },
          "logits_config": {
            "$ref": "#/components/schemas/LogitsConfig"
          }
        },
        "type": "object",
        "required": [
          "model",
          "inputs",
          "logits_config"
        ]
      },
      "LogitsResponse": {
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "esm3-open-2024-03",
              "esmc-300m-2024-12",
              "esmc-600m-2024-12",
              "esmc-6b-2024-12"
            ],
            "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."
          },
          "logits": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/Logits"
              },
              {
                "type": "null"
              }
            ]
          },
          "embeddings": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "mean_embedding": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "hidden_states": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "mean_hidden_state": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "sae_outputs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "model",
          "created",
          "tokens_used"
        ]
      },
      "MSA": {
        "properties": {
          "sequences": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "headers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional alignment headers, including pairing keys."
          },
          "deletions": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional per-(row, match-column) a3m deletion counts, shape (depth, query match columns). Derived from the insertions when absent."
          }
        },
        "type": "object",
        "required": [
          "sequences"
        ]
      },
      "ModelName": {
        "type": "string",
        "enum": [
          "esm3-open-2024-03",
          "esmc-300m-2024-12",
          "esmc-600m-2024-12",
          "esmc-6b-2024-12",
          "esmfold2-fast-2026-05",
          "esmfold2-2026-05",
          "esmfold2-2026-05-cutoff-2025"
        ]
      },
      "Modification": {
        "properties": {
          "position": {
            "type": "integer",
            "description": "Zero-indexed position in the sequence where modification should be applied."
          },
          "ccd": {
            "type": "string",
            "description": "Chemical Component Dictionary (CCD) code for the modification."
          }
        },
        "type": "object",
        "required": [
          "position",
          "ccd"
        ]
      },
      "PerTrackSamplingConfig": {
        "properties": {
          "temperature": {
            "type": "number",
            "minimum": 0.0,
            "description": "Temperature for sampling.",
            "default": 1.0
          },
          "top_p": {
            "type": "number",
            "maximum": 1.0,
            "exclusiveMinimum": 0.0,
            "description": "Sample from logits within the top-p probability.",
            "default": 1.0
          },
          "only_sample_masked_tokens": {
            "type": "boolean",
            "description": "Only sample for masked tokens.",
            "default": true
          },
          "invalid_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "description": "Token indices that should not be sampled.",
            "default": []
          },
          "topk_logprobs": {
            "type": "integer",
            "description": "Number of top ranking prediction and logprobs to return.",
            "default": 0
          }
        },
        "type": "object"
      },
      "PocketConditioning": {
        "properties": {
          "binder_chain_id": {
            "type": "string",
            "description": "Chain ID of the binder."
          },
          "contacts": {
            "items": {
              "prefixItems": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ],
              "type": "array",
              "maxItems": 2,
              "minItems": 2
            },
            "type": "array",
            "description": "List of contacts as tuples of (chain_id, residue_index)."
          }
        },
        "type": "object",
        "required": [
          "binder_chain_id",
          "contacts"
        ]
      },
      "ProteinInput": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "sequence": {
            "type": "string"
          },
          "msa": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MSA"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "modifications": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Modification"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "const": "protein"
          }
        },
        "type": "object",
        "required": [
          "sequence",
          "type"
        ]
      },
      "RNAInput": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "sequence": {
            "type": "string"
          },
          "modifications": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Modification"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "const": "rna"
          }
        },
        "type": "object",
        "required": [
          "sequence",
          "type"
        ]
      },
      "SAEConfig": {
        "properties": {
          "models": {
            "items": {
              "type": "string",
              "enum": [
                "esmc-300m-2024-12-sae-layer23-k64-codebook65536",
                "esmc-600m-2024-12-sae-layer27-k64-codebook16384",
                "esmc-600m-2024-12-sae-layer27-k64-codebook65536",
                "esmc-6b-2024-12-sae-layer60-k64-codebook16384",
                "esmc-6b-2024-12-sae-layer60-k64-codebook65536"
              ]
            },
            "type": "array",
            "description": "List of SAE models with specific layer and codebook size."
          },
          "normalize_features": {
            "type": "boolean",
            "description": "Normalize computed features before return. Default to True.",
            "default": true
          }
        },
        "type": "object"
      },
      "SamplingConfig": {
        "properties": {
          "sequence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PerTrackSamplingConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling configuration for the sequence track."
          },
          "structure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PerTrackSamplingConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling configuration for the structure track."
          },
          "secondary_structure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PerTrackSamplingConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling configuration for the secondary structure track."
          },
          "sasa": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PerTrackSamplingConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling configuration for the SASA track."
          },
          "function": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PerTrackSamplingConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampling configuration for the function annotation track."
          }
        },
        "type": "object"
      },
      "SamplingOutput": {
        "properties": {
          "tokens": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "items": {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sampled tokens."
          },
          "logprobs": {
            "anyOf": [
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Log probabilities that were sampled from."
          },
          "entropy": {
            "anyOf": [
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Entropies of different tokens."
          },
          "topk_logprobs": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "items": {
                  "items": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Log probabilities of topk tokens if option is turned on"
          },
          "topk_tokens": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Topk most likely tokens if option is turned on"
          }
        },
        "type": "object",
        "required": [
          "tokens"
        ]
      },
      "Tokens": {
        "properties": {
          "sequence": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence as a list of tokens as integers."
          },
          "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."
          },
          "structure": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Structure output from the model as a list of integer tokens."
          },
          "secondary_structure": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Secondary structure in 8-class DSSP format."
          },
          "sasa": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Solvent accessible surface area (SASA) as a list of integers."
          },
          "function": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Function annotations, as a list of integers."
          },
          "residue_annotation": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Residue annotations tokens, as a list of integers."
          }
        },
        "type": "object"
      },
      "Tracks": {
        "properties": {
          "sequence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence of amino acids. As input, this can be partially masked out with `_` or the literal `<mask>`, for example to get logprob over masked positions"
          },
          "secondary_structure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Secondary structure in 8-class DSSP format. Masked positions may be given as `_` or as the literal `<pad>`."
          },
          "sasa": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "<pad>",
                        "<motif>",
                        "<unk>",
                        "<0-0.8>",
                        "<0.8-4.0>",
                        "<4.0-9.6>",
                        "<9.6-16.4>",
                        "<16.4-24.5>",
                        "<24.5-32.9>",
                        "<32.9-42.0>",
                        "<42.0-51.5>",
                        "<51.5-61.2>",
                        "<61.2-70.9>",
                        "<70.9-81.6>",
                        "<81.6-93.3>",
                        "<93.3-107.2>",
                        "<107.2-125.4>",
                        "<125.4-151.4>",
                        "<151.4-inf>"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Solvent accessible surface area (SASA) as a list of floats. A position may also be a SASA vocab token: <pad>, <motif>, <unk>, <0-0.8>, <0.8-4.0>, <4.0-9.6>, <9.6-16.4>, <16.4-24.5>, <24.5-32.9>, <32.9-42.0>, <42.0-51.5>, <51.5-61.2>, <61.2-70.9>, <70.9-81.6>, <81.6-93.3>, <93.3-107.2>, <107.2-125.4>, <125.4-151.4>, <151.4-inf>. 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"
        ]
      },
      "FoldAllAtomRequest": {
        "properties": {
          "model": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "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; '|' separates chains. The server names the chains A, B, C in the order they appear."
          },
          "msa": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MSA"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "MSA data for the query sequence."
          },
          "num_loops": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 0.0,
            "description": "Number of trunk loops for iterative refinement.",
            "default": 20
          },
          "num_sampling_steps": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "description": "Diffusion ODE solver steps. Lower for speed, higher for quality.",
            "default": 100
          },
          "lm_dropout": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "description": "Dropout probability on LM pair embeddings. When > 0, dropout is applied.",
            "default": 0.3
          },
          "lm_mask_pct": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "description": "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.0
          },
          "msa_max_depth": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 16384.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "description": "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.0,
            "minimum": 0.0,
            "description": "Fraction of MSA columns randomly masked in non-query rows for inference-time diversity.",
            "default": 0.1
          },
          "include_distogram": {
            "type": "boolean",
            "description": "Whether to include distogram predictions in the response.",
            "default": false
          },
          "include_pae": {
            "type": "boolean",
            "description": "Whether to include Predicted Aligned Error (PAE) matrix in the response.",
            "default": false
          },
          "include_pair_chains_iptm": {
            "type": "boolean",
            "description": "Whether to include pair-chain IPTM predictions in the response.",
            "default": false
          },
          "all_atom_input": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FoldAllAtomInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "All atom input (protein, RNA, DNA, and ligand) to fold. If provided, performs all-atom folding and ignores the sequence and msa inputs."
          },
          "include_embeddings": {
            "type": "boolean",
            "description": "Whether to include sequence and pair embeddings in the response.",
            "default": false
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
