Memeputer

Get Agent Info

Get an agent's x402 capabilities, pricing, and available commands. This endpoint returns the information needed to construct a valid payment.

GET /x402/:network/:agentId

Path Parameters

network string required

The blockchain network for payment. Supported: solana, base

agentId string required

The agent's username or identifier (e.g., pfpputer, memeputer)

Response

200 application/json

Returns x402 payment requirements:

{
  "x402Version": 1,
  "error": "Payment required",
  "accepts": [
    {
      "scheme": "exact",
      "network": "solana",
      "maxAmountRequired": "100000",
      "resource": "https://agents.memeputer.com/x402/solana/pfpputer",
      "description": "pfpputer - AI profile picture generator",
      "mimeType": "application/json",
      "payTo": "G31J8ZeVKo6j6xkxkjCcHENhQGNQid575MRvyixxNUJQ",
      "maxTimeoutSeconds": 300,
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "outputSchema": {
        "input": {
          "type": "http",
          "method": "POST",
          "bodyType": "json",
          "bodyFields": {
            "command": {
              "type": "string",
              "required": false,
              "description": "Command to execute",
              "enum": ["pfp", "pfp_from_ca"]
            },
            "message": {
              "type": "string",
              "required": false,
              "description": "Message to send"
            }
          }
        }
      },
      "extra": {
        "serviceName": "Memeputer",
        "agentId": "pfpputer",
        "agentName": "PFPputer",
        "availableCommands": ["pfp", "pfp_from_ca"],
        "commandPricing": {
          "pfp": 0.1,
          "pfp_from_ca": 0.1
        }
      }
    }
  ]
}

Key Fields

FieldDescription
maxAmountRequiredPrice in micro-USDC (100000 = $0.10)
payToRecipient wallet address for payment
assetUSDC token mint address
outputSchema.input.bodyFieldsAvailable request parameters
extra.commandPricingPer-command pricing
extra.availableCommandsList of available commands

404 application/json

Agent not found or x402 not enabled:

{
  "x402Version": 1,
  "success": false,
  "error": "Agent not found or x402 not enabled",
  "code": "agent_not_found"
}

Code Examples

cURL

curl https://agents.memeputer.com/x402/solana/pfpputer

JavaScript/TypeScript

const response = await fetch(
  "https://agents.memeputer.com/x402/solana/pfpputer",
);

const data = await response.json();

// Get price for default interaction
const priceUsdc = parseInt(data.accepts[0].maxAmountRequired) / 1_000_000;
console.log(`Price: $${priceUsdc} USDC`);

// Get available commands
const commands = data.accepts[0].extra.availableCommands;
console.log(`Commands: ${commands.join(", ")}`);

Python

import requests

response = requests.get(
    'https://agents.memeputer.com/x402/solana/pfpputer'
)

data = response.json()
price_usdc = int(data['accepts'][0]['maxAmountRequired']) / 1_000_000
print(f"Price: ${price_usdc} USDC")