{"autonomous_purchase":{"endpoint":"/fix-error","method":"POST","price_per_request":"$0.01","currency":"USDC","network":"eip155:8453","free_preview":"/fix-error/preview","preview_scope":"Fixed sample only; the paid request applies deterministic rules to your supplied error.","buy_when":"A failed command needs structured triage and the free sample demonstrates useful output for your task.","skip_when":["The error is already resolved.","Local diagnosis is sufficient.","The requested price exceeds your authorized budget.","You need an executed fix or guaranteed resolution."],"result":"One JSON receipt: root_cause, next_command, retry_plan, risk_note, prevention_note, generated_at.","fulfillment":"Automatic API response after payment validation; no manual delivery step.","execution":"Suggested commands are not executed. Review them under your own execution policy.","payment_policy":"Use an x402 v2 client with an already authorized wallet and a per-request and total spend limit. Validate the 402 amount, network, asset and payTo before signing.","retry_policy":"Preserve the same request and payment intent. If the payment or delivery outcome is uncertain, reconcile it before authorizing another payment.","success_check":"Check HTTP 200, the response schema and PAYMENT-RESPONSE settlement evidence. A 402 alone is not a purchase or delivered result.","revenue_evidence":"/revenue-log/integrity"},"service":"KG-NINJA Agent Error Fix Receipt","description":"Machine-payable x402 endpoint that returns a concise repair receipt for one failed command or agent error.","protocol":"x402","x402Version":2,"x402_version_type":"number","x402_version_required":true,"network":"eip155:8453","currency":"USDC","price":"$0.01","payment_options_url":"/payment-options.json","openapi_url":"/openapi.json","agent_json_url":"/agent.json","llms_txt_url":"/llms.txt","goal_url":"/goal","pricing_url":"/pricing.json","proof_json_url":"/proof.json","proof_markdown_url":"/proof.md","share_card_url":"/share-card.json","source_of_truth":"openapi","canonical_openapi_url":"/openapi.json","canonical_openapi_absolute_url":"https://api.kgninja.dev/openapi.json","free_to_paid_flow":{"free":["MCP discovery, planning, filtering, and handoff","Local preview and dry-run requests","A human opening an official X search URL in a browser"],"upgrade_required_when":["An agent automates production use of a generated search URL","An agent performs automated external collection or paid execution","A client requests a paid route result"],"upgrade_not_required_when":["The client is only discovering tools or reading schemas","The client is using planning, filtering, handoff, preview, or dry-run features","A human manually opens the official X URL"],"steps":["Read /openapi.json and /payment-options.json.","POST the paid operation without proof to receive HTTP 402 and PAYMENT-REQUIRED.","Obtain x402 payment proof through the client wallet/facilitator.","Retry the same POST with payment proof and expect HTTP 200."]},"mainnet_paid_flow_verified":true,"current_mainnet_settlement_ready":true,"bazaar_indexing":{"x402Version":2,"version_type":"number","version_required":true,"scheme":"exact","network":"eip155:8453","asset":"USDC","asset_contract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","resource_identity":"absolute_resource_url","resource_url_rule":"Each paid route advertises and challenges against its own absolute HTTPS resource URL.","facilitator":"cdp","facilitator_url":"https://api.cdp.coinbase.com/platform/v2/x402","cdp_facilitator_configured":true,"cdp_credentials_present":true,"bazaar_extension_status":"declared_on_paid_routes","bazaar_extension_note":"Each paid POST route declares a v2 Bazaar discovery extension through the installed x402 SDK. Listing still depends on facilitator settlement and external indexing.","indexing_expectation":"Bazaar visibility should be treated as route/resource-level and settlement-gated until Coinbase confirms otherwise.","debug_signals":{"payment_required_header":"PAYMENT-REQUIRED","settlement_headers":["PAYMENT-RESPONSE","X-PAYMENT-RESPONSE"],"extension_response_header":"EXTENSION-RESPONSES","local_integrity_endpoint":"/revenue-log/integrity"}},"primary_paid_endpoint":"/fix-error","primary_paid_resource_url":"https://api.kgninja.dev/fix-error","hyperxosist_paid_endpoint":"/hyperxosist-query","hyperxosist_paid_resource_url":"https://api.kgninja.dev/hyperxosist-query","resources":[{"resource":"https://api.kgninja.dev/fix-error","type":"http","x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3","maxTimeoutSeconds":300}],"metadata":{"description":"Return a structured repair receipt for a failed command or agent error.","input":{"type":"http","method":"POST","bodyType":"json","body":{"type":"object","properties":{"command":{"type":"string"},"error":{"type":"string"},"log":{"type":"string"},"environment":{"type":"string"}},"additionalProperties":false}},"output":{"type":"json","example":{"status":"paid","service":"Agent Error Fix Receipt","version":"2026-05-25-d1-revenue-log","mode":"mainnet","network":"eip155:8453","real_revenue":true,"input_received":true,"request_id":"example-request-id","revenue_proof_log":"paid_fix_error_receipt_issued","durable_revenue_log":true,"post_payment_retry_path":"Retry POST /fix-error with x402 payment proof.","receipt":{"root_cause":"The failure appears related to a missing package, missing file, or unresolved module path.","next_command":"npm install","retry_plan":["Confirm the exact failing command.","Run the smallest non-destructive diagnostic command relevant to the error.","Check whether required environment variables, packages, files, or services are present.","Retry the original command once after the minimal fix."],"risk_note":"Do not run destructive cleanup, reset, rm, database, credential, or firewall commands without manual review.","prevention_note":"Store this error pattern in a runbook and add a preflight check before future runs.","generated_at":"2026-06-14T00:00:00.000Z"}}}}},{"resource":"https://api.kgninja.dev/summarize-url","type":"http","x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3","maxTimeoutSeconds":300}],"metadata":{"description":"Return a title and short summary for a public URL.","input":{"type":"http","method":"POST","bodyType":"json","body":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}},"additionalProperties":false}},"output":{"type":"json","example":{"title":"Example title","summary":"Example summary"}}}},{"resource":"https://api.kgninja.dev/shell-risk-check","type":"http","x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3","maxTimeoutSeconds":300}],"metadata":{"description":"Classify shell command risk before execution.","input":{"type":"http","method":"POST","bodyType":"json","body":{"type":"object","required":["command"],"properties":{"command":{"type":"string"}},"additionalProperties":false}},"output":{"type":"json","example":{"risk_level":"low","explanation":"No high-risk pattern detected."}}}},{"resource":"https://api.kgninja.dev/agent-visibility-report","type":"http","x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3","maxTimeoutSeconds":300}],"metadata":{"description":"Return a privacy-safe aggregate machine-discovery and payment-readiness report.","input":{"type":"http","method":"POST","bodyType":"json","body":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"mode":{"type":"string"}},"additionalProperties":false}},"output":{"type":"json","example":{"report_type":"agent_visibility_report","payment_readiness_score":80}}}},{"resource":"https://api.kgninja.dev/hyperxosist-query","type":"http","x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3","maxTimeoutSeconds":300}],"metadata":{"description":"Generate a clean query and official X search URL for automated production use.","input":{"type":"http","method":"POST","bodyType":"json","body":{"type":"object","properties":{"keywords":{"type":"string"},"lang":{"type":"string"},"noise":{"type":"object"}},"additionalProperties":false}},"output":{"type":"json","example":{"query":"frontier AI","searchUrl":"https://x.com/search?q=frontier%20AI"}}}}],"paid_endpoints":[{"route":"/fix-error","resource_url":"https://api.kgninja.dev/fix-error","method":"POST","description":"Return a deterministic repair receipt for a failing command or log snippet.","expected_unpaid_response":402,"expected_paid_response":200},{"route":"/summarize-url","resource_url":"https://api.kgninja.dev/summarize-url","method":"POST","description":"Return title plus short summary for a public URL.","expected_unpaid_response":402,"expected_paid_response":200},{"route":"/shell-risk-check","resource_url":"https://api.kgninja.dev/shell-risk-check","method":"POST","description":"Score shell command risk before execution.","expected_unpaid_response":402,"expected_paid_response":200},{"route":"/agent-visibility-report","resource_url":"https://api.kgninja.dev/agent-visibility-report","method":"POST","description":"Generate a privacy-safe aggregate report of machine discoverability, payment readiness, detected metadata gaps, matched discovery patterns, and the next fix.","why_pay":"Payment unlocks scoring and actionable conversion guidance based only on aggregate route/status/client-family/payment counts.","paid_result_type":"privacy_safe_agent_visibility_report","paid_result_includes":["agent_visibility_score","payment_readiness_score","machine_discovery_score","detected_gaps","matched_real_world_patterns","recommended_next_fix","privacy_guarantee"],"privacy_guarantee":{"raw_ip_exposed":false,"raw_user_agent_exposed":false,"wallet_addresses_exposed":false,"event_level_logs_exposed":false,"aggregation_only":true},"expected_unpaid_response":402,"expected_paid_response":200},{"route":"/hyperxosist-query","resource_url":"https://api.kgninja.dev/hyperxosist-query","method":"POST","description":"Generate a noise-reduced query and official X search URL for automated production use.","expected_unpaid_response":402,"expected_paid_response":200,"free_alternative":"/hyperxosist-query-dry-run","direct_scraping":false}],"payment_flow":["Read /agent.json.","Read /goal.","Read /payment-options.json.","POST /fix-error without payment to receive 402.","Retry POST /fix-error with x402 payment.","Expect 200 paid response."]}