---
title: "(ESM3, ESMC) Performs one inference step and returns logits, embeddings, and SAE features (ESMC only)."
method: POST
path: "/api/v1/logits"
tags: ["v1"]
---

# (ESM3, ESMC) Performs one inference step and returns logits, embeddings, and SAE features (ESMC only).

`POST /api/v1/logits`

## Headers

- `return-bytes` string
- `accept` string, nullable

## Request body

- LogitsRequest
  - `model` 'esm3-open-2024-03' | 'esmc-300m-2024-12' | 'esmc-600m-2024-12' | 'esmc-6b-2024-12', required — 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` boolean — 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.
  - `inputs` Tokens, required
    - `sequence` integer[], nullable — Sequence as a list of tokens as integers.
    - `coordinates` array[], nullable — Coordinates of the N, CA, C atom sequence as a Nx37x3 array.
      - array[]
        - number[]
    - `structure` integer[], nullable — Structure output from the model as a list of integer tokens.
    - `secondary_structure` integer[], nullable — Secondary structure in 8-class DSSP format.
    - `sasa` integer[], nullable — Solvent accessible surface area (SASA) as a list of integers.
    - `function` array[], nullable — Function annotations, as a list of integers.
      - integer[]
    - `residue_annotation` array[], nullable — Residue annotations tokens, as a list of integers.
      - integer[]
  - `logits_config` LogitsConfig, required
    - `sequence` boolean — (ESM3, ESMC) Return sequence logits.
    - `structure` boolean — (not supported on Forge/Biohub Platform) Return structure logits.
    - `secondary_structure` boolean — (not supported on Forge/Biohub Platform) Return secondary structure logits.
    - `sasa` boolean — (not supported on Forge/Biohub Platform) Return sasa logits.
    - `function` boolean — (not supported on Forge/Biohub Platform) Return function logits.
    - `residue_annotations` boolean — (ESM3) Return residue annotations logits.
    - `return_embeddings` boolean — (ESM3, ESMC) Whether embeddings should be returned.
    - `return_mean_embedding` boolean — (ESM3, ESMC) Whether mean embeddings should be returned.
    - `return_hidden_states` boolean — (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.
    - `return_mean_hidden_states` boolean — (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].
    - `ith_hidden_layer` integer — (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. | Model Name | max_ith_hidden_layer | |-------------------------------|--------------------------------| | esmc-300-2024-12 | 30 | | esmc-600-2024-12 | 36 | | esmc-6b-2024-12 | 80 | | esm3-small-2024-03 | 48 | | esm3-small-2024-08 | 48 | | esm3-medium-2024-03 | 96 | | esm3-medium-2024-08 | 96 |
    - `sae_config` SAEConfig
      - `models` string[] — List of SAE models with specific layer and codebook size.
      - `normalize_features` boolean — Normalize computed features before return. Default to True.

## Response `200`

Successful Response

- LogitsResponse
  - `model` 'esm3-open-2024-03' | 'esmc-300m-2024-12' | 'esmc-600m-2024-12' | 'esmc-6b-2024-12', required — You may have access to additional, private models as well. These will be visible on the Rate Limits page under the Developer Console
  - `created` string, required — ISO formatted date time
  - `potential_sequence_of_concern` boolean — Indicate that the returned sequence may be of potential concerns.
  - `warning_messages` string[], nullable — Warning messages returned by FastAPI.
  - `logits` union
    - string
    - Logits
      - `sequence` array[], nullable — Sequence track logits.
        - number[]
      - `structure` array[], nullable — Structure track logits.
        - number[]
      - `secondary_structure` array[], nullable — Secondary structure track logits.
        - number[]
      - `sasa` array[], nullable — Solvent accessible surface area (SASA) track logits.
        - number[], nullable
      - `function` array[], nullable — Function annotations logits.
        - array[]
          - number[]
      - `residue_annotation` array[], nullable — Residue annotations logits.
        - number[]
  - `embeddings` union
    - string
    - unknown[]
      - unknown
  - `mean_embedding` unknown[], nullable
    - unknown
  - `hidden_states` union
    - string
    - unknown[]
      - unknown
  - `mean_hidden_state` unknown[], nullable
    - unknown
  - `sae_outputs` union
    - string
    - object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/evolutionaryscale/apis/untitled-api.md) · [All operations](https://skmtc.net/evolutionaryscale/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/evolutionaryscale/untitled-api/revisions/f1cfb00607df/schema)
