> ## Documentation Index
> Fetch the complete documentation index at: https://quantura.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# cancel Ensemble Forecast

> Atomically prevents further execution/result acceptance, releases compute admission and reserved metered charges, then requests cancellation of the exact saved worker run. Repeated calls are safe. Completed forecasts remain completed. Canceled jobs retain status failed with error.code FORECAST_CANCELED for compatibility.



## OpenAPI

````yaml /docs/api/openapi.json post /v1/ensemble-forecasts/{forecast_id}/cancel
openapi: 3.1.0
info:
  title: Quantura API
  version: 1.0.0
  description: >-
    Search markets and public datasets, download historical observations, create
    forecasts and inspect screener quantiles.
  contact:
    name: Quantura
    url: https://quantura.studio/contact
  license:
    name: Quantura API Terms
    url: https://quantura.studio/terms
servers:
  - url: https://quantura.studio/api
security:
  - bearerAuth: []
  - clerkOAuth:
      - openid
      - profile
      - email
tags:
  - name: Access
  - name: Forecast
  - name: Screener
  - name: Search
  - name: Download
  - name: Scout
paths:
  /v1/ensemble-forecasts/{forecast_id}/cancel:
    servers:
      - url: https://quantura.studio/api
    post:
      tags:
        - Forecast
      summary: cancel Ensemble Forecast
      description: >-
        Atomically prevents further execution/result acceptance, releases
        compute admission and reserved metered charges, then requests
        cancellation of the exact saved worker run. Repeated calls are safe.
        Completed forecasts remain completed. Canceled jobs retain status failed
        with error.code FORECAST_CANCELED for compatibility.
      operationId: cancelEnsembleForecast
      parameters:
        - name: forecast_id
          in: path
          required: true
          description: Forecast id or unique slug.
          schema:
            type: string
      responses:
        '200':
          description: Current forecast state and upstream cancellation status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnsembleForecastEnvelope'
              example:
                data:
                  forecast_id: ens_01JEXAMPLE7M6N
                  status: failed
                  progress:
                    completed_models: 0
                    total_models: 4
                    current_model: null
                  status_url: /api/v1/ensemble-forecasts/ens_01JEXAMPLE7M6N
                  result_url: /api/v1/ensemble-forecasts/ens_01JEXAMPLE7M6N
                  error:
                    code: FORECAST_CANCELED
                    retryable: false
                  worker_cancellation: requested
                meta:
                  api_version: v1
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - request_id
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      request_id:
                        type: string
                        format: uuid
        '403':
          description: Scope, plan, or workspace authorization denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - request_id
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      request_id:
                        type: string
                        format: uuid
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - request_id
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      request_id:
                        type: string
                        format: uuid
      security:
        - bearerAuth: []
        - clerkOAuth:
            - openid
            - profile
            - email
