v4

OpenAPI 3.1.02026-08-01207318738.7 KB
AI

Get AI job status

Get the current status of an AI job, including its state, progress information, and result summary. The response fields vary by state — for example, progress is only present during EXECUTING, and resultSummary is only present when COMPLETE. Poll this endpoint every 2–5 seconds until the job reaches a terminal state (COMPLETE, FAILED, or CANCELLED).

get/api/v1/ai/jobs/{jobId}

Path parameters

jobIdstring uuid required

The unique identifier of the AI job

Example:123e4567-e89b-12d3-a456-426614174000

The unique identifier of the AI job

Response

Job status retrieved successfully. Check the state field to determine if the job is still running or has reached a terminal state.

branchIdstring uuid nullable required

Branch ID used for model context, or null if querying the main shared model.

cancelledAtstring date-time

When the job was cancelled. Only present in CANCELLED state.

cancelledBystring uuid

User ID of who cancelled the job. Only present in CANCELLED state.

completedAtstring date-time

When the job finished (successfully or with error). Present in COMPLETE and FAILED states.

conversationIdstring uuid required

The conversation this job belongs to. Use this to submit follow-up jobs in the same conversation thread.

createdAtstring date-time required

When the job was submitted.

executionStartedAtstring date-time

When execution began. Present once the job transitions from QUEUED to EXECUTING. May be absent on jobs that failed or were cancelled before execution started.

idstring uuid required

The unique identifier for this job.

modelIdstring uuid nullable required

The shared model ID used for query generation.

omniChatUrlstring uri required

URL to view this conversation in the Omni chat interface. Opens the chat session where the job actions and results are visible.

organizationIdstring uuid required

The organization that owns this job.

promptstring required

The natural language prompt that was submitted.

resultSummarystring

Markdown-formatted summary of the job result. Only present in COMPLETE state. For the full result with query details and data, use GET /api/v1/ai/jobs/{jobId}/result.

state'CANCELLED' | 'COMPLETE' | 'DELIVERING' | 'EXECUTING' | 'FAILED' | 'QUEUED' required

Current state of the job. Terminal states are COMPLETE, FAILED, and CANCELLED. Poll until the job reaches a terminal state.

topicNamestring nullable required

Topic name used to scope query generation, or null if the AI selected the topic automatically.

updatedAtstring date-time required

When the job record was last modified.

userIdstring uuid required

The user ID who created (or is associated with) this job.

Example response

{
  "cancelledAt": "2025-01-15T10:00:12.000Z",
  "cancelledBy": "990e8400-e29b-41d4-a716-446655440004",
  "completedAt": "2025-01-15T10:01:30.000Z",
  "conversationId": "660e8400-e29b-41d4-a716-446655440001",
  "createdAt": "2025-01-15T10:00:00.000Z",
  "error": {
    "code": "QUERY_EXECUTION_ERROR",
    "detail": "The query timed out after 300 seconds",
    "message": "Column 'revenue' not found in table 'orders'"
  },
  "executionStartedAt": "2025-01-15T10:00:05.000Z",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "modelId": "770e8400-e29b-41d4-a716-446655440002",
  "omniChatUrl": "https://my-org.omni.co/chat/660e8400-e29b-41d4-a716-446655440001",
  "organizationId": "880e8400-e29b-41d4-a716-446655440003",
  "progress": {
    "iteration": 2,
    "message": "Running query: Top products by revenue",
    "updatedAt": "2025-01-15T10:00:08.000Z"
  },
  "prompt": "What are the top 5 products by revenue?",
  "resultSummary": "### Top 5 Products by Revenue\n\n1. **Sunglasses** - $678,994\n2. **Jeans** - $475,072",
  "state": "QUEUED",
  "topicName": "order_items",
  "updatedAt": "2025-01-15T10:00:05.000Z",
  "userId": "990e8400-e29b-41d4-a716-446655440004"
}