---
title: "Fetch the current AI job status"
method: GET
path: "/ai-jobs/{jobId}"
tags: ["AI Jobs"]
---

# Fetch the current AI job status

`GET /ai-jobs/{jobId}`

## Request

- Base URL: `https://www.cloudworldmodel.ai/api`
- URL: `https://www.cloudworldmodel.ai/api/ai-jobs/{jobId}`
- Auth: HTTP bearer

Returns the current status of an async AI analysis job. Poll until
`status` is `completed` (or `failed`/`cancelled`), then call
`GET /ai-jobs/{jobId}/results` to retrieve the AI output.

Also accepts job IDs returned by `POST /api/analysis/optimize` —
optimization jobs are reported here with `jobType: "optimize"`, so
polling an optimize job at this endpoint never returns 404.

**Authentication:** Required (API key, read scope).

## Path parameters

- `jobId` string, required

## Response `200`

AI job status

- object
  - `id` string
  - `status` 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'
  - `jobType` 'explain' | 'troubleshoot' | 'analyze_bottlenecks' | 'optimize'
  - `simulationId` string
  - `createdAt` string, date-time
  - `completedAt` string, date-time, nullable
  - `error` string, nullable

## Other responses

- `401`: Authentication required or invalid API key
- `403`: Insufficient permissions — the API key lacks the required scope
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api.md) · [All operations](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api/revisions/ecc3ad1ff07f?raw)
