Tools & Payable Endpoints (2)
$0.001 USD per OpenAPI/Swagger subgraph slice (x402 instant micropayment)
Scores OpenAPI/Swagger endpoints against a natural-language `query` (BM25 + boosted `operationId`, `summary`, `tags`, and path tokens) or explicit `operationIds`/`pathPatterns`, walks every reachable JSON Pointer `$ref` with cycle protection, prunes unused paths/components, and emits ready-to-use `curl` + TypeScript `fetch` snippets.
Why buy vs. DIY: Saves 50,000-250,000 prompt tokens per large enterprise OpenAPI spec ($0.15+ LLM input cost) while guaranteeing zero broken `#/components/...` `$ref` links or recursive schema crashes.
POST https://spec-slice.apikeg.com/v1/slice-openapi-spec ·
Full Parameter Spec ·
Markdown Spec
$0.001 USD per GraphQL SDL subgraph slice (x402 instant micropayment)
Parses GraphQL Schema Definition Language (`Query`, `Mutation`, `Subscription`, `type`, `input`, `interface`, `union`, `enum`, `scalar`), scores root fields against `query` or explicit `rootFields`, and emits a valid mini-SDL containing only selected root fields and the transitive closure of referenced types.
Why buy vs. DIY: Replaces heavyweight `graphql-js` AST bundlers on edge runtimes and shrinks 10,000-line federated GraphQL schemas into minimal, copy-pasteable mini-SDL + sample operations.
POST https://spec-slice.apikeg.com/v1/slice-graphql-schema ·
Full Parameter Spec ·
Markdown Spec
Quickstart: MCP, x402 & Optional Bearer API Key
1. Streamable HTTP MCP Config (com.apikeg/spec-slice)
{
"mcpServers": {
"spec-slice": {
"type": "streamable-http",
"url": "https://spec-slice.apikeg.com/mcp"
}
}
}
Using a Monthly Stripe Plan? Get your per-email ak_live_... key at https://apikeg.com/account ($5 / $20 / $50 monthly tiers) and pass header Authorization: Bearer ak_live_... on REST or MCP requests.
2. Free Schema Dry-Run ($0.00)
curl -X POST "https://spec-slice.apikeg.com/v1/slice-openapi-spec?dry_run=true" \
-H "Content-Type: application/json" \
-d '{"query":"create credit note and refund invoice","maxOperations":2,"compactDescriptions":true,"includeSnippets":true,"spec":{"openapi":"3.1.0","info":{"title":"Billing API","version":"2.4.0"},"servers":[{"url":"https://api.billing.example.com"}],"paths":{"/v1/invoices/{invoiceId}/refunds":{"post":{"operationId":"refundInvoice","summary":"Refund an invoice","tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Refund created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}}}}},"/v1/warehouses":{"get":{"operationId":"listWarehouses","summary":"List inventory warehouses","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Warehouse"}}}}}}}},"components":{"schemas":{"RefundRequest":{"type":"object","required":["amountCents"],"properties":{"amountCents":{"type":"integer"}}},"Refund":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}}},"Warehouse":{"type":"object","properties":{"id":{"type":"string"},"location":{"type":"string"}}}}}}}'
Frequently Asked Questions
Why should an AI agent call Spec Slice — OpenAPI & GraphQL Subgraph Extractor instead of writing custom code?
Eliminates context-window overflow on massive Stripe/GitHub/Shopify specs, avoids broken $ref pointers or infinite recursive schema loops, and saves $0.10-$0.50 in LLM input tokens for $0.001.
How do I connect Spec Slice — OpenAPI & GraphQL Subgraph Extractor to Claude, Cursor, or an MCP client?
Connect directly to the stateless Streamable HTTP MCP endpoint at https://spec-slice.apikeg.com/mcp (registry ID: com.apikeg/spec-slice). No API keys or OAuth accounts are required; initialize and tools/list are 100% free.
How much does Spec Slice — OpenAPI & GraphQL Subgraph Extractor cost per API or MCP call?
Pay per call with zero signup via HTTP 402 (x402 v2 USDC on Base): slice_openapi_spec ($0.001 USD per OpenAPI/Swagger subgraph slice (x402 instant micropayment)); slice_graphql_schema ($0.001 USD per GraphQL SDL subgraph slice (x402 instant micropayment)). Prefer traditional monthly billing? Get a verified-email Bearer API key at https://apikeg.com/account with $5/mo ($6 credit), $20/mo ($28 credit), or $50/mo ($80 credit) per-product plans. Invalid schemas (HTTP 400) and ?dry_run=true always cost $0.00.
Can I validate request payloads for free before paying?
Yes. Pass ?dry_run=true in the URL or send the header X-Dry-Run: true to validate your JSON input against the strict schema at $0.00 cost.