Cloud World Model AI Jobs API

The AI Jobs API from Cloud World Model — 3 operation(s) for ai jobs.

GitHub OpenAPI

Operations 4

POST /ai-jobs Submit async AI analysis job #
GET /ai-jobs/{jobId} Fetch the current AI job status #
DELETE /ai-jobs/{jobId} Delete a pending asynchronous AI job #
GET /ai-jobs/{jobId}/results Fetch completed AI job results #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudworldmodel-ai:cloudworldmodel-ai-ai-jobs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudworldmodel-ai-ai-jobs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudworldmodel Ai AI Jobs API
  version: 1.0.0
  contact:
    name: Cloud World Model API Support
    url: https://www.cloudworldmodel.ai
    email: api@cloudworldmodel.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  description: 'Operations tagged AI Jobs across 3 of this provider''s published API definitions: cloudworldmodel-ai-openapi.json, cloudworldmodel-ai-agent-x402-openapi.yml, cloudworldmodel-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://www.cloudworldmodel.ai/api
  description: Production
- url: http://localhost:5000/api
  description: Local development
tags:
- name: AI Jobs
paths:
  /ai-jobs:
    x-stability: stable
    post:
      tags:
      - AI Jobs
      summary: Submit async AI analysis job
      description: '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`.'
      operationId: createAiJob
      security:
      - BearerAuth: []
      - x402: []
      - x402Solana: []
      x-payment-info:
        protocols:
        - x402
        price:
          mode: fixed
          currency: USD
          amount: '0.003'
      x-x402-call-type: ai_analysis
      x-x402-price-usdc: $0.0030
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - simulationId
              - type
              properties:
                simulationId:
                  type: string
                  description: ID of the simulation to analyze
                type:
                  type: string
                  enum:
                  - explain
                  - troubleshoot
                  - analyze_bottlenecks
                  - optimize
                  description: Type of AI analysis to run
                beginnerMode:
                  type: boolean
                  default: false
                  description: Return simplified, jargon-free output
                issue:
                  type: string
                  description: Required for troubleshoot — describe the problem
            examples:
              explainJob:
                summary: Submit an explain job
                value:
                  simulationId: sim-abc123
                  type: explain
                  beginnerMode: false
              troubleshootJob:
                summary: Submit a troubleshoot job
                value:
                  simulationId: sim-abc123
                  type: troubleshoot
                  issue: Latency spiking after 500 RPS
      responses:
        '202':
          description: AI job accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobId:
                    type: string
                    description: AI job ID — use with /ai-jobs/{jobId} and /ai-jobs/{jobId}/results
                  status:
                    type: string
                    enum:
                    - pending
                  createdAt:
                    type: string
                    format: date-time
                  message:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/X402PaymentRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://www.cloudworldmodel.ai/api
      description: Production
    - url: http://localhost:5000/api
      description: Local development
  /ai-jobs/{jobId}:
    x-stability: stable
    get:
      tags:
      - AI Jobs
      summary: Fetch the current AI job status
      description: '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).'
      operationId: getAiJobStatus
      security:
      - BearerAuth: []
      x-x402-call-type: ai.status
      x-x402-price-usdc: $0.0030
      parameters:
      - name: jobId
        in: path
        required: true
        schema:
          type: string
        description: AI job ID
      responses:
        '200':
          description: AI job status
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                    - pending
                    - running
                    - completed
                    - failed
                    - cancelled
                  jobType:
                    type: string
                    enum:
                    - explain
                    - troubleshoot
                    - analyze_bottlenecks
                    - optimize
                  simulationId:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  completedAt:
                    type: string
                    format: date-time
                    nullable: true
                  error:
                    type: string
                    nullable: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - AI Jobs
      summary: Delete a pending asynchronous AI job
      description: 'Cancels a pending or running AI analysis job. Idempotent — cancelling

        an already-terminal job returns 200 with the terminal state.


        **Authentication:** Required (API key, write scope).'
      operationId: cancelAiJob
      security:
      - BearerAuth: []
      parameters:
      - name: jobId
        in: path
        required: true
        schema:
          type: string
        description: AI job ID
      responses:
        '200':
          description: Cancellation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                    - cancelled
                    - completed
                    - failed
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://www.cloudworldmodel.ai/api
      description: Production
    - url: http://localhost:5000/api
      description: Local development
  /ai-jobs/{jobId}/results:
    x-stability: stable
    get:
      tags:
      - AI Jobs
      summary: Fetch completed AI job results
      description: 'Retrieves the full AI output for a completed job. Returns HTTP 400 if

        the job is not yet completed. Call `GET /ai-jobs/{jobId}` first to

        confirm `status === "completed"`.


        Result shape varies by `jobType`:

        - `explain` → `{ explanation: string }`

        - `troubleshoot` → `{ guidance: string }`

        - `analyze_bottlenecks` → `{ analysis: string, doRecommendation: object|null }`

        - `optimize` → `{ suggestions: string[] }`


        **Authentication:** Requires an API key (`read` scope) or an x402

        micro-payment (3 credits — $0.0030 USDC on Base). Pass

        `Authorization: Bearer ` for API key access, or include a signed

        x402 payment header with call type `ai.results` (no account required).

        x402 callers that paid to create the job carry a wallet-session JWT that

        is accepted here without a second payment round-trip.

        Use `GET /api/billing/x402/config` to discover the live price.'
      operationId: getAiJobResults
      security:
      - BearerAuth: []
      - x402: []
      - x402Solana: []
      x-payment-info:
        protocols:
        - x402
        price:
          mode: fixed
          currency: USD
          amount: '0.003'
      x-x402-call-type: ai.results
      x-x402-price-usdc: $0.0030
      parameters:
      - name: jobId
        in: path
        required: true
        schema:
          type: string
        description: AI job ID
      responses:
        '200':
          description: AI job results
          content:
            application/json:
              schema:
                type: object
                properties:
                  explanation:
                    type: string
                    nullable: true
                  guidance:
                    type: string
                    nullable: true
                  analysis:
                    type: string
                    nullable: true
                  doRecommendation:
                    nullable: true
                    oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        suggestedDropletSize:
                          type: string
                          description: Recommended Droplet size slug (e.g. "s-2vcpu-4gb")
                        estimatedHourlyRate:
                          type: number
                          description: Hourly rate for the suggested Droplet size in USD
                        estimatedMonthlyCost:
                          type: number
                          description: Estimated monthly cost for all Droplets in USD
                        currentHourlyCost:
                          type: number
                          description: Current compute-tier hourly cost (compute resources only — see savingsBasis)
                        estimatedHourlySavings:
                          type: number
                          description: Estimated hourly savings vs current compute-tier cost
                        estimatedMonthlySavings:
                          type: number
                          description: Estimated monthly savings in USD
                        savingsPercent:
                          type: number
                          description: Savings as a percentage of the compute-tier baseline (0–70)
                        savingsIsComputed:
                          type: boolean
                          description: True when savings are derived from real cost data rather than a default estimate
                        savingsBasis:
                          type: string
                          enum:
                          - compute-only
                          description: Indicates that savings are computed against compute-tier costs only; non-compute resources (managed DB, cache, load balancer) are excluded from the baseline
                        reason:
                          type: string
                          enum:
                          - right-sizing
                          - migration
                          - scale-out
                          description: The primary recommendation category
                        numDroplets:
                          type: number
                          description: Suggested number of Droplets
                        reversibilityTier:
                          type: string
                          enum:
                          - instant
                          - minutes
                          - hours
                          - days
                          description: How hard this recommendation is to reverse — cross-provider migrations classify as "days"
                        reversibilityReason:
                          type: string
                          description: Human-readable explanation of the dominant reversibility factor
                        estimatedMinutesMin:
                          type: number
                          description: Lower bound of estimated rollback time in minutes
                        estimatedMinutesMax:
                          type: number
                          description: Upper bound of estimated rollback time in minutes
                        basis:
                          type: string
                          enum:
                          - rule_based
                          description: Always "rule_based" — reversibility is classified deterministically, not via LLM
                      required:
                      - suggestedDropletSize
                      - estimatedHourlyRate
                      - estimatedMonthlyCost
                      - currentHourlyCost
                      - estimatedHourlySavings
                      - estimatedMonthlySavings
                      - savingsPercent
                      - savingsIsComputed
                      - savingsBasis
                      - reason
                      - numDroplets
                      - reversibilityTier
                      - reversibilityReason
                      - estimatedMinutesMin
                      - estimatedMinutesMax
                      - basis
                      additionalProperties: true
                  suggestions:
                    type: array
                    items:
                      type: string
                    nullable: true
                  recommendations:
                    type: array
                    nullable: true
                    description: 'Present only when the jobId belongs to an optimization job created

                      via `POST /api/analysis/optimize` — the structured recommendation

                      objects, in addition to the flattened `suggestions` strings.

                      '
                    items:
                      type: object
                      additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/X402PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://www.cloudworldmodel.ai/api
      description: Production
    - url: http://localhost:5000/api
      description: Local development
