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

# Submit an async simulate job

> Queues a simulate job and returns immediately with its `job_id`. The job runs in a sandbox; poll `GET /v2/simulate/jobs/{job_id}` for its state and result. Accepts the same body as the synchronous endpoint plus an optional `job_options`.



## OpenAPI

````yaml /openapi.json post /v2/simulate/async
openapi: 3.1.0
info:
  title: Nixtla Forecast API
  description: >-
    API for TimeGPT forecast. Just send your data as json and get results. We do
    the heavy lifting.
  version: 0.4.2
servers:
  - url: https://api.nixtla.io
security: []
paths:
  /v2/simulate/async:
    post:
      tags:
        - async jobs
      summary: Submit an async simulate job
      description: >-
        Queues a simulate job and returns immediately with its `job_id`. The job
        runs in a sandbox; poll `GET /v2/simulate/jobs/{job_id}` for its state
        and result. Accepts the same body as the synchronous endpoint plus an
        optional `job_options`.
      operationId: submit_async_simulate_v2_simulate_async_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateAsyncRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncJobSubmitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SimulateAsyncRequest:
      properties:
        series:
          $ref: '#/components/schemas/SeriesWithFutureExogenous'
        freq:
          type: string
          title: Freq
          description: >-
            The frequency of the data represented as a string. 'D' for daily,
            'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are
            available.
        h:
          type: integer
          exclusiveMinimum: 0
          title: H
          description: >-
            The forecasting horizon. This represents the number of time steps
            into the future that the forecast should predict.
        model:
          type: string
          title: Model
          description: >-
            Model to use as a string. Common options are (but not restricted to)
            `timegpt-1` and `timegpt-1-long-horizon`. Full options vary by
            different users. Contact support@nixtla.io for more information. We
            recommend using `timegpt-1-long-horizon` for forecasting if you want
            to predict more than one seasonal period given the frequency of your
            data.
          default: timegpt-1
        finetuned_model_id:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z0-9\-_]{1,36}$
            - type: 'null'
          title: Finetuned Model Id
          description: ID of previously finetuned model
        clean_ex_first:
          type: boolean
          title: Clean Ex First
          description: >-
            A boolean flag that indicates whether the API should preprocess
            (clean) the exogenous signal before applying the large time model.
            If True, the exogenous signal is cleaned; if False, the exogenous
            variables are applied after the large time model.
          default: true
        multivariate:
          type: boolean
          title: Multivariate
          description: >-
            When True, sample paths are coupled across series via a
            shared-template Schaake shuffle (path k reflects the same historical
            period for every series) — this applies to ALL models. Falls back to
            independent per-series paths when no NaN-free shared history window
            exists (see `coupled` in the response). Also enables the
            multivariate marginal forecast for models that support it
            (timegpt-2.1).
          default: false
        n_paths:
          type: integer
          maximum: 10000
          minimum: 1
          title: N Paths
          description: Number of sample paths to generate per series.
          default: 100
        quantiles:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Quantiles
          description: >-
            Marginal quantile grid in (0, 1), strictly increasing, length in [2,
            200]. Defaults to the model's native grid (native-quantile losses)
            or a dense grid (point-loss/conformal).
        seed:
          anyOf:
            - type: integer
              maximum: 18446744073709552000
              minimum: -9223372036854776000
            - type: 'null'
          title: Seed
          description: >-
            Random seed for reproducibility. When omitted, a fresh random seed
            is drawn, so repeated unseeded requests return different paths.
        job_options:
          anyOf:
            - $ref: '#/components/schemas/AsyncJobOptions'
            - type: 'null'
      type: object
      required:
        - series
        - freq
        - h
      title: SimulateAsyncRequest
    AsyncJobSubmitResponse:
      properties:
        job_id:
          type: string
          title: Job Id
          description: >-
            Identifier for the accepted job. Prefixed per task (e.g. `fc-` for
            forecast).
          examples:
            - fc-4f2a1c9e8b7d4a6f9c3e1b5d7a9f2c4e
      type: object
      required:
        - job_id
      title: AsyncJobSubmitResponse
      description: >-
        The 202 every async submit returns. Shared by all tasks — they differ in
        request, not reply.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SeriesWithFutureExogenous:
      properties:
        X_future:
          anyOf:
            - items:
                items:
                  anyOf:
                    - type: number
                    - type: string
                type: array
              type: array
            - type: 'null'
          title: X Future
          description: >-
            Future values of the exogenous features. Each feature must be a list
            of size number of series times the forecast horizon (h).
        X:
          anyOf:
            - items:
                items:
                  anyOf:
                    - type: number
                    - type: string
                type: array
              type: array
            - type: 'null'
          title: X
          description: >-
            Historic values of the exogenous features. Each feature must be a
            list of the same size as the target (y).
        categorical_exog:
          anyOf:
            - items:
                type: integer
                minimum: 0
              type: array
            - type: 'null'
          title: Categorical Exog
          description: >-
            Zero-based indices of the columns in X that are categorical
            features.
        'y':
          items:
            type: number
          type: array
          title: 'Y'
          description: Historic values of the target.
        sizes:
          items:
            type: integer
          type: array
          title: Sizes
          description: Sizes of the individual series.
        start_datetime:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Start Datetime
          description: >-
            Starting timestamp of each individual series, as ISO 8601 strings
            (for example '2021-01-01' or '2021-01-01T09:30:00'). One entry per
            series, so it must have the same length as `sizes`. Together with
            `sizes` and `freq` this recovers the timestamps of every series.
      type: object
      required:
        - 'y'
        - sizes
      title: SeriesWithFutureExogenous
    AsyncJobOptions:
      properties:
        timeout_seconds:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Timeout Seconds
      additionalProperties: false
      type: object
      title: AsyncJobOptions
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: HTTPBearer
      scheme: bearer

````