---
title: "Retrieve future result"
method: POST
path: "/api/v1/retrieve_future"
---

# Retrieve future result

`POST /api/v1/retrieve_future`

Retrieves the result of a future by its ID

## Request body

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

## Response `200`

Future result

- union
  - TryAgainResponse — This response is sent when the client has waited for too long and the request they're waiting for is still pending. Client should retry the retrieve_future request.
    - `type` 'try_again', required
    - `request_id` string, required — Request ID that is still pending
  - ForwardBackwardOutput
    - `metrics` object, required — Training metrics as key-value pairs
    - `loss_fn_outputs` LossFnOutput[], required — Dictionary mapping field names to tensor data
    - `loss_fn_output_type` string, required — The type of the ForwardBackward output. Can be one of [...] TODO
  - OptimStepResponse — Optimization step results with arbitrary key-value pairs
  - SaveWeightsResponse
    - `type` 'save_weights'
    - `path` string, required — A tinker URI for model weights at a specific step
  - LoadWeightsResponse
    - `type` 'load_weights'
    - `path` string — A tinker URI for model weights at a specific step
  - SaveWeightsForSamplerResponse
    - `type` 'save_weights_for_sampler'
    - `path` string — A tinker URI for model weights for sampling at a specific step
  - CreateModelResponse
    - `type` 'create_model'
    - `model_id` string, uuid, required
  - UnloadModelResponse
    - `type` 'unload_model'
    - `model_id` string, uuid, required

## Other responses

- `400` — Bad request (invalid future ID)
- `404` — Future not found
- `408` — Timeout, try again

---

[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)
