Runloop Scenario API

The Scenario API from Runloop — 17 operation(s) for scenario.

Operations 21

POST /v1/scenarios Create a Scenario. #
GET /v1/scenarios List Scenarios. #
GET /v1/scenarios/list_public List Public Scenarios. #
GET /v1/scenarios/metadata/keys List available scenario metadata keys. #
GET /v1/scenarios/metadata/keys/{key}/values List values for a specific scenario metadata key. #
GET /v1/scenarios/runs List ScenarioRuns. #
GET /v1/scenarios/runs/{id} Get a previously created ScenarioRun. #
POST /v1/scenarios/runs/{id}/cancel Cancel a Scenario run. #
POST /v1/scenarios/runs/{id}/complete Complete a ScenarioRun. #
POST /v1/scenarios/runs/{id}/download_logs Download logs for a Scenario run. #
POST /v1/scenarios/runs/{id}/score Score a ScenarioRun. #
POST /v1/scenarios/scorers Create a custom scenario scorer. #
GET /v1/scenarios/scorers List Scenario Scorers. #
POST /v1/scenarios/scorers/{id} Update a custom scenario scorer. #
GET /v1/scenarios/scorers/{id} Retrieve Scenario Scorer. #
POST /v1/scenarios/start_run Start a new ScenarioRun. #
POST /v1/scenarios/{id} Update a Scenario. #
GET /v1/scenarios/{id} Get a Scenario. #
POST /v1/scenarios/{id}/archive Archive a Scenario. #
GET /v1/scenarios/{id}/runs Get the runs for a Scenario. #
POST /v1/scenarios/{id}/unarchive Unarchive a Scenario. #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-devbox-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-execution-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-snapshot-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-tunnel-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-launch-parameters-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-structure/runloop-devbox-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-blueprint-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-benchmark-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-benchmark-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-scenario-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-agent-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-axon-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-object-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-secret-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-network-policy-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-gateway-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-mcp-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-api-key-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/json-schema/runloop-restricted-key-schema.json

Other Resources

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/runloop-ai-scenario-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

runloop-ai-scenario-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Runloop agents Scenario API
  version: '0.1'
  description: Register, version, and mount Agents — packaged agent definitions sourced from Git, npm, pip, or storage objects that can be installed on Devboxes for fast, reproducible agent execution.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
- url: https://api.runloop.ai
  description: Runloop API
  variables: {}
