{"openapi":"3.0.3","info":{"title":"Agent Embassy","version":"1.0.0","description":"Agents pay for work and prove what happened.","contact":{"name":"Agent Embassy","url":"https://agent-embassy.fly.dev","email":"agent.embassy@proton.me"}},"servers":[{"url":"https://aemb.pro"}],"paths":{"/v1/check/verify":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Agents pay for work and prove what happened.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","idempotency_key"],"properties":{"url":{"type":"string","description":"HTTPS URL to fetch and check"},"expect_status":{"type":"number","description":"Expected HTTP status"},"expect_body_contains":{"type":"string","description":"Substring the body must contain"},"expect_json_path":{"type":"string","description":"Dot-path into a JSON body"},"expect_json_value":{"description":"Expected value at the JSON path"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt"},"402":{"description":"x402 payment required"}}}},"/v1/check/prove":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). One HTTPS URL in; a signed Outcome Receipt with the trillion-dollar proof envelope out: precise claim, public timestamp anchor, masked internals.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","idempotency_key"],"properties":{"url":{"type":"string","description":"HTTPS URL to fetch and prove (expects HTTP 200)"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt"},"402":{"description":"x402 payment required"}}}},"/v1/recovery/register":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($1.00 USDC on Base or Arbitrum One via x402). Stores a client-encrypted recovery blob with quorum rules, queued for human review within 24h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contact_name","contact_handle","quorum_rules","recovery_blob","idempotency_key"],"properties":{"contact_name":{"type":"string"},"contact_handle":{"type":"string"},"quorum_rules":{"type":"string"},"recovery_blob":{"type":"string","description":"Client-encrypted blob, ENC:v1:..."},"idempotency_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt"},"402":{"description":"x402 payment required"}}}},"/v1/markets/compute/spot":{"get":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402, GET). Compute market snapshot: cheapest rentable ask per class in USD/hour, observed live. With a gpu query param, returns the cheapest rentable offers for that class; without it, a cheapest-per-class market snapshot. Responses carry prices only — upstream sources are internal and never named. All prices are ephemeral asks, not delivered-cost guarantees.","parameters":[{"name":"gpu","in":"query","required":false,"schema":{"type":"string"},"description":"Class, e.g. 'H100 SXM', 'RTX 4090'. Omit for whole-market snapshot."},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["ondemand","bid","reserved"]},"description":"Pricing mode (default ondemand)"},{"name":"verified","in":"query","required":false,"schema":{"type":"string"},"description":"'true' = identity-checked hosts only"},{"name":"min_gpus","in":"query","required":false,"schema":{"type":"number"},"description":"Minimum unit count per offer"},{"name":"min_reliability","in":"query","required":false,"schema":{"type":"number"},"description":"Minimum host reliability 0..1"},{"name":"max_results","in":"query","required":false,"schema":{"type":"number"},"description":"Max offers returned for a single-class query (default 5, max 25)"}],"responses":{"200":{"description":"Paid market snapshot (prices only, no provenance)"},"402":{"description":"x402 payment required ($0.25 USDC)"},"502":{"description":"Market source unavailable"}}}},"/v1/markets/compute/history":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). Time series of compute market prices: per-class cheapest/median/offer-count series, or whole-market history when gpu is omitted. Bounded (limit 1-200, default 50), timestamped, embedded in the signed Outcome Receipt. Fully automated. Prices are ephemeral asks, not delivered-cost guarantees.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["idempotency_key"],"properties":{"gpu":{"type":"string","description":"Class, e.g. 'H100 SXM'. Omit for whole-market history."},"limit":{"type":"number","description":"Max snapshots returned, 1-200 (default 50)"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the history series in action evidence"},"402":{"description":"x402 payment required"}}}},"/v1/markets/compute/alerts":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). Recent large per-class price moves, most recent first. Bounded (limit 1-50, default 25), timestamped, embedded in the signed Outcome Receipt. Fully automated. Upstream sources are internal and never named. Prices are ephemeral asks, not delivered-cost guarantees.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["idempotency_key"],"properties":{"gpu":{"type":"string","description":"Class, e.g. 'H100 SXM'. Omit for all classes."},"limit":{"type":"number","description":"Max alerts returned, 1-50 (default 25, most recent first)"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the alert list in action evidence"},"402":{"description":"x402 payment required"}}}},"/v1/research/paper":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($222.00 USDC paper / $444.00 USDC paper+provenance bundle, on Base or Arbitrum One via x402). One research paper delivered inside the signed Outcome Receipt, bound to the exact bytes delivered (SHA-256). The paper+provenance bundle adds the corpus evidence pack: Merkle inclusion proof, salted claim digests, and the independently timestamped corpus checkpoint. Professional intelligence, not financial advice.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["paper_id","idempotency_key"],"properties":{"paper_id":{"type":"string","description":"Paper identifier, e.g. 'the-discontinuity-20260922'"},"bundle":{"type":"string","description":"Delivery tier: 'paper' ($222) or 'paper+provenance' ($444). Defaults to 'paper'."},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the paper in action evidence"},"402":{"description":"x402 payment required ($222.00 USDC, or $444.00 USDC for the paper+provenance bundle)"}}}},"/v1/trust/report":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). One automated trust evaluation of an HTTPS URL, embedded in the signed Outcome Receipt. Evidence of one automated report run at the recorded time — not of ongoing truth.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","idempotency_key"],"properties":{"url":{"type":"string","description":"HTTPS URL to evaluate"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the trust report in action evidence"},"402":{"description":"x402 payment required ($0.25 USDC)"}}}},"/v1/assurance/check":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). One per-query assurance verdict for a provider endpoint: ALLOW / ALLOW_WITH_RESTRICTIONS / ASK_HUMAN / REVERIFY / REROUTE / QUARANTINE, embedded in the signed Outcome Receipt. Evidence of one unpaid probe set at the recorded time — not of ongoing truth.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["provider_endpoint","action","amount_usdc","permissions_requested","idempotency_key"],"properties":{"provider_endpoint":{"type":"string","description":"HTTPS URL of the provider endpoint to check"},"action":{"type":"string","description":"Action the buyer intends to take"},"amount_usdc":{"type":"string","description":"Amount the buyer intends to pay, decimal USDC"},"permissions_requested":{"type":"array","items":{"type":"string"},"description":"Permissions the action would grant"},"context":{"type":"string","description":"Optional free-form context"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the assurance verdict in action evidence"},"402":{"description":"x402 payment required ($0.25 USDC)"}}}},"/v1/agent-id/issue":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). Issues an Agent ID: a signed identity attestation binding an agent's public key to a verified accountable principal, with operator details and an expiry. Issuance is refused when the principal cannot be verified.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_pubkey","operator_name","operator_contact","principal_id","principal_kind","principal_label","principal_attestation_method","idempotency_key"],"properties":{"agent_pubkey":{"type":"string","description":"The agent's public key (hex)"},"agent_key_scheme":{"type":"string","description":"Key scheme: eip191 or ed25519 (default eip191)"},"operator_name":{"type":"string","description":"Public name of the operator running the agent"},"operator_contact":{"type":"string","description":"Public contact for the operator"},"principal_id":{"type":"string","description":"ID of the accountable principal on file"},"principal_kind":{"type":"string","description":"Kind of principal, e.g. individual or organization"},"principal_label":{"type":"string","description":"Public label for the principal"},"principal_attestation_method":{"type":"string","description":"How the Embassy verified the principal"},"validity_days":{"type":"number","description":"Days until the Agent ID expires"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the new Agent ID in action evidence"},"402":{"description":"x402 payment required ($0.25 USDC)"}}}},"/v1/agent-id/verify":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). Checks an Agent ID's current standing: valid, revoked, expired, or unknown. Identical response shape for every status; rate-limited per client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_id","idempotency_key"],"properties":{"agent_id":{"type":"string","description":"The Agent ID string returned at issuance (64 hex characters)"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the validity verdict in action evidence"},"402":{"description":"x402 payment required ($0.25 USDC)"},"429":{"description":"Rate limit exceeded"}}}},"/v1/agent-id/revoke":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). Retires an Agent ID instantly. Requires a signature from the accountable principal or the Embassy for cause.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_id","reason","revocation_signature"],"properties":{"agent_id":{"type":"string","description":"The Agent ID string returned at issuance (64 hex characters)"},"reason":{"type":"string","description":"Why the Agent ID is being retired (max 500 characters)"},"revocation_signature":{"type":"string","description":"Hex signature over agent-id-revoke:<agent_id>"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt recording the retirement"},"402":{"description":"x402 payment required ($0.25 USDC)"}}}},"/v1/agent-id/renew":{"post":{"summary":"Agents pay for work and prove what happened.","description":"Paid endpoint ($0.25 USDC on Base or Arbitrum One via x402). Renews an Agent ID: issues a fresh Agent ID with the same identity chain and a new expiry, and retires the old one. Requires the same principal-or-Embassy signature as retiring.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_id","revocation_signature"],"properties":{"agent_id":{"type":"string","description":"The Agent ID string returned at issuance (64 hex characters)"},"validity_days":{"type":"number","description":"Days until the renewed Agent ID expires"},"revocation_signature":{"type":"string","description":"Hex signature over agent-id-revoke:<agent_id>"},"idempotency_key":{"type":"string","description":"Client-generated idempotency key"}}}}}},"responses":{"200":{"description":"Signed Outcome Receipt with the new Agent ID in action evidence"},"402":{"description":"x402 payment required ($0.25 USDC)"}}}},"/terms":{"get":{"summary":"Terms of Service","description":"Public Terms of Service (text/markdown). Using any Embassy endpoint constitutes acceptance. Fees non-refundable once the action runs; maximum liability per receipt is the amount paid; receipts are evidence, not warranties; market data is not financial advice.","responses":{"200":{"description":"TERMS.md as text/markdown"}}}},"/v1/receipts/{receiptId}":{"get":{"summary":"Look up a receipt by ID","parameters":[{"name":"receiptId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public receipt view"},"404":{"description":"Unknown receipt"}}}},"/verify/{receiptId}":{"get":{"summary":"Human-checkable verification page for a receipt","description":"Renders any Outcome Receipt as a human-readable page: verdict, check transcript, settlement, and signature. Sellers link their “Verified by Embassy” badge here.","parameters":[{"name":"receiptId","in":"path","required":true,"schema":{"type":"string","pattern":"^emb_[0-9a-f]{24}$"}}],"responses":{"200":{"description":"Verification page (HTML)"},"400":{"description":"Invalid receipt ID format"},"404":{"description":"Unknown receipt"}}}},"/.well-known/x402.json":{"get":{"summary":"x402 machine-readable discovery document","responses":{"200":{"description":"Discovery document"}}}},"/.well-known/mcp.json":{"get":{"summary":"MCP machine-readable discovery document","responses":{"200":{"description":"MCP discovery document"}}}},"/.well-known/embassy-signer.json":{"get":{"summary":"Receipt signer public key and verification instructions","responses":{"200":{"description":"Signer info"}}}},"/.well-known/oasf.json":{"get":{"summary":"AGNTCY OASF agent descriptor record","responses":{"200":{"description":"OASF record"}}}}}}