{"openapi":"3.1.0","info":{"title":"XPeX Agent API","version":"1.0.0","description":"Deterministic read-only MCP/plugin starter kits. 0.01 USDC per call via x402 and Circle Gateway. Existing free blueprint APIs and human Stripe services remain available.","x-guidance":"Use POST /v1/x402/agent-kit with a public HTTPS MCP URL and product details. Inspect the 402 challenge and authorize payment before retrying with PAYMENT-SIGNATURE."},"servers":[{"url":"https://xpex-plugin-factory-production.up.railway.app"}],"paths":{"/v1/x402/agent-kit":{"post":{"operationId":"createMcpPluginStarterKit","summary":"Generate a read-only MCP/plugin starter ZIP with integrity hash","description":"Provide your public MCP endpoint and product details. Returns blueprint, files, policy report and base64 ZIP. Deterministic templates; no LLM calls, endpoint verification or publication. Invalid inputs are rejected before any payment. Send PAYMENT-SIGNATURE only after inspecting the 402 challenge.","x-payment":{"enabled":true,"mode":"mainnet","currency":"USDC","price":"0.01","amountAtomic":"10000","network":"eip155:8453","sellerAddress":"0x4898359899c8d5bd0BD93541F2783EcD85fAb581","facilitator":"https://gateway-api.circle.com","settlement":"Circle Gateway balance; subsequent on-chain settlement/withdrawal is separate. HTTP 402 is not revenue."},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"parameters":[{"in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"type":"string"},"description":"Base64 x402 v2 payment authorization, created by a compatible buyer wallet."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"displayName":{"type":"string","minLength":3,"maxLength":80},"description":{"type":"string","minLength":30,"maxLength":120},"developerName":{"type":"string","minLength":2,"maxLength":120},"homepage":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"privacyPolicyUrl":{"type":"string","format":"uri"},"termsOfServiceUrl":{"type":"string","format":"uri"},"mcpUrl":{"type":"string","maxLength":2048,"format":"uri"},"auth":{"default":"none","type":"string","enum":["none","oauth2.1"]}},"required":["name","displayName","description","developerName","homepage","supportUrl","privacyPolicyUrl","termsOfServiceUrl","mcpUrl","auth"],"additionalProperties":false},"example":{"name":"example-agent","displayName":"Example Agent","description":"Read public product information through an authorized MCP endpoint.","developerName":"Example Developer","homepage":"https://example.com","supportUrl":"https://example.com/support","privacyPolicyUrl":"https://example.com/privacy","termsOfServiceUrl":"https://example.com/terms","mcpUrl":"https://example.com/mcp","auth":"none"}}}},"responses":{"200":{"description":"Circle accepted payment; generated kit and provider receipt.","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"},"description":"Base64 provider settlement response."}},"content":{"application/json":{"schema":{"type":"object","required":["product","archive","payment"],"properties":{"product":{"type":"string"},"archive":{"type":"object","properties":{"filename":{"type":"string"},"data":{"type":"string","contentEncoding":"base64"},"sha256":{"type":"string"}}},"payment":{"type":"object"}}}}}},"400":{"description":"Invalid input or payment header; no charge."},"402":{"description":"Payment required or rejected. Decode PAYMENT-REQUIRED for payment options.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64 x402 v2 payment requirements."}}},"422":{"description":"Policy rejected input; no charge."},"503":{"description":"Payments disabled or unavailable; no kit released."}}}}}}