{"uid":"cap_OIHIn4SGZh50gZNWcqNz8","slug":"agent402-tools-openapi-to-curl-command-builder-603d48c5","name":"agent402.tools OpenAPI-to-cURL Command Builder","description":"Build a runnable curl command for one operation in an OpenAPI 3.x or Swagger 2.x spec. Locate the operation by operationId (preferred) or by method + path, substitute path parameters using the spec's example values, include required query and header parameters with their example values, and attach a JSON body when the operation defines one. Returns the structured request (method, url, headers, body) alongside the assembled curl string with POSIX single-quote escaping.","url":"https://agent402.tools/api/openapi-to-curl","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"path":{"description":"Path template (use with `method` if no operationId)"},"spec":{"description":"OpenAPI/Swagger document (object or JSON string)"},"method":{"description":"HTTP method (use with `path` if no operationId)"},"operationId":{"description":"operationId of the operation to render (preferred)"}}},"responseSchema":{"type":"json","example":{"url":"https://api.example.com/users/u_42?fields=name%2Cemail","body":null,"curl":"curl -X GET 'https://api.example.com/users/u_42?fields=name%2Cemail'","method":"GET","headers":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5DP3PqRXDRm7vQ0fb0aUW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a runnable curl command for a specified operation in an OpenAPI 3.x or Swagger 2.x spec, resolving path parameters, required query params, and headers using example values from the spec.","exampleAgentPrompt":"Take this OpenAPI spec and build me a runnable curl command for the 'createUser' operation — use the example values from the spec to fill in path params and required headers.","exampleUseCases":null,"resultDescription":"A complete, runnable curl command string with path parameters substituted, required query parameters and headers included, based on example values found in the provided OpenAPI or Swagger spec.","failureModes":["operationId not found in spec — returns error indicating missing or mismatched operationId","spec is invalid or unparseable JSON/YAML — returns parse error","method + path combo does not match any operation — returns not found error","required path parameter has no example value in spec — may return incomplete or placeholder curl command","malformed input schema — returns validation error"],"whenToPreferThis":"Use this endpoint when you have an OpenAPI 3.x or Swagger 2.x spec and need a ready-to-run curl command for a specific operation, especially when you want parameters auto-filled from spec examples rather than writing the curl command manually.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:04.384Z","isFirstParty":false}