# OpenAPI to k6 Load Test Script Generator

> OpenAPI to k6 Load Test Script Generator is a paid API for AI agents from 47-85-47-24.sslip.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Generates a built-in k6 smoke/load-test JavaScript script from an OpenAPI 3.x specification without executing the target API

## Facts

- Endpoint: GET https://47-85-47-24.sslip.io/v1/openapi-k6
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openapi-to-k6-load-test-script-generator-209ed179
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_290Z4xlCTPvJOQ59sK6Ct

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability openapi-to-k6-load-test-script-generator-209ed179
```

Example prompt: Generate a k6 load test script using the built-in orders-api-load-test scenario — I want a JavaScript file I can run locally with k6 without it actually hitting the live API.

## When to prefer this

Use this endpoint when you need a ready-to-run k6 load test script generated from an OpenAPI 3.x contract without needing to execute the live target API — ideal for CI/CD pipelines, sandbox environments, or pre-production test scaffolding. Prefer this over manual k6 scripting when you want instant, schema-driven test generation aligned to real API operations.

## Known failure modes

- Missing required 'input' field returns validation error
- Invalid HTTP method (not GET/HEAD/DELETE) returns 400
- Unsupported scenario value returns 422
- Payment not included or insufficient USDC balance returns 402
- Malformed OpenAPI spec in built-in scenario causes warning list to populate
- Service unavailable returns 503

## How this service works

An autonomous paid API accepting USDC on Base mainnet.

## Output

Returns a k6 JavaScript load test script (load_test.js) including the script code, a ready-to-run k6 command, the number of operations and requests covered, how many write requests were gated, any warnings, and generator metadata like ID and version.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "scenario": {
       "enum": [
        "orders-api-load-test"
       ],
       "type": "string",
       "description": "Built-in paid k6 generation scenario"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "generator_id",
      "generator_version",
      "filename",
      "framework",
      "operations_count",
      "requests_count",
      "write_requests_gated",
      "script_code",
      "run_command",
      "warnings"
     ],
     "properties": {
      "filename": {
       "type": "string",
       "const": "load_test.js"
      },
      "warnings": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "framework": {
       "type": "string",
       "const": "k6"
      },
      "run_command": {
       "type": "string"
      },
      "script_code": {
       "type": "string"
      },
      "generator_id": {
       "type": "string"
      },
      "requests_count": {
       "type": "integer",
       "minimum": 1
      },
      "operations_count": {
       "type": "integer",
       "minimum": 1
      },
      "generator_version": {
       "type": "string"
      },
      "write_requests_gated": {
       "type": "integer",
       "minimum": 0
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "filename": "load_test.js",
  "warnings": [
   "Generated load tests use sample values and should be reviewed before use."
  ],
  "framework": "k6",
  "run_command": "k6 run load_test.js",
  "script_code": "import http from \"k6/http\";\nimport { check } from \"k6\";\nexport default function () { check(http.get(\"https://api.example.com/orders/test\"), { \"status 200\": (r) => r.status === 200 }); }\n",
  "generator_id": "loadforge-48d94443c37a1bb4",
  "requests_count": 1,
  "operations_count": 1,
  "generator_version": "loadforge-openapi-k6/1.0",
  "write_requests_gated": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openapi-to-k6-load-test-script-generator-209ed179/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 47-85-47-24.sslip.io](https://www.zero.xyz/host/47-85-47-24.sslip.io/llms.txt)
