Api Endpoint

Spark Invocation Assurance

Validate an intended paid API request against its declared contract before spending. Returns VALID, INVALID, or UNKNOWN with machine-readable reasons. Target URL is never called.

Open interactive test console

Offering

Provider
spark-api-preflight.replit.app
Method
POST
Offering type
Api Endpoint
Transport type
http
Category
Api
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://spark-api-preflight.replit.app/api/validate
MIME type
application/json
First seen
2026-10-16T02:01:31.612Z
Last seen
Tags
preflight, Validation, X402, api, Agents

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.001 USDC
Atomic price: 1000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "payTo": "0xc2a3246d70733169b5228caaea799afe138c2b91"
  }
]

Observed health

Status
Degraded
Latest latency
33 ms
Average latency
543 ms
HTTP status
404
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "body": {
    "query": {
      "id": "123"
    },
    "targetUrl": "https://example.com/items",
    "requiredQuery": [
      {
        "name": "id",
        "schema": {
          "type": "string"
        },
        "required": true
      }
    ],
    "declaredMethod": "GET",
    "intendedMethod": "GET"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
}

Output schema

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "input"
  ],
  "properties": {
    "input": {
      "type": "object",
      "required": [
        "type",
        "method",
        "bodyType",
        "body"
      ],
      "properties": {
        "body": {
          "type": "object",
          "required": [
            "targetUrl",
            "intendedMethod",
            "declaredMethod",
            "requiredQuery"
          ],
          "properties": {
            "body": {
              "description": "Proposed request body checked against bodySchema."
            },
            "query": {
              "type": "object",
              "description": "Proposed query parameter values checked against requiredQuery."
            },
            "targetUrl": {
              "type": "string",
              "description": "Intended API target URL, kept as data only and never called."
            },
            "bodySchema": {
              "type": "object",
              "description": "Declared schema used to check the request body; unsupported features may produce UNKNOWN."
            },
            "requiredQuery": {
              "type": "array",
              "description": "Query parameter requirements from the contract; each rule has a name, required flag, and optional value schema."
            },
            "declaredMethod": {
              "type": "string",
              "description": "Uppercase HTTP method declared by the contract; compared with intendedMethod."
            },
            "intendedMethod": {
              "type": "string",
              "description": "Uppercase HTTP method the agent intends to use for the target request."
            }
          }
        },
        "type": {
          "type": "string",
          "const": "http"
        },
        "method": {
          "enum": [
            "POST"
          ],
          "type": "string"
        },
        "bodyType": {
          "enum": [
            "json",
            "form-data",
            "text"
          ],
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "output": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "example": {
          "type": "object",
          "required": [
            "verdict",
            "errors",
            "validator"
          ],
          "properties": {
            "errors": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "code",
                  "path",
                  "message",
                  "fix"
                ],
                "properties": {
                  "fix": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            },
            "verdict": {
              "enum": [
                "VALID",
                "INVALID",
                "UNKNOWN"
              ],
              "type": "string"
            },
            "validator": {
              "type": "object",
              "required": [
                "name",
                "version"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}