---
title: "Creates a scenario from the resolved options of a K6 script, as printed by `k6 inspect --execution-requirements`"
method: POST
path: "/runtime/scenarios/k6/{projectId}"
tags: ["Runtime - Scenarios - K6"]
---

# Creates a scenario from the resolved options of a K6 script, as printed by \`k6 inspect --execution-requirements\`

`POST /runtime/scenarios/k6/{projectId}`

## Request

- Base URL: `https://api.octoperf.com`
- URL: `https://api.octoperf.com/runtime/scenarios/k6/{projectId}`
- Auth: none declared

## Path parameters

- `projectId` string, required

## Request body

- K6ScenarioRequest
  - `virtualUserId` string
  - `entrypointFileName` string
  - `providerId` string
  - `location` string
  - `name` string
  - `options` K6Options
    - `scenarios` object, nullable

## Response `200`

OK

- K6ScenarioConversion
  - `scenario` Scenario
    - `id` string, nullable
    - `userId` string, nullable
    - `projectId` string, nullable
    - `name` string
    - `description` string, nullable
    - `userProfiles` UserProfile[], nullable
      - `id` string, nullable
      - `name` string, nullable
      - `virtualUserId` string
      - `providerId` string
      - `location` string
      - `load` unknown
      - `memory` MemorySettings
        - `vuMb` number, double
      - `iterations` integer
      - `engine` unknown
    - `mode` 'STANDARD' | 'FUNCTIONAL', nullable
    - `created` string, date-time, nullable
    - `lastModified` string, date-time, nullable
    - `tags` string[], nullable
  - `unconverted` K6Unconverted[]
    - `scenario` string
    - `kind` 'NO_SCENARIOS' | 'OPEN_MODEL' | 'UNKNOWN_EXECUTOR' | 'SHARED_ITERATIONS' | 'START_TIME_WITH_ITERATIONS' | 'GRACEFUL_RAMP_DOWN' | 'SCENARIO_TAGS'
    - `outcome` 'NOT_CONVERTED' | 'APPROXIMATED' | 'IGNORED'

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests

## Changes

- **2026-11-03** `637a8f8ce8cf`: 1 info
  - api operation id `R_2` removed and replaced with `I_4`
- **2026-10-30** `fc0ab021d8d3`: 1 info
  - api operation id `F_4` removed and replaced with `R_2`
- **2026-10-29** `6fb7a9d5eb1c`: 1 info
  - api operation id `U_6` removed and replaced with `F_4`
- **2026-10-28** `6fc0f4ece308`: 1 info
  - api operation id `X` removed and replaced with `U_6`
- **2026-10-27** `d04c0ffc592f`: 1 info
  - api operation id `W_2` removed and replaced with `X`

[Operation history](https://skmtc.dev/octoperf/apis/octoperf-api/changes/runtime/scenarios/k6/:projectId/post.md)

---

[API](https://skmtc.dev/octoperf/apis/octoperf-api.md) - [All operations](https://skmtc.dev/octoperf/apis/octoperf-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octoperf/apis/octoperf-api/revisions/637a8f8ce8cf?raw)
