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

# Simulate a request through the route

> Walks the draft (or, with `version_number`, a deployed version) for one request and returns the path it takes, node by node, and the model that would answer. No provider is called: a model node's outcome comes from `overrides.model_outcomes`, a classifier's pick from `overrides.classifier_cases`. `meta.target` says which graph was walked. Requires the `dynamic_routes:write` scope.



## OpenAPI

````yaml post /management/v1/dynamic-routes/{name}/simulate
openapi: 3.1.0
info:
  description: Schema-driven generative API that orchestrates LLM-powered workflows.
  title: Task API
  version: 3.0.0
servers:
  - description: Production
    url: https://api.opper.ai
  - description: Local development
    url: http://localhost:8080
security:
  - BearerAuth: []
tags:
  - description: Schema-driven function management and execution
    name: Functions
  - description: OpenAI-compatible chat completions
    name: Chat
  - description: OpenAI Responses API compatible endpoint
    name: Responses
  - description: Google-compatible interactions endpoint
    name: Interactions
  - description: Model registry and capabilities
    name: Models
  - description: Synchronous image generation
    name: Images
  - description: Text-to-speech and speech-to-text
    name: Audio
  - description: Asynchronous video generation
    name: Videos
  - description: Reusable file storage for media inputs and generated outputs
    name: Files
  - description: Async generation status and downloads
    name: Artifacts
  - description: OpenAI-compatible embeddings
    name: Embeddings
  - description: Recorded HTTP request/response generations
    name: Generations
  - description: System health and status
    name: System
  - description: Roundtable endpoint — fan out a query to multiple LLMs and combine results
    name: Roundtable
  - description: Web search, fetch, and other utility tools
    name: Tools
  - description: Caller identity, credits, and usage
    name: Account
  - description: >-
      Programmatic project and API-key management. Authenticates with an
      `op-mak-…` management token; available on the control_plane and enterprise
      plans.
    name: Management
paths:
  /management/v1/dynamic-routes/{name}/simulate:
    post:
      tags:
        - Management
      summary: Simulate a request through the route
      description: >-
        Walks the draft (or, with `version_number`, a deployed version) for one
        request and returns the path it takes, node by node, and the model that
        would answer. No provider is called: a model node's outcome comes from
        `overrides.model_outcomes`, a classifier's pick from
        `overrides.classifier_cases`. `meta.target` says which graph was walked.
        Requires the `dynamic_routes:write` scope.
      operationId: simulateManagementDynamicRoute
      parameters:
        - description: Route name
          in: path
          name: name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DynamicRouteSimulateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/DynamicRouteSimulationResult'
                  meta:
                    properties:
                      target:
                        description: '`draft` or `version:<n>`.'
                        type: string
                    type: object
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                properties:
                  allowed_plans:
                    description: Present on the plan-gate refusal.
                    items:
                      type: string
                    type: array
                  current_plan:
                    description: Present on the plan-gate refusal.
                    type: string
                  error:
                    type: string
                  required_scope:
                    description: Present on the scope refusal.
                    type: string
                type: object
          description: >-
            Either the organization's plan does not include the Management API
            (`current_plan` / `allowed_plans` are returned), or the token lacks
            the scope this endpoint requires (`required_scope` is returned).
            Presenting a runtime `op-…` key instead of a management `op-mak-…`
            token also lands here.
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                type: object
          description: >-
            No such resource in the calling organization. A resource belonging
            to another organization is indistinguishable from one that does not
            exist.
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                type: object
          description: >-
            The draft parses but fails validation (the issues are on the route's
            draft.validation), so it cannot be deployed or simulated.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      security:
        - ManagementBearer: []
components:
  schemas:
    DynamicRouteSimulateRequest:
      properties:
        input:
          description: >-
            The request body a conditional or classifier node reads; in the
            shape of the compat endpoint you call the route from (for chat
            completions: messages).
          type: object
        metadata:
          description: >-
            Request metadata a conditional node can test (tags; headers; the
            caller's project).
          type: object
        overrides:
          description: >-
            Forced outcomes per node id: which conditional case matches; which
            percentage bucket is drawn; whether a model succeeds or fails; which
            classifier case is picked.
          properties:
            classifier_cases:
              additionalProperties:
                type: string
              type: object
            conditional_cases:
              additionalProperties:
                type: string
              type: object
            model_outcomes:
              additionalProperties:
                type: string
              type: object
            percentage_buckets:
              additionalProperties:
                type: string
              type: object
          type: object
        request_id:
          description: Seeds the percentage-split draw so a run is reproducible.
          type: string
        version_number:
          description: Simulate a deployed version instead of the draft.
          type: integer
      type: object
    DynamicRouteSimulationResult:
      properties:
        overrides:
          properties:
            classifier_cases:
              additionalProperties:
                type: string
              type: object
            conditional_cases:
              additionalProperties:
                type: string
              type: object
            model_outcomes:
              additionalProperties:
                type: string
              type: object
            percentage_buckets:
              additionalProperties:
                type: string
              type: object
          type: object
        path:
          items:
            properties:
              model:
                type: string
              node_id:
                type: string
              node_label:
                type: string
              node_type:
                type: string
              outcome:
                type: string
              output:
                type: string
              ranked_models:
                items:
                  type: string
                type: array
              target_node_id:
                type: string
            required:
              - node_id
              - node_type
            type: object
          type: array
        result:
          type: object
        status:
          type: string
      required:
        - status
        - path
        - overrides
      type: object
    ErrorResponse:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              description: Any value
            message:
              type: string
          required:
            - code
            - message
          type: object
        meta:
          type: object
      required:
        - error
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http
    ManagementBearer:
      bearerFormat: Management API Key
      description: >-
        Management API authentication. Pass an `op-mak-…` management token as a
        Bearer token. Runtime `op-…` API keys are rejected with 403 — they
        belong on the data-plane endpoints. Mint a management key from the
        platform UI under Settings → API keys.
      scheme: bearer
      type: http

````