{"uid":"cap_VNo0QxbTYI5EiKcDuCn5F","slug":"writerslogic-openapi-slice-extractor-93e0e54c","name":"WritersLogic OpenAPI Slice Extractor","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/openapi-slice?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"path":{"type":"string","maxLength":500,"description":"Concrete or templated path, e.g. /pets/{petId} or /pets/42."},"spec":{"description":"The OpenAPI document as a JSON object (use specText for YAML)."},"method":{"enum":["get","put","post","delete","options","head","patch","trace"],"type":"string"},"specText":{"type":"string","maxLength":400000,"description":"The OpenAPI document as JSON text (up to 400000 characters) or YAML text (up to 50000 characters)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4p9zMpsIjM9iu0ZhHlaqd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts a single operation from an OpenAPI 3.0.x/3.1.x document and returns a minimal valid OpenAPI document containing only that operation and its transitive $ref dependencies.","exampleAgentPrompt":"Can you slice out just the POST /pets endpoint from this OpenAPI spec and give me a minimal valid OpenAPI document with all its schemas and $refs included? Here's the full spec as YAML text.","exampleUseCases":[{"title":"Inject one endpoint into an LLM prompt","prompt":"I have a giant OpenAPI spec with hundreds of endpoints and I want to put just the GET /orders/{orderId} operation into my prompt. Can you extract that path and method from the spec JSON I'm pasting here and return a minimal OpenAPI document with all the referenced schemas?"},{"title":"Build a tool definition for an AI agent","prompt":"I need to give my AI agent a tool definition for only the POST /payments endpoint from our API. Can you pull out that operation from this OpenAPI YAML, keeping all the $refs and component schemas it depends on?"},{"title":"Debug a specific API route's schema","prompt":"I'm only interested in the PATCH /users/{userId}/profile operation from this OpenAPI file. Can you extract it along with all its request body schemas and response definitions so I can review just that part?"}],"resultDescription":"A smaller, fully valid OpenAPI 3.0.x or 3.1.x document containing: the requested operation and its HTTP method, path-level parameters and servers, and the transitive closure of all locally referenced components (schemas, parameters, requestBodies, responses, headers, examples, links, callbacks, pathItems, securitySchemes, discriminator mappings). External file or URL $refs are listed with an 'unsupported' status rather than silently dropped. References remain as $refs (not dereferenced).","failureModes":["Path not found in the spec — returns an error if the specified path/method combination does not exist","Invalid OpenAPI version — only 3.0.x and 3.1.x are supported; older Swagger 2.0 specs will fail","Malformed JSON/YAML — if specText cannot be parsed, an error is returned","specText exceeds 400,000 character JSON limit or 50,000 character YAML limit","External $refs listed but not resolved — callers expecting dereferenced output will be disappointed","Both spec (object) and specText provided — ambiguous input may cause unexpected behavior"],"whenToPreferThis":"Use this endpoint when you need to put a single API operation into an LLM prompt or agent tool definition and the full OpenAPI document is too large to include. It is the right choice when you need all $ref dependencies transitively resolved and kept as $refs (not dereferenced), and when you want external references explicitly flagged rather than silently ignored. Prefer it over manual extraction when the spec has deeply nested component references that are tedious to trace by hand.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:58:09.870Z","isFirstParty":false,"canonicalSlug":"writerslogic-openapi-slice-extractor-93e0e54c"}