← all endpoints

Calc Margin API

Profit margin & markup — 'cost-price' returns profit, margin %, markup %. For retail, pricing, e-commerce agents.

$0.005 / call   paid in USDC on Base via x402 — no API key, no signup.

Endpoint

GET https://api.gocreativeai.com/v1/calc/margin/{arg}

How an agent calls it

curl https://api.gocreativeai.com/v1/calc/margin/example
# → HTTP 402 Payment Required (price quote)
# your x402 client autopays in USDC and retries
# → 200 OK with clean JSON

Python (x402 SDK)

import httpx
from x402.clients.httpx import x402_payment_required
with httpx.Client() as c:
    c.event_hooks["response"]=[x402_payment_required(wallet_private_key="0x_YOUR_KEY",network="base")]
    data = c.get("https://api.gocreativeai.com/v1/calc/margin/example").json()

Part of 730 pay-per-call APIs for AI agents. Native MCP server. Machine-readable catalog at /.well-known/x402.