security:
- bearerAuth: []
tags:
- name: Scenario
paths:
  /v1/scenarios:
    post:
      tags:
      - Scenario
      summary: Create a Scenario.
      description: Create a Scenario, a repeatable AI coding evaluation test that defines the starting environment as well as evaluation success criteria.
      operationId: createScenario
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioCreateParameters'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
    get:
      tags:
      - Scenario
      summary: List Scenarios.
      description: List all Scenarios matching filter.
      operationId: listScenarios
      parameters:
      - name: name
        in: query
        description: Query for Scenarios with a given name.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: benchmark_id
        in: query
        description: Filter scenarios by benchmark ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: validation_type
        in: query
        description: Filter by validation type
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionListView'
      deprecated: false
  /v1/scenarios/list_public:
    get:
      tags:
      - Scenario
      summary: List Public Scenarios.
      description: List all public scenarios matching filter.
      operationId: listPublicScenarios
      parameters:
      - name: name
        in: query
        description: Query for Scenarios with a given name.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionListView'
      deprecated: false
  /v1/scenarios/metadata/keys:
    get:
      tags:
      - Scenario
      summary: List available scenario metadata keys.
      description: Returns a list of all available metadata keys that can be used for filtering scenarios.
      operationId: getScenarioMetadataKeys
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataKeysView'
      deprecated: false
  /v1/scenarios/metadata/keys/{key}/values:
    get:
      tags:
      - Scenario
      summary: List values for a specific scenario metadata key.
      description: Returns a list of all values that exist for a specific metadata key across all scenarios.
      operationId: getScenarioMetadataValues
      parameters:
      - name: key
        in: path
        description: The metadata key to get values for.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValuesView'
        '400':
          description: Invalid metadata key provided.
      deprecated: false
  /v1/scenarios/runs:
    get:
      tags:
      - Scenario
      summary: List ScenarioRuns.
      description: List all ScenarioRuns matching filter.
      operationId: listScenarioRuns
      parameters:
      - name: name
        in: query
        description: Filter by name
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: state
        in: query
        description: Filter by state
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: benchmark_run_id
        in: query
        description: Filter by benchmark run ID
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: scenario_id
        in: query
        description: Filter runs associated to Scenario given ID
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunListView'
      deprecated: false
  /v1/scenarios/runs/{id}:
    get:
      tags:
      - Scenario
      summary: Get a previously created ScenarioRun.
      description: Get a ScenarioRun given ID.
      operationId: getScenarioRun
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/runs/{id}/cancel:
    post:
      tags:
      - Scenario
      summary: Cancel a Scenario run.
      description: Cancel a currently running Scenario run. This will shutdown the underlying Devbox resource.
      operationId: cancelScenarioRun
      parameters:
      - name: id
        in: path
        description: The Scenario Run ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/runs/{id}/complete:
    post:
      tags:
      - Scenario
      summary: Complete a ScenarioRun.
      description: Complete a currently running ScenarioRun. Calling complete will shutdown underlying Devbox resource.
      operationId: completeScenarioRun
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/runs/{id}/download_logs:
    post:
      tags:
      - Scenario
      summary: Download logs for a Scenario run.
      description: Download a zip file containing all logs for a Scenario run from the associated devbox.
      operationId: downloadScenarioRunLogs
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/zip:
              schema:
                format: binary
          headers:
            Content-Type:
              description: application/zip
              required: true
              schema:
                type: string
            Content-Disposition:
              description: attachment; filename="scenario_run_logs.zip"
              required: true
              schema:
                type: string
      deprecated: false
  /v1/scenarios/runs/{id}/score:
    post:
      tags:
      - Scenario
      summary: Score a ScenarioRun.
      description: Score a currently running ScenarioRun.
      operationId: scoreScenarioRun
      parameters:
      - name: id
        in: path
        description: The ScenarioRun ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/scorers:
    post:
      tags:
      - Scenario
      summary: Create a custom scenario scorer.
      description: Create a custom scenario scorer.
      operationId: createCustomScorer
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomScorerParams'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
        '400':
          description: Custom scorer type already exists.
      deprecated: false
    get:
      tags:
      - Scenario
      summary: List Scenario Scorers.
      description: List all Scenario Scorers matching filter.
      operationId: listScenarioScorers
      parameters:
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorersListView'
      deprecated: false
  /v1/scenarios/scorers/{id}:
    post:
      tags:
      - Scenario
      summary: Update a custom scenario scorer.
      description: Update a scenario scorer.
      operationId: updateCustomScorer
      parameters:
      - name: id
        in: path
        description: The Scorer ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomScorerParams'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
      deprecated: false
    get:
      tags:
      - Scenario
      summary: Retrieve Scenario Scorer.
      description: Retrieve Scenario Scorer.
      operationId: retrieveScenarioScorers
      parameters:
      - name: id
        in: path
        description: The Scorer ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
      deprecated: false
  /v1/scenarios/start_run:
    post:
      tags:
      - Scenario
      summary: Start a new ScenarioRun.
      description: Start a new ScenarioRun based on the provided Scenario.
      operationId: startScenarioRun
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartScenarioRunParameters'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRunView'
      deprecated: false
  /v1/scenarios/{id}:
    post:
      tags:
      - Scenario
      summary: Update a Scenario.
      description: Update a Scenario. Fields that are null will preserve the existing value. Fields that are provided (including empty values) will replace the existing value entirely.
      operationId: updateScenario
      parameters:
      - name: id
        in: path
        description: The Scenario ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioUpdateParameters'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
    get:
      tags:
      - Scenario
      summary: Get a Scenario.
      description: Get a previously created scenario.
      operationId: getScenario
      parameters:
      - name: id
        in: path
        description: The Scenario ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
  /v1/scenarios/{id}/archive:
    post:
      tags:
      - Scenario
      summary: Archive a Scenario.
      description: Archive a previously created Scenario. The scenario will no longer appear in list endpoints but can still be retrieved by ID.
      operationId: archiveScenario
      parameters:
      - name: id
        in: path
        description: The ID of the Scenario to archive.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
        '403':
          description: Cannot archive public scenarios.
        '404':
          description: Scenario not found.
      deprecated: false
  /v1/scenarios/{id}/runs:
    get:
      tags:
      - Scenario
      summary: Get the runs for a Scenario.
      description: Get a previously created scenario.
      operationId: getScenarioRuns
      parameters:
      - name: id
        in: path
        description: The Scenario ID.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      - name: limit
        in: query
        description: The limit of items to return. Default is 20. Max is 5000.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: integer
          format: int32
      - name: starting_after
        in: query
        description: Load the next page of data starting after the item with the given ID.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: string
      - name: include_total_count
        in: query
        description: If true (default), includes total_count in the response. Set to false to skip the count query for better performance on large datasets.
        required: false
        deprecated: false
        allowEmptyValue: true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
      deprecated: false
  /v1/scenarios/{id}/unarchive:
    post:
      tags:
      - Scenario
      summary: Unarchive a Scenario.
      description: Unarchive a previously archived Scenario. The scenario will appear in list endpoints again.
      operationId: unarchiveScenario
      parameters:
      - name: id
        in: path
        description: The ID of the Scenario to unarchive.
        required: true
        deprecated: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioDefinitionView'
        '403':
          description: Cannot unarchive public scenarios.
        '404':
          description: Scenario not found.
      deprecated: false
