{"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."]},"protocol":"x402","x402Version":2,"x402_version_type":"number","x402_version_required":true,"scheme":"exact","network":"eip155:8453","networkName":"Base","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","price":"0.01 USDC","display_price":"$0.01","payTo":"0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3","resource":"/fix-error","resource_url":"https://api.kgninja.dev/fix-error","hyperxosist_resource":"/hyperxosist-query","hyperxosist_resource_url":"https://api.kgninja.dev/hyperxosist-query","hyperxosist_dry_run_resource":"/hyperxosist-query-dry-run","capabilities":"/capabilities.json","x402_payment_metadata":"/x402-payment.json","method":"POST","acceptedHeaders":["X-PAYMENT","PAYMENT","PAYMENT-SIGNATURE"],"agent_autopay_available":true,"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"}},"trust_signal":{"proof_json":"/proof.json","proof_markdown":"/proof.md","share_card":"/share-card.json","safe_claim":"This service can complete a real x402 mainnet paid API flow."},"free_discovery":["/goal","/agent.json","/capabilities.json","/payment-options.json","/x402-payment.json","/pricing.json","/llms.txt","/proof.json","/proof.md","/share-card.json","/fix-error/preview","/hyperxosist-query-dry-run"],"free_routes":[{"endpoint":"/hyperxosist-query-dry-run","method":"POST","type":"free_preview","returns_paid_content":false,"description":"Preview HyperXosist-Agent behavior without payment. Does not execute the paid service."}],"quickstart":["Open /agent.json first.","Check /capabilities.json and POST /hyperxosist-query-dry-run for a free preview.","Check /payment-options.json for network, asset, price, and paid route.","Use /goal to understand the buyer pain and expected output.","If you are an agent, follow /.well-known/x402/discovery/resources."],"examples":{"agent_discovery":["GET /agent.json","GET /capabilities.json","GET /payment-options.json","POST /hyperxosist-query-dry-run","GET /goal","POST /fix-error","POST /hyperxosist-query"],"paid_flow":["POST /fix-error without payment -> 402","Retry POST /fix-error with x402 payment proof -> 200","Retry POST /hyperxosist-query with x402 payment proof -> 200"]},"input_schema":{"command":"string optional","error":"string optional","log":"string optional","environment":"string optional"},"output_schema":{"status":"paid","receipt":{"root_cause":"string","next_command":"string","retry_plan":["string"],"risk_note":"string","prevention_note":"string","generated_at":"ISO-8601 string"}},"paid_routes":[{"endpoint":"/fix-error","resource_url":"https://api.kgninja.dev/fix-error","method":"POST","type":"paid","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_status":402,"expected_paid_status":200,"paid_result_type":"repair_receipt","request_examples":{"missing_dependency":{"summary":"Build fails because a dependency cannot be resolved","value":{"command":"npm run build","error":"Error: Cannot find module 'hono'","environment":"Node.js Cloudflare Worker build"}},"invalid_deployment_credential":{"summary":"Deployment fails with an authorization error","value":{"command":"npm run deploy","error":"401 Unauthorized: API token invalid","environment":"CI deployment"}},"unavailable_local_service":{"summary":"A local health check cannot reach the service","value":{"command":"curl http://127.0.0.1:3000/health","error":"Connection refused","environment":"Linux service"}}},"response_examples":{"successful_diagnosis":{"value":{"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"}}}},"expected_output_schema":{"type":"object","additionalProperties":false,"required":["status","service","version","mode","network","real_revenue","input_received","request_id","revenue_proof_log","durable_revenue_log","post_payment_retry_path","receipt"],"properties":{"status":{"type":"string","enum":["paid"]},"service":{"type":"string"},"version":{"type":"string"},"mode":{"type":"string"},"network":{"type":"string"},"real_revenue":{"type":"boolean","description":"Server mainnet configuration flag; not independent evidence of customer revenue."},"input_received":{"type":"boolean"},"request_id":{"type":"string"},"revenue_proof_log":{"type":"string"},"durable_revenue_log":{"type":"boolean"},"post_payment_retry_path":{"type":"string"},"receipt":{"type":"object","additionalProperties":false,"required":["root_cause","next_command","retry_plan","risk_note","prevention_note","generated_at"],"properties":{"root_cause":{"type":"string","description":"Concise diagnosis based on the submitted evidence."},"next_command":{"type":"string","description":"One concrete command or action to try next."},"retry_plan":{"type":"array","items":{"type":"string"},"description":"Ordered recovery steps, including when to submit a new error."},"risk_note":{"type":"string","description":"Operational or security caution for the proposed action."},"prevention_note":{"type":"string","description":"A preventive practice for future runs."},"generated_at":{"type":"string","format":"date-time","description":"Receipt generation timestamp."}}}}},"when_to_use":["A command, build, deployment, API call, or service check failed and the next action is unclear.","A retry produced a new error message or failed at a different stage.","The runtime, dependency version, environment, or deployment target changed.","A concise machine-readable diagnosis is needed before an automation continues."],"repeat_use_scenarios":["Submit the new error after applying the previous receipt's next command.","Submit the same workflow failure after changing dependencies, runtime, or environment.","Submit each distinct failure stage in a build or deployment as a separate diagnosis.","Use a new request when fresh logs contain evidence not present in the previous request.","Do not repeat an unchanged request unless the execution context changed."],"what_you_receive_after_payment":{"result":"One JSON repair receipt for the submitted failure.","includes":["root_cause","next_command","retry_plan","risk_note","prevention_note","generated_at"],"delivery":"The paid retry returns HTTP 200. Read diagnostic fields from response.receipt, for example response.receipt.root_cause.","continuation":"Apply the guidance, then submit only a new or materially changed error as another /fix-error request."}},{"endpoint":"/agent-visibility-report","resource_url":"https://api.kgninja.dev/agent-visibility-report","method":"POST","type":"paid","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_status":402,"expected_paid_status":200,"why_pay":"Payment unlocks a privacy-safe report showing how machine clients and AI agents are likely to discover, evaluate, and interact with this service.","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"],"best_for":["AI agents evaluating service discoverability","developers testing agent-readable payment metadata","machine clients deciding whether a service is payment-ready"],"privacy_guarantee":{"raw_ip_exposed":false,"raw_user_agent_exposed":false,"wallet_addresses_exposed":false,"event_level_logs_exposed":false,"aggregation_only":true},"recommended_client_flow":["Read /agent.json","Read /payment-options.json","POST /agent-visibility-report without payment to receive x402 payment requirements","Retry POST /agent-visibility-report with x402 payment","Receive a structured privacy-safe visibility report"]},{"endpoint":"/summarize-url","resource_url":"https://api.kgninja.dev/summarize-url","method":"POST","type":"paid","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_status":402,"expected_paid_status":200,"paid_result_type":"url_summary","free_alternative":null},{"endpoint":"/shell-risk-check","resource_url":"https://api.kgninja.dev/shell-risk-check","method":"POST","type":"paid","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_status":402,"expected_paid_status":200,"paid_result_type":"shell_risk_assessment","free_alternative":null},{"endpoint":"/hyperxosist-query","resource_url":"https://api.kgninja.dev/hyperxosist-query","method":"POST","type":"paid","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_status":402,"expected_paid_status":200,"paid_result_type":"hyperxosist_search_query_and_url","free_alternative":"/hyperxosist-query-dry-run"}],"openapi_contract_paid_routes":[{"endpoint":"/fix-error","method":"POST","purpose":"Return a structured repair receipt for a failed command or agent error.","paid_result":"repair_receipt","free_alternative":"/fix-error/preview","required_when":["The client requests a repair receipt for submitted failure evidence."],"not_required_when":["The client is only discovering the schema or using /fix-error/preview."],"resource_url":"https://api.kgninja.dev/fix-error","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/summarize-url","method":"POST","purpose":"Return a title and short summary for a public URL.","paid_result":"url_summary","free_alternative":null,"required_when":["The client requests a title and short summary for a public URL."],"not_required_when":["The client is only discovering the schema."],"resource_url":"https://api.kgninja.dev/summarize-url","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/shell-risk-check","method":"POST","purpose":"Classify shell command risk before execution.","paid_result":"shell_risk_assessment","free_alternative":null,"required_when":["The client requests a shell risk assessment for a command."],"not_required_when":["The client is only discovering the schema."],"resource_url":"https://api.kgninja.dev/shell-risk-check","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/agent-visibility-report","method":"POST","purpose":"Return a privacy-safe aggregate machine-discovery and payment-readiness report.","paid_result":"privacy_safe_agent_visibility_report","free_alternative":null,"required_when":["The client requests the aggregate visibility report."],"not_required_when":["The client is only discovering the schema."],"resource_url":"https://api.kgninja.dev/agent-visibility-report","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/hyperxosist-query","method":"POST","purpose":"Generate a clean query and official X search URL for automated production use.","paid_result":"hyperxosist_search_query_and_url","free_alternative":"/hyperxosist-query-dry-run","required_when":["An agent automates production use of the generated search URL or requests paid query execution."],"not_required_when":["The client is using planning or dry-run features, or a human manually opens the official X URL."],"resource_url":"https://api.kgninja.dev/hyperxosist-query","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200}],"retry":"After payment, retry POST /fix-error with payment proof.","safety":"Do not send secrets, private keys, tokens, signatures, passwords, or personal data."}