---
title: "Forward pass"
method: POST
path: "/api/v1/forward"
---

# Forward pass

`POST /api/v1/forward`

Performs a forward pass through the model

## Request body

- object
  - `model_id` string, uuid, required
  - `forward_input` ForwardBackwardInput, required
    - `data` Datum[], required — Array of input data for the forward/backward pass
      - `model_input` ModelInput, required
        - `chunks` ModelInputChunk[], required — Sequence of input chunks (formerly TokenSequence)
          - union
            - EncodedTextChunk
              - …
            - ImageAssetPointerChunk
              - …
      - `loss_fn_inputs` LossFnInputs, required — Dictionary mapping field names to tensor data
    - `loss_fn` 'cross_entropy' | 'importance_sampling', required — Fully qualified function path for the loss function

## Response `200`

API future for forward completion

- UntypedAPIFuture
  - `request_id` string, uuid, required
  - `model_id` string, uuid

---

[API](https://skmtc.dev/thinking-machines-lab/apis/tinker-api.md) · [All operations](https://skmtc.dev/thinking-machines-lab/apis/tinker-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thinking-machines-lab/tinker-api/revisions/51afac49fce6/schema)