components:
  schemas:
    ScenarioEnvironment:
      type: object
      additionalProperties: false
      description: ScenarioEnvironmentParameters specify the environment in which a Scenario will be run.
      properties:
        blueprint_id:
          type:
          - string
          - 'null'
          description: Use the blueprint with matching ID.
        snapshot_id:
          type:
          - string
          - 'null'
          description: Use the snapshot with matching ID.
        launch_parameters:
          $ref: '#/components/schemas/LaunchParameters'
          description: Optional launch parameters to apply to the devbox environment at launch.
        working_directory:
          type:
          - string
          - 'null'
          description: The working directory where the agent is expected to fulfill the scenario. Scoring functions also run from the working directory.
    ScenarioRunListView:
      type: object
      additionalProperties: false
      properties:
        runs:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioRunView'
          description: List of ScenarioRuns matching filter.
        has_more:
          type: boolean
        total_count:
          type:
          - integer
          - 'null'
          format: int32
      required:
      - runs
      - has_more
    ScoringContractResultView:
      type: object
      additionalProperties: false
      description: A ScoringContractResultView represents the result of running all scoring functions on a given input context.
      properties:
        score:
          type: number
          format: float
          description: Total score for all scoring contracts. This will be a value between 0 and 1.
        scoring_function_results:
          type: array
          items:
            $ref: '#/components/schemas/ScoringFunctionResultView'
          description: List of all individual scoring function results.
      required:
      - score
      - scoring_function_results
    BrokerMount:
      type: object
      additionalProperties: false
      properties:
        axon_id:
          type: string
          description: The ID of the axon event stream to mount onto the Devbox.
        protocol:
          $ref: '#/components/schemas/BrokerMountProtocol'
          description: The protocol used by the broker to deliver events to the agent.
        agent_binary:
          type:
          - string
          - 'null'
          description: Binary to launch the agent (e.g., 'opencode'). Used by protocols that launch a subprocess (acp, claude_json).
        working_directory:
          type:
          - string
          - 'null'
          description: Working directory in which to launch the agent binary. Defaults to the home directory if not specified.
        launch_args:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Arguments to pass to the agent command (e.g., ['acp']). Used by protocols that launch a subprocess (acp, claude_json).
        type:
          type: string
          enum:
          - broker_mount
          default: broker_mount
      required:
      - axon_id
      - type
    ScoringContract:
      type: object
      additionalProperties: false
      description: InputContextView specifies the problem statement along with all additional context for a Scenario.
      properties:
        scoring_function_parameters:
          type: array
          items:
            $ref: '#/components/schemas/ScoringFunction'
          description: A list of scoring functions used to evaluate the Scenario.
      required:
      - scoring_function_parameters
    LaunchParameters:
      type: object
      additionalProperties: false
      description: LaunchParameters enable you to customize the resources available to your Devbox as well as the environment set up that should be completed before the Devbox is marked as 'running'.
      properties:
        launch_commands:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Set of commands to be run at launch time, before the entrypoint process is run.
        resource_size_request:
          $ref: '#/components/schemas/ResourceSize'
          description: 'Preset Devbox resources (vCPU, RAM in GiB, ephemeral disk in GiB). If not set, SMALL is used. X_SMALL: 0.5 vCPU, 1 GiB RAM, 4 GiB disk. SMALL: 1 vCPU, 2 GiB RAM, 4 GiB disk. MEDIUM: 2 vCPU, 4 GiB RAM, 8 GiB disk. LARGE: 2 vCPU, 8 GiB RAM, 16 GiB disk. X_LARGE: 4 vCPU, 16 GiB RAM, 16 GiB disk. XX_LARGE: 8 vCPU, 32 GiB RAM, 16 GiB disk. CUSTOM_SIZE: set custom_cpu_cores, custom_gb_memory, and optionally custom_disk_size.'
        available_ports:
          type:
          - array
          - 'null'
          items:
            type: integer
            format: int32
          description: '[Deprecated] A list of ports to make available on the Devbox. This field is ignored.'
        keep_alive_time_seconds:
          type:
          - integer
          - 'null'
          format: int64
          description: Time in seconds after which Devbox will automatically shutdown. Default is 1 hour. Maximum is 48 hours (172800 seconds).
        after_idle:
          $ref: '#/components/schemas/IdleConfigurationParameters'
          description: Configure Devbox lifecycle based on idle activity. If after_idle is set, Devbox will ignore keep_alive_time_seconds. If both after_idle and lifecycle.after_idle are set, they must have the same value. Use lifecycle.after_idle instead.
        custom_cpu_cores:
          type:
          - integer
          - 'null'
          format: int32
          description: Custom CPU cores. Must be 0.5, 1, or a multiple of 2. Max is 16.
        custom_gb_memory:
          type:
          - integer
          - 'null'
          format: int32
          description: Custom memory size in GiB. Must be 1 or a multiple of 2. Max is 64GiB.
        custom_disk_size:
          type:
          - integer
          - 'null'
          format: int32
          description: Custom disk size in GiB. Must be a multiple of 2. Min is 2GiB, max is 64GiB.
        architecture:
          $ref: '#/components/schemas/Architecture'
          description: The target architecture for the Devbox. If unset, defaults to x86_64.
        user_parameters:
          $ref: '#/components/schemas/UserParameters'
          description: Specify the user for execution on Devbox. If not set, default `user` will be used.
        required_services:
          type:
          - array
          - 'null'
          items:
            type: string
          description: A list of ContainerizedService names to be started when a Devbox is created. A valid ContainerizedService must be specified in Blueprint to be started.
        network_policy_id:
          type:
          - string
          - 'null'
          description: (Optional) ID of the network policy to apply to Devboxes launched with these parameters. When set on a Blueprint launch parameters, Devboxes created from it will inherit this policy unless explicitly overridden.
        lifecycle:
          $ref: '#/components/schemas/LifecycleConfigurationParameters'
          description: Lifecycle configuration for idle and resume behavior. Configure idle policy via lifecycle.after_idle (if both this and the top-level after_idle are set, they must match) and resume triggers via lifecycle.resume_triggers.
    ScenarioDefinitionListView:
      type: object
      additionalProperties: false
      properties:
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioDefinitionView'
          description: List of Scenarios matching filter.
        has_more:
          type: boolean
        total_count:
          type:
          - integer
          - 'null'
          format: int32
      required:
      - scenarios
      - has_more
    FileMount:
      type: object
      additionalProperties: false
      properties:
        target:
          type: string
          description: Target path where the file should be mounted.
        content:
          type: string
          description: Content of the file to mount.
        type:
          type: string
          enum:
          - file_mount
          default: file_mount
      required:
      - target
      - content
      - type
    InputContextUpdate:
      type: object
      additionalProperties: false
      properties:
        problem_statement:
          type:
          - string
          - 'null'
          description: The problem statement for the Scenario.
        additional_context:
          type:
          - object
          - 'null'
          description: Additional JSON structured input context.
    InputContext:
      type: object
      additionalProperties: false
      description: InputContextView specifies the problem statement along with all additional context for a Scenario.
      properties:
        problem_statement:
          type: string
          description: The problem statement for the Scenario.
        additional_context:
          type:
          - object
          - 'null'
          description: Additional JSON structured input context.
      required:
      - problem_statement
    LifecycleConfigurationParameters:
      type: object
      additionalProperties: false
      description: Lifecycle configuration for Devbox idle and resume behavior. Configure idle policy via after_idle and resume triggers via resume_triggers.
      properties:
        after_idle:
          $ref: '#/components/schemas/IdleConfigurationParameters'
          description: Configure Devbox lifecycle based on idle activity. If both this and the top-level after_idle are set, they must have the same value. Prefer this field for new integrations.
        resume_triggers:
          $ref: '#/components/schemas/ResumeTriggers'
          description: Triggers that can resume a suspended Devbox.
    ScenarioUpdateParameters:
      type: object
      additionalProperties: false
      description: ScenarioUpdateParameters contain the set of parameters to update a Scenario. All fields are optional - null fields preserve existing values, provided fields replace entirely.
      properties:
        name:
          type:
          - string
          - 'null'
          description: Name of the scenario. Cannot be blank.
        input_context:
          $ref: '#/components/schemas/InputContextUpdate'
          description: The input context for the Scenario.
        scoring_contract:
          $ref: '#/components/schemas/ScoringContractUpdate'
          description: The scoring contract for the Scenario.
        environment_parameters:
          $ref: '#/components/schemas/ScenarioEnvironment'
          description: The Environment in which the Scenario will run.
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            type: string
          description: User defined metadata to attach to the scenario. Pass in empty map to clear.
        required_environment_variables:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Environment variables required to run the scenario. Pass in empty list to clear.
        required_secret_names:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Secrets required to run the scenario. Pass in empty list to clear.
        reference_output:
          type:
          - string
          - 'null'
          description: A string representation of the reference output to solve the scenario. Commonly can be the result of a git diff or a sequence of command actions to apply to the environment. Pass in empty string to clear.
        validation_type:
          $ref: '#/components/schemas/ValidationType'
          description: Validation strategy. Pass in empty string to clear.
        scorer_timeout_sec:
          type:
          - integer
          - 'null'
          format: int32
          description: Timeout for scoring in seconds. Default 30 minutes (1800s).
    ScenarioDefinitionView:
      type: object
      additionalProperties: false
      description: A ScenarioDefinitionView represents a repeatable AI coding evalu

# --- truncated at 32 KB (56 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/runloop-ai/refs/heads/main/openapi/runloop-ai-scenario-api-openapi.yml