# TestForge OpenAPI Pytest Generator

> TestForge OpenAPI Pytest 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-14).

Generates a runnable pytest/httpx API test module from an OpenAPI 3.x contract using the built-in orders-api-tests scenario, without executing the target API

## Facts

- Endpoint: GET https://47-85-47-24.sslip.io/v1/openapi-pytest
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/testforge-openapi-pytest-generator-e9841cff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yGy8F63035fwTtkP7CW7m

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 testforge-openapi-pytest-generator-e9841cff
```

Example prompt: Generate a runnable pytest and httpx test module for the orders API — use the orders-api-tests scenario and give me the Python test code, filename, and any requirements or warnings.

## When to prefer this

Choose this endpoint when you need to instantly scaffold a pytest+httpx test suite from an OpenAPI 3.x contract without having to run or access the live target API. Ideal for CI pipeline bootstrapping, spec-driven TDD, or quickly producing a test harness for a new service. Prefer this over manual test writing or Postman-based approaches when Python/pytest is the target test framework.

## Known failure modes

- Invalid or missing scenario parameter returns an error — only 'orders-api-tests' enum value is accepted
- Missing required 'input' object or 'method' field returns a validation error
- Unsupported HTTP method (e.g. POST, PUT) returns an error — only GET, HEAD, DELETE are accepted
- Payment failure or insufficient USDC balance blocks the request via x402 protocol
- Service unavailable at the sslip.io host returns a connection error

## How this service works

An autonomous paid API accepting USDC on Base mainnet.

## Output

Returns a JSON object containing: generator_id, generator_version, filename (test_api.py), framework (pytest+httpx), operations_count, tests_count, write_tests_gated count, test_code (full Python source), requirements array (pip packages needed), and warnings array. The test_code field contains a complete, importable pytest module ready to run against an API.

## 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-tests"
       ],
       "type": "string",
       "description": "Built-in paid test-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",
      "tests_count",
      "write_tests_gated",
      "test_code",
      "requirements",
      "warnings"
     ],
     "properties": {
      "filename": {
       "type": "string",
       "const": "test_api.py"
      },
      "warnings": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "framework": {
       "type": "string",
       "const": "pytest+httpx"
      },
      "test_code": {
       "type": "string"
      },
      "tests_count": {
       "type": "integer",
       "minimum": 1
      },
      "generator_id": {
       "type": "string"
      },
      "requirements": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "operations_count": {
       "type": "integer",
       "minimum": 1
      },
      "generator_version": {
       "type": "string"
      },
      "write_tests_gated": {
       "type": "integer",
       "minimum": 0
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "filename": "test_api.py",
  "warnings": [
   "Generated tests use sample values and should be reviewed before production use."
  ],
  "framework": "pytest+httpx",
  "test_code": "import httpx\n\ndef test_get_order():\n    response = httpx.get('https://api.example.com/orders/test')\n    assert response.status_code == 200\n",
  "tests_count": 1,
  "generator_id": "testforge-7a4c1a6c319ac673",
  "requirements": [
   "pytest>=8",
   "httpx>=0.27"
  ],
  "operations_count": 1,
  "generator_version": "testforge-openapi-pytest/1.0",
  "write_tests_gated": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/testforge-openapi-pytest-generator-e9841cff/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)
