DEV Community

Edison Flores
Edison Flores

Posted on

How to verify any AI agent credential in under 10 lines of code

The 10-line verification

import requests

def verify_credential(credential):
    r = requests.post(
        "https://www.marketnow.site/api/trust?action=verify",
        json={"payload": credential}
    )
    return r.json()

# That's it. No API key. No auth. No SDK.
result = verify_credential({
    "@context": ["https://www.w3.org/2018/credentials/v1"],
    "type": ["VerifiableCredential"],
    "issuer": "did:web:alice.example",
    "credentialSubject": {"id": "did:agent:bob"},
    "proof": {"type": "Ed25519Signature2020", "verificationMethod": "did:web:alice.example#key-1", "proofValue": "placeholder"}
})

print(result["valid"])  # True
print(result["format"])  # w3c-vc
print(result["uts"]["trust"]["score"])  # 5
Enter fullscreen mode Exit fullscreen mode

What you get back

The API returns:

  • valid — true/false
  • format — which of the 8 formats was detected
  • uts — the Universal Trust Schema with trust score, confidence, subject, revocation status
  • issues — list of problems if invalid
  • warnings — non-blocking warnings

8 formats auto-detected

You don't need to tell the API what format your credential is. It auto-detects:

  1. ATC v3 (Agent Trust Card)
  2. JWT (OAuth/OIDC)
  3. W3C Verifiable Credentials
  4. A2A (Google Agent-to-Agent)
  5. EAT-AI (IETF Entity Attestation)
  6. ZTA (Zero Trust Agent)
  7. MCP Server Cards
  8. X.509 certificates

In JavaScript

const result = await fetch("https://www.marketnow.site/api/trust?action=verify", {
    method: "POST",
    headers: {"Content-Type": "application/json"},
    body: JSON.stringify({payload: credential})
}).then(r => r.json());

if (!result.valid) {
    throw new Error(`Verification failed: ${result.issues}`);
}
Enter fullscreen mode Exit fullscreen mode

In Bash

curl -X POST "https://www.marketnow.site/api/trust?action=verify" -H "Content-Type: application/json" -d '{"payload": "..."}'
Enter fullscreen mode Exit fullscreen mode

In any language

The API is a simple HTTP POST. No SDK needed. No API key. No registration. CORS is open.

Links


10 lines. No auth. No key. Just verify.

Top comments (0)