API Acre · Developer Openapi Test Generate

by API Acre

POSTBaseSolana

$0.1

per call · USD Coin on Base

Generate deterministic, syntax-validated pytest and requests smoke tests from a caller-supplied OpenAPI 3 document, with mutating operations disabled by default.

Endpoint

POST https://apiacre.com/v1/developer/openapi-test-generate

1

Calls / 30d

1

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://apiacre.com/v1/developer/openapi-test-generate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": "{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Widget API\",\"version\"...",
    "format": "json",
    "include_optional": false,
    "max_operations": 25,
    "timeout_seconds": 20
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://apiacre.com/v1/developer/openapi-test-generate" \
  -H "Content-Type: application/json" \
  -d '{"document":"{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Widget API\",\"version\"...","format":"json","include_optional":false,"max_operations":25,"timeout_seconds":20}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "data": {
    "apiTitle": "Widget API",
    "baseUrlDefault": "https://api.example.com",
    "documentSha256": "2f27879b24323466c5dbca7df9bf137561b826bd43c318b8642b92f04...",
    "environment": {
      "allowMutatingTests": "API_ALLOW_MUTATING_TESTS",
      "apiKey": "API_KEY",
      "baseUrl": "API_BASE_URL",
      "bearerToken": "API_BEARER_TOKEN"
    },
    "execution": {
      "generatedTestsExecuted": false,
      "networkRequestsMade": false,
      "sourceSyntaxValidated": true
    },
    "generatedTestCount": 2,
    "guardedMutationCount": 1,
    "openapiVersion": "3.1.0",
    "operationCount": 2,
    "operations": [
      {
        "method": "GET",
        "operationId": "getHealth",
        "path": "/health",
        "testName": "test_gethealth"
      }
    ],
    "requirements": [
      "pytest>=8",
      "requests>=2.31"
    ],
    "source": "\"\"\"Generated API smoke tests. Review targets and payloads...",
    "sourceFileName": "test_openapi_generated.py",
    "sourceSha256": "44d05573bd64ef63deb934c9bef7b1ed6c618e4093c9cc7eee8e3a55b...",
    "truncated": false,
    "warnings": []
  },
  "meta": {
    "cached": false,
    "duration_ms": 42,
    "next_actions": [
      {
        "method": "POST",
        "reason": "Measure the generated pytest module's structure, complexi...",
        "service": "developer.code-metrics",
        "title": "Code metrics"
      }
    ],
    "sources": [],
    "warnings": []
  },
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "developer.openapi-test-generate",
  "version": "1"
}

Payment details

Pay to0xa0bfa4f07281c9b248dc3aed2217836bca24869b
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from API Acre & similar services