{
  "name": "Ruliad Agentic Gateway",
  "version": "2.1.0-pricing-preview",
  "protocol": "x402-v2+usage-ledger+markdown+mcp",
  "description": "Machine discovery for Ruliad agent-native TV-ad production commerce.",
  "website_origin": "https://theruliad.ai",
  "canonical_api_origin": "https://api.theruliad.ai",
  "in_app_onboarding": {
    "url": "https://theruliad.ai/?onboarding=principal",
    "principal_first": true,
    "human_funding_options": [
      "credits"
    ],
    "agent_funding_options": [
      "credits",
      "x402"
    ],
    "commerce_reference_url": "https://theruliad.ai/agent-commerce.html",
    "commerce_reference_is_read_only": true,
    "default_mode": "free_creation",
    "payment_required_for_creation": false,
    "legacy_route_note": "The credits compatibility route opens free account signup; it does not purchase credits."
  },
  "api_routing_note": "api.theruliad.ai is the SpotRunner GCP production API behind the existing spotrunner-dev load balancer. The retired ruliad-production.web.app host is never an agent-commerce release authority.",
  "auth": {
    "type": "wallet_handshake",
    "handshake_endpoint": "https://api.theruliad.ai/v1/agent/handshake",
    "agent_session": "isolated",
    "token_transport": [
      "Authorization: Bearer <session_token>",
      "x-agent-token: <session_token>"
    ],
    "owner_read_scheme": "ruliad.wallet-request.v1"
  },
  "payments": {
    "standard": "x402-v2",
    "environment": "development",
    "rollout": "base-sepolia-testnet",
    "testnet_only": true,
    "currency": "USDC",
    "network": "eip155:84532",
    "asset_address": "0x036cbd53842c5426634e7929541ec2318f3dcf7e",
    "asset_decimals": 6,
    "purchasable_action": "ruliad.produce.turbo",
    "reference_price_usdc": "0.01",
    "rate_card_version": "2026-09-25.cost-plus.v1",
    "rate_card_endpoint": "https://api.theruliad.ai/v1/agent/commerce/pricing",
    "estimate_endpoint": "https://api.theruliad.ai/v1/agent/commerce/estimate",
    "price_discovery": "Request and verify a fresh quote. Never hard-code the reference price.",
    "current_charge_scope": "The live 0.01 test-USDC amount queues one Turbo production protocol proof. It is not a cost-complete commercial-production price and downstream provider work is not individually x402-metered.",
    "ledger_separation": {
      "provider_cost": "Ruliad cost estimate and later provider-invoice reconciliation",
      "account_credit": "Retained legacy accounting; ordinary creation is Ruliad-funded and zero-charge",
      "x402_settlement": "USDC authorization, settlement, and signed Usage Ledger receipt"
    },
    "quote_is_not_spend_authority": true,
    "spend_cap_rule": "The payer cap must be no greater than the fresh locked quote.",
    "settlement_request_header": "PAYMENT-SIGNATURE",
    "settlement_response_header": "PAYMENT-RESPONSE",
    "idempotency_header": "Idempotency-Key",
    "runtime_failure_recovery": {
      "mode": "prepaid_credit",
      "ledger_event": "usage_refund",
      "signed_receipt": true,
      "onchain_return_transfer": false
    },
    "scope": "Optional external agent-commerce protocol only. Ordinary customer creation is free and requires no USDC quote or payment."
  },
  "endpoints": {
    "discover": "https://api.theruliad.ai/v1/agent",
    "handshake": "https://api.theruliad.ai/v1/agent/handshake",
    "pricing": "https://api.theruliad.ai/v1/agent/commerce/pricing",
    "estimate": "https://api.theruliad.ai/v1/agent/commerce/estimate",
    "quote": "https://api.theruliad.ai/v1/agent/commerce/quote",
    "receipt_keys": "https://api.theruliad.ai/v1/agent/commerce/keys",
    "budget": "https://api.theruliad.ai/v1/agent/commerce/budget",
    "ledger": "https://api.theruliad.ai/v1/agent/commerce/ledger",
    "execute": "https://api.theruliad.ai/v1/agent/commerce/execute",
    "production_status": "https://api.theruliad.ai/v1/agent/get_stats",
    "vast_wrap": "https://api.theruliad.ai/v1/agent/vast-wrap"
  },
  "flow": [
    "handshake",
    "read_free_rate_card",
    "request_free_usage_estimate",
    "read_budget",
    "request_free_quote",
    "verify_quote_and_expiry",
    "submit_complete_production_preflight",
    "confirm_authority_chain_and_spend_cap",
    "execute_with_payment_signature_and_idempotency_key",
    "verify_payment_response_and_signed_receipt",
    "replay_ledger_if_needed"
  ],
  "service_coverage": {
    "x402_metered": [
      "ruliad.produce.turbo"
    ],
    "not_individually_x402_metered": [
      "image_generation",
      "video_generation",
      "speech_generation",
      "music_generation",
      "text_generation",
      "script_generation",
      "media_analysis",
      "rendering",
      "external_deployment"
    ],
    "availability_rule": "Only a rate-card SKU marked live_x402 may be sent to a paid execute endpoint. estimate_only means disclosure without purchase support."
  },
  "safety": {
    "mainnet_enabled": false,
    "production_preflight_required_before_payment": true,
    "retries_require_same_idempotency_key_and_body": true,
    "estimate_is_not_quote": true,
    "quote_is_not_spend_authority": true,
    "estimate_only_is_not_purchasable": true,
    "hidden_secondary_billing_forbidden": true,
    "secrets_never_requested": [
      "seed_phrase",
      "private_key",
      "wallet_secret",
      "cdp_api_secret"
    ]
  },
  "instructions": {
    "firstInstruction": "First action for every visiting agent: open https://theruliad.ai/ and click For agents at the top of the homepage. Verify For agents is selected, read the agent operating instructions and tool/API references, then start the requested workflow.",
    "coreUrl": "https://theruliad.ai/agent-guides/core-v1.md",
    "indexUrl": "https://theruliad.ai/agent-guides/modules-v1.json",
    "descriptorUrl": "https://theruliad.ai/agent-guides/production-expert-v1.json",
    "strategy": "core_then_selected_module",
    "onFailure": "INSTRUCTIONS_UNAVAILABLE: report ID, URL and failure; stop only dependent operations and continue independent authorized work."
  },
  "creation_economy": {
    "default": "free_creation",
    "creation_charge_cents": 0,
    "requires_card_or_balance": false,
    "per_action_spend_approval": false,
    "usage_values": "informational, including the existing margin",
    "export_charge_scope": "one ad unlocks all future versions of one owner/workspace/project",
    "one_time_packs": [
      {
        "ads": 1,
        "amount_cents": 1900
      },
      {
        "ads": 5,
        "amount_cents": 4900
      },
      {
        "ads": 10,
        "amount_cents": 9900
      },
      {
        "ads": 50,
        "amount_cents": 29900
      }
    ],
    "optional_monthly_discount_percent": 25,
    "unused_monthly_ads_expire_at_paid_period_end": true,
    "unlocked_projects_expire": false,
    "guidance": "https://theruliad.ai/agent-guides/core-v1.md",
    "internal_qa_allocations": "separate and enforced",
    "external_wallet_commerce": "optional; not required for ordinary creation"
  },
  "extraction_contract": {
    "version": "ruliad.extraction.v1",
    "schema": "https://theruliad.ai/.well-known/ruliad-extraction-contract-v1.schema.json",
    "guide": "https://theruliad.ai/agent-guides/extraction-contract-v1.md",
    "example": "https://theruliad.ai/agent-guides/extraction-contract-v1.example.json",
    "scope": "Portable intake validation/discovery; does not create a new API, connector, execution authorization or universal provenance guarantee.",
    "access_guide": "https://theruliad.ai/agent-access-v4.html"
  },
  "service_status": {
    "url": "https://theruliad.ai/status.html",
    "scope": "On-demand public API liveness and release observations; unprobed providers, project writes and exports remain unknown.",
    "support": "https://theruliad.ai/support-v2.html"
  }
}