components:
  responses:
    Unauthorized:
      description: Authentication required or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Insufficient permissions — the API key lacks the required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    X402PaymentRequired:
      description: 'Payment required — the endpoint is metered and no API key was provided.


        The response body follows the [x402 v2 protocol](https://x402.org) and describes

        one or more USDC payment options that the caller can select before retrying the request.

        Base is always the first option and uses `X-PAYMENT`. When an `accepts` entry for Solana

        is present, it is an additional USDC-SPL option that uses `PAYMENT-SIGNATURE` and its

        `extra.feePayer` value. The server verifies either payment through the PayAI facilitator

        at `https://facilitator.payai.network`.


        The `PAYMENT-REQUIRED` response header carries this entire JSON body as a

        base64-encoded string for protocol-aware clients.


        Call `GET /api/billing/x402/config` to retrieve the current price table and wallet

        address and `paymentOptions` before constructing a payment.

        '
      content:
        application/json:
          schema:
            type: object
            required:
            - x402Version
            - error
            - resource
            - accepts
            properties:
              x402Version:
                type: integer
                example: 2
              error:
                type: string
                example: Payment required. Send an X-PAYMENT header containing a signed USDC payment on Base (x402 protocol).
              resource:
                type: object
                required:
                - url
                - description
                - mimeType
                properties:
                  url:
                    type: string
                    description: Full URL of the endpoint being paid for.
                  description:
                    type: string
                    description: Human-readable description of the metered call.
                  mimeType:
                    type: string
                    example: application/json
              accepts:
                type: array
                items:
                  type: object
                  required:
                  - scheme
                  - network
                  - amount
                  - payTo
                  - maxTimeoutSeconds
                  - asset
                  properties:
                    scheme:
                      type: string
                      example: exact
                    network:
                      type: string
                      description: CAIP-2 network identifier.
                      example: eip155:8453
                    amount:
                      type: string
                      description: Payment amount in USDC atomic units (6-decimal integer string).
                      example: '5000'
                    payTo:
                      type: string
                      description: Recipient wallet address on the selected network.
                    maxTimeoutSeconds:
                      type: integer
                      example: 300
                    asset:
                      type: string
                      description: USDC contract or mint address on the selected network.
                      example: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    extra:
                      type: object
                      description: 'Network-specific x402 details. Solana options include

                        `feePayer`, the PayAI wallet that sponsors the transaction fee.

                        '
              extensions:
                type: object
                description: Optional protocol extensions (empty object in standard use).
    BadRequest:
      description: Invalid request data — structured field-level error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    FieldError:
      type: object
      description: A single structured field-level error returned on HTTP 400 responses
      required:
      - code
      - pointer
      - message
      properties:
        code:
          $ref: '#/components/schemas/ValidationErrorCode'
        pointer:
          type: string
          description: JSON Pointer (RFC 6901) to the field that caused the error, or an empty string for request-level errors
          example: /resources/0/provider
        message:
          type: string
          description: Human-readable description of the error
          example: Unknown provider 'gce'; valid values are aws, gcp, azure, oci, digitalocean
        suggestion:
          type: string
          description: Optional actionable hint for self-correction
          example: 'Use one of: aws, gcp, azure, oci, digitalocean'
        suggestions:
          type: array
          description: For UNKNOWN_REGION errors, the 3-5 closest matching regions ranked by similarity to the invalid input
          items:
            type: object
            required:
            - regionKey
            - regionLabel
            properties:
              regionKey:
                type: string
                description: Canonical shortcode for the region
                example: use2
              regionLabel:
                type: string
                description: Standard provider label for the region
                example: us-east-2
    ValidationErrorCode:
      type: string
      description: Machine-readable error code indicating the category of validation failure
      enum:
      - INVALID_FIELD
      - MISSING_REQUIRED
      - UNKNOWN_PROVIDER
      - UNKNOWN_SIZE
      - UNKNOWN_REGION
      - INVALID_REQUEST
    ValidationErrorResponse:
      type: object
      description: Response body for HTTP 400 errors — either a single error or an array of field errors
      oneOf:
      - type: object
        required:
        - error
        properties:
          error:
            $ref: '#/components/schemas/FieldError'
      - type: object
        required:
        - errors
        properties:
          errors:
            type: array
            items:
              $ref: '#/components/schemas/FieldError'
            minItems: 1
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Error message
          example: Simulation not found
        details:
          type: array
          description: Detailed validation errors (for 400 responses)
          items:
            type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Wallet Session JWT
      description: 'API key or wallet-session JWT authentication using Bearer tokens in the Authorization header.


        **How to authenticate:**

        1. Create an API key using POST /api/keys

        2. Include the key in the Authorization header: `Bearer cwm_live_<your_key>`

        3. All RL environment endpoints require authentication


        **Rate Limits:**

        - Default: 1000 requests/hour per key

        - Configurable per key

        - Returns 429 when exceeded

        '
    UiSessionCookie:
      type: apiKey
      in: cookie
      name: cwm_ui_session
      description: 'HttpOnly browser-workspace session cookie issued by

        `POST /api/ui/simulations`. It authorizes UI mutations for simulations

        owned by that browser workspace.

        '
    x402:
      type: apiKey
      in: header
      name: X-PAYMENT
      description: "x402 v2 Base micropayment option. Select the Base entry from\n`GET /api/billing/x402/config` `paymentOptions`, then send its signed USDC\nmicro-payment in the `X-PAYMENT` header to get full access to the metered\nendpoint in a single round-trip — no account, no API key, no sign-up required.\n\n**402 → pay → retry loop:**\n1. Call the endpoint without an `X-PAYMENT` header.\n2. Receive a `402 Payment Required` response. The body is a\n   standard JSON `PaymentRequired` object. The same payload is also\n   echoed as a base64-encoded string in the `PAYMENT-REQUIRED`\n   response header for clients that cannot access the body.\n3. Decode the `PaymentRequired` body (or the `PAYMENT-REQUIRED`\n   header) to read the exact `payTo` wallet,\n   USDC amount, network, and facilitator URL.\n4. Construct and sign the payment with your x402 client library.\n5. Retry the Base request with the `X-PAYMENT` header — the server\n   verifies via `https://facilitator.payai.network` and responds `200`.\n\n**Optional Solana:** When `paymentOptions` advertises a Solana entry, callers\nmay instead select it and use `PAYMENT-SIGNATURE`. Solana is an additional\noption; use `X-PAYMENT` for the Base option shown by this security scheme.\n\n**Discovery:** `GET /api/billing/x402/config` returns the live `payTo`\naddress, canonical `paymentOptions`, per-call-type USDC amounts, facilitator\nURL, and the credits-per-USDC conversion rate. Always fetch this before\nhardcoding any amounts or a payment header.\n\n**Price range:** $0.0030 per 3-credit call — $0.0050 per 5-credit\ncall (see `x-x402-price-usdc` on each\noperation for the exact amount).\n\n**Facilitator:** `https://facilitator.payai.network` (PayAI-operated,\nverifies the advertised Base and optional Solana options).\n"
    x402Solana:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: 'Optional x402 v2 Solana payment alternative. Use this security option only

        when `GET /api/billing/x402/config` `paymentOptions` advertises a Solana

        network, then send its signed Solana USDC payment payload in the

        `PAYMENT-SIGNATURE` header. Include the option''s `feePayer` detail when

        constructing the transaction.


        For the primary Base payment option, select the `x402` security option

        instead and send its signed payment payload in the `X-PAYMENT` header.

        '
x-refined-from:
- cloudworldmodel-ai-openapi.json
- cloudworldmodel-ai-agent-x402-openapi.yml
- cloudworldmodel-ai-openapi.yml