AI Jobs

Submit async AI analysis job

Creates an async AI analysis job for a simulation. Immediately returns a jobId (HTTP 202) so callers are never blocked by the ~11 s gateway timeout. Supported job types:

  • explain — natural-language explanation of simulation behaviour
  • troubleshoot — diagnosis and remediation steps for a described issue
  • analyze_bottlenecks — ranked bottleneck detection with remediation
  • optimize — infrastructure optimisation suggestions

Poll flow:

  1. POST /api/ai-jobs → receive jobId
  2. GET /api/ai-jobs/{jobId} → poll until status is completed
  3. GET /api/ai-jobs/{jobId}/results → retrieve the AI output

Authentication: Required. Provide Authorization: Bearer cwm_live_… or an x402 payment header with call type ai_analysis.

post/ai-jobs

Request

  • Base URL: https://www.cloudworldmodel.ai/api
  • URL: https://www.cloudworldmodel.ai/api/ai-jobs
  • Auth: one of:
    • HTTP bearer
    • API key in header X-PAYMENT
    • API key in header PAYMENT-SIGNATURE

Request body

simulationIdstring required

ID of the simulation to analyze

type'explain' | 'troubleshoot' | 'analyze_bottlenecks' | 'optimize' required

Type of AI analysis to run

beginnerModeboolean

Return simplified, jargon-free output

issuestring

Required for troubleshoot — describe the problem

Response

AI job accepted

jobIdstring

AI job ID — use with /ai-jobs/{jobId} and /ai-jobs/{jobId}/results

status'pending'
createdAtstring date-time
messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.