components:
  schemas:
    EnsembleForecastEnvelope:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: object
          required:
            - forecast_id
            - status
          properties:
            forecast_id:
              type: string
            status:
              type: string
              enum:
                - queued
                - running
                - completed
                - failed
            progress:
              type:
                - object
                - 'null'
            predictions:
              type: array
              items:
                $ref: '#/components/schemas/EnsemblePrediction'
            weight_mode:
              type: string
              enum:
                - manual
                - auto
            weighting:
              $ref: '#/components/schemas/EnsembleWeighting'
            historical_validation:
              $ref: '#/components/schemas/HistoricalForecastValidation'
            effective_weights_by_quantile:
              type: object
            status_url:
              type: string
            result_url:
              type: string
            provenance:
              $ref: '#/components/schemas/ForecastTimestampReceipt'
        meta:
          type: object
          properties:
            api_version:
              const: v1
    EnsemblePrediction:
      type: object
      required:
        - timestamp
        - quantiles
      properties:
        timestamp:
          type: string
          format: date-time
        quantiles:
          type: object
          additionalProperties:
            type: number
          description: Canonical decimal quantile string to final ensemble value.
    EnsembleWeighting:
      type: object
      description: >-
        Automatic calibration provenance. audit_metrics and
        baseline_audit_metrics use the same untouched final window; audit
        outcomes never select weights. Read effective_weights_by_quantile for
        actual surviving model participation.
      properties:
        mode:
          const: auto
        policy:
          type: string
          enum:
            - rolling_pinball_v1
            - rolling_loss_selection_v2
        status:
          type: string
          enum:
            - optimized
            - fallback
            - single_model
        reason:
          type:
            - string
            - 'null'
        pooling_space:
          type: string
          enum:
            - target
            - transformed
        calibration_rows:
          type: integer
          minimum: 0
        calibration_horizon:
          type: integer
          minimum: 0
          maximum: 30
        weights_by_quantile:
          type: object
        effective_weights_by_quantile:
          type: object
        folds:
          type: array
          maxItems: 5
          items:
            type: object
        selected_method:
          type: string
        inner_scores:
          type: object
        audit_metrics:
          type: object
        baseline_audit_metrics:
          type: object
    HistoricalForecastValidation:
      type: object
      required:
        - policy
        - method
        - status
        - metrics
      description: >-
        Auto weighting uses its separate audit window for these metrics; manual
        weighting uses one chronological holdout. Forecast jobs include one
        chronological holdout of up to 30 existing observations when enough
        history is available. No future observations are needed. These scores
        describe historical validation of the selected models, separate from the
        requested future predictions. A failed or insufficient holdout does not
        fail the forecast.
      properties:
        policy:
          const: chronological_holdout_v1
        method:
          const: chronological_holdout
        status:
          type: string
          enum:
            - completed
            - insufficient_history
            - no_matching_outcomes
            - failed
        training_rows:
          type: integer
          minimum: 2
        holdout_rows:
          type: integer
          minimum: 1
          maximum: 30
        training_end_at:
          type: string
          format: date-time
        validation_start_at:
          type: string
          format: date-time
        validation_end_at:
          type: string
          format: date-time
        requested_models:
          type: array
          items:
            type: string
        effective_weights_by_quantile:
          type: object
        metrics:
          type:
            - object
            - 'null'
          properties:
            count:
              type: integer
              minimum: 0
            point_count:
              type: integer
              minimum: 0
            mae:
              type:
                - number
                - 'null'
              minimum: 0
            rmse:
              type:
                - number
                - 'null'
              minimum: 0
            smape:
              type:
                - number
                - 'null'
              minimum: 0
              maximum: 2
              description: >-
                Ratio, not percent; the UI multiplies by 100. Zero/zero
                contributes zero.
            average_wql:
              type:
                - number
                - 'null'
              minimum: 0
              description: >-
                Mean twice-pinball loss divided by total absolute actual values;
                null for all-zero actuals.
      example:
        policy: chronological_holdout_v1
        method: chronological_holdout
        status: completed
        training_rows: 493
        holdout_rows: 7
        training_end_at: '2026-09-08T20:00:00Z'
        validation_start_at: '2026-09-09T20:00:00Z'
        validation_end_at: '2026-09-17T20:00:00Z'
        metrics:
          count: 7
          point_count: 7
          mae: 1.25
          rmse: 1.6
          smape: 0.012
          average_wql: 0.018
    ForecastTimestampReceipt:
      type:
        - object
        - 'null'
      properties:
        provider:
          const: vbase
        schema_version:
          const: quantura_forecast_proof_v1
        status:
          type: string
          enum:
            - pending
            - stamping
            - stamped
            - unavailable
        content_cid:
          type:
            - string
            - 'null'
          pattern: ^0x[0-9a-f]{64}$
        receipt:
          type:
            - object
            - 'null'
          properties:
            object_cid:
              type: string
              pattern: ^0x[0-9a-f]{64}$
            set_cid:
              type: string
              pattern: ^0x[0-9a-f]{64}$
            transaction_hash:
              type: string
              pattern: ^0x[0-9a-f]{64}$
            user_address:
              type:
                - string
                - 'null'
            user_label:
              type: string
              description: >-
                Account display name returned during recovery, not a blockchain
                address.
            chain_id:
              type: integer
            timestamp:
              type: string
              format: date-time
        error_code:
          type:
            - string
            - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Clerk personal API key or legacy Quantura key
    clerkOAuth:
      type: oauth2
      description: >-
        Clerk authorization code with PKCE S256. Pass
        resource=https://quantura.studio on authorization and token requests.
        Paid Pro, enterprise or verified administrator API access is required.
      flows:
        authorizationCode:
          authorizationUrl: https://clerk.quantura.studio/oauth/authorize
          tokenUrl: https://clerk.quantura.studio/oauth/token
          refreshUrl: https://clerk.quantura.studio/oauth/token
          scopes:
            openid: Identify the Quantura account
            profile: Resolve the account profile
            email: Verify account email
            offline_access: Refresh access after expiry

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.