561 Group Market

Metered RMN Inference

One exact RMN inference contract, conformed and dispatched through the caller-named provider Agent Card after the market prices and settles payment for it.

Price
$0.001 USDC per request
Network
Base mainnet, eip155:8453, settled in USDC through the Coinbase CDP facilitator
Method and URL
POST https://market.561.group/v1/inference
Response type
application/activity+json
Seller
Causeway Services (561 Group)

Input contract

Input that fails this contract is refused with a 4xx status before any payment is requested.

{
  "maxBytes": 102400,
  "bodySchema": {
    "type": "object",
    "required": [
      "@context",
      "id",
      "type",
      "actor",
      "target",
      "object"
    ],
    "properties": {
      "@context": {
        "const": "https://www.w3.org/ns/activitystreams"
      },
      "id": {
        "type": "string"
      },
      "type": {
        "const": "Accept"
      },
      "actor": {
        "type": "string"
      },
      "target": {
        "const": "urn:ame:metered-inference-tollbooth"
      },
      "object": {
        "type": "object",
        "required": [
          "type",
          "callerAccount",
          "providerAgentCard",
          "proposal"
        ],
        "properties": {
          "type": {
            "const": "ServiceContract"
          },
          "callerAccount": {
            "type": "string"
          },
          "providerAgentCard": {
            "type": "string",
            "description": "Customer-selected signed A2A 1.0 provider Agent Card URL."
          },
          "proposal": {
            "type": "object",
            "description": "Canonical application/sen+cbor effect bundle encoded as an ActivityStreams Document."
          }
        }
      }
    }
  }
}

Example request

{
  "method": "POST",
  "url": "https://market.561.group/v1/inference",
  "headers": {
    "accept": "application/activity+json",
    "content-type": "application/json"
  },
  "body": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": "urn:example:metered-inference-contract",
    "type": "Accept",
    "actor": "urn:example:customer",
    "target": "urn:ame:metered-inference-tollbooth",
    "object": {
      "type": "ServiceContract",
      "callerAccount": "eip155:8453:0x0000000000000000000000000000000000000001",
      "providerAgentCard": "https://provider.example/.well-known/agent-card.json",
      "proposal": {
        "type": "Document",
        "id": "ni:///sha-256;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "mediaType": "application/sen+cbor",
        "content": "oA=="
      }
    }
  }
}

Output

{
  "schema": {
    "type": "object",
    "required": [
      "@context",
      "id",
      "type",
      "actor",
      "target",
      "inReplyTo",
      "object"
    ],
    "properties": {
      "type": {
        "enum": [
          "Accept",
          "Reject"
        ]
      },
      "object": {
        "type": "object"
      }
    }
  },
  "example": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": "urn:example:metered-inference-settlement",
    "type": "Accept",
    "actor": "urn:ame:metered-inference-tollbooth",
    "target": "urn:example:customer",
    "inReplyTo": "urn:example:metered-inference-contract",
    "object": {
      "type": "RmnMeteredInferenceSettlement",
      "disposition": "completion"
    }
  }
}

How to buy with x402

  1. Send the request without payment. The server answers 402 Payment Required with a base64 JSON PAYMENT-REQUIRED header holding the amount, asset, network and payee.
  2. Have your wallet sign an EIP-3009 transferWithAuthorization for exactly those terms (an x402 client library does this for you).
  3. Repeat the identical request with the signed payload in the PAYMENT-SIGNATURE header.
  4. The server verifies, runs the operation, settles, and returns 200 with the result and a PAYMENT-RESPONSE header carrying the settlement receipt.

Read the price without paying

curl --include --request POST --header 'accept: application/activity+json' --header 'content-type: application/json' --data-raw '{"@context":"https://www.w3.org/ns/activitystreams","id":"urn:example:metered-inference-contract","type":"Accept","actor":"urn:example:customer","target":"urn:ame:metered-inference-tollbooth","object":{"type":"ServiceContract","callerAccount":"eip155:8453:0x0000000000000000000000000000000000000001","providerAgentCard":"https://provider.example/.well-known/agent-card.json","proposal":{"type":"Document","id":"ni:///sha-256;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","mediaType":"application/sen+cbor","content":"oA=="}}}' --url 'https://market.561.group/v1/inference'

This request authorizes nothing; it returns the live payment terms. Read the full explanation of x402.

Machine-readable