---
title: "Get the latest generation run"
method: GET
path: "/v1/models/{modelId}/suggestions/runs/latest"
tags: ["AI Model Suggestions"]
---

# Get the latest generation run

`GET /v1/models/{modelId}/suggestions/runs/latest`

<Note>
  **Organization Admin** permissions are required to use this endpoint.
</Note>

Retrieve the most recent generation run for the shared model (the active run if one is in flight, otherwise the last terminal run), or `null` if none exists.

## Path parameters

- `modelId` string, uuid, required — UUID of the shared model the suggestions belong to

## Response `200`

The latest generation run, or null

- object — The most recent generation run or `null` if no runs exist.
  - `run` object, nullable, required — The most recent run for this model or `null` if none exists.
    - `id` string, uuid, required — The run ID.
    - `status` 'queued' | 'executing' | 'complete' | 'failed', required — Run status. Terminal states are `complete` and `failed`.
    - `triggerSource` 'manual' | 'scheduled', required — Whether the run was triggered manually or by the schedule.
    - `triggeredBy` object, nullable, required — The user who triggered a manual run; `null` for scheduled runs.
      - `userId` string, uuid, required — The user's ID.
      - `name` string, nullable, required — The user's name.
    - `createdAt` string, date-time, required — ISO 8601 timestamp when the run was created (queued).
    - `executionStartedAt` string, date-time, nullable, required — ISO 8601 timestamp when the worker started executing; `null` while queued.
    - `completedAt` string, date-time, nullable, required — ISO 8601 timestamp when the run reached a terminal state.
    - `error` object, nullable, required — Failure details when `status` is `failed`; `null` otherwise.

## Other responses

- `400` — Malformed `modelId`
- `401` — Authentication required
- `403` — Feature not enabled, AI disabled, model is not a shared model, or caller lacks Organization Admin permissions
- `404` — Model not found in this organization
- `405` — Method not allowed
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500` — Internal Server Error

---

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