---
title: "Get AI job result"
method: GET
path: "/api/v1/ai/jobs/{jobId}/result"
tags: ["AI"]
---

# Get AI job result

`GET /api/v1/ai/jobs/{jobId}/result`

Retrieve the full result of a completed AI job, including all actions taken by the AI (queries generated, data retrieved) and the final summarized answer. Results are only available for jobs in COMPLETE state and are retained for 14 days after completion. The response is streamed directly from storage.

## Path parameters

- `jobId` string, uuid, required — The unique identifier of the AI job

## Response `200`

Full job result including the AI's actions, query results (with CSV data), and the final Markdown-formatted answer.

- AiJobResultResponse
  - `actions` AiJobAction[] — Ordered list of actions the AI took during execution. Each action represents a step such as generating a query, executing it, or synthesizing a final answer.
    - `message` string, required — The AI's explanation of what it is doing in this step, written in natural language.
    - `result` AiJobActionQueryResult — Query result data. Only present for generate_query action types.
      - `csvResult` string, required — Query results formatted as CSV text.
      - `csvResultWasTruncated` boolean, required — Whether the CSV data was truncated due to size limits. If true, the full result set may contain additional rows not included in csvResult.
      - `hasResults` boolean, required — Whether the query returned any data rows.
      - `query` object, required — The semantic query definition that was executed. This can be used with the POST /api/v1/query/run endpoint to re-run the query.
      - `queryName` string, required — Human-readable name describing what this query retrieves.
      - `resultId` string — Stable, unique identifier for this query result within the job. Use it to reference a specific result — for example, to correlate or de-duplicate results across responses.
      - `status` 'success' | 'error', required — Whether the query executed successfully.
      - `totalRowCount` integer, required — Total number of rows returned by the query.
    - `timestamp` string, required — ISO 8601 timestamp when this action occurred.
    - `type` string, required — The type of action. Common types include "generate_query" (query generation and execution) and "summarize" (final answer synthesis).
  - `message` string — The AI's final response message in Markdown format. This is the complete answer to the original prompt, incorporating data from all executed queries.
  - `omniChatUrl` string, uri — URL to view this conversation in the Omni chat interface. Opens the chat session where the job actions and results are visible.
  - `resultSummary` string — Summary of the job result. Typically matches the final message content.
  - `topic` string — The topic name used for query generation.

## Other responses

- `400` — Invalid job ID format. Must be a valid UUID.
- `401` — Missing or invalid API key.
- `403` — Insufficient permissions. AI query generation must be enabled for the organization and the caller must have permission to use AI on the job's model.
- `404` — Job not found, not in COMPLETE state, or result is no longer available (results are retained for 14 days).

---

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