TrustLayer
    Getting Started

    TrustLayer API Documentation

    Verify human identity and trust scores with a single API call. No personal data collected, fully non-custodial, cryptographic proof-based.

    1

    Get your API Key

    Create a free account and generate your API key from the Developer Portal.

    2

    Make your first call

    Send a POST request to the verify endpoint with an identity key.

    3

    Use the result

    Get trust_score, is_human, and risk_level in the response. Use it to gate access.

    Authentication

    All API requests require an API key passed in the x-api-key header.

    Header
    x-api-key: htl_live_xxxxxxxxxxxxxxxx
    Test Keys
    htl_test_*

    Unlimited requests, no billing. Returns simulated scores.

    Live Keys
    htl_live_*

    Production usage. Counted against your plan quota.

    API Endpoints

    Base URL:

    https://klzwvxcxjzhtgqpfyglc.supabase.co/functions/v1
    POST
    /v1-verify
    Core Endpoint

    Verify an identity's trust score and human probability. Returns real-time assessment based on cryptographic proof history.

    Request Body

    ParameterTypeDescription
    identity_keystringBase64-encoded public key of the identity to verify
    include_detailsbooleanInclude detailed proof metrics in response
    thresholdnumberCustom trust score threshold (0-100, default: 50)
    contextstringUse case context: "voting", "payment", "access"

    Code Examples

    curl
    curl -X POST https://klzwvxcxjzhtgqpfyglc.supabase.co/functions/v1/v1-verify \
      -H "Content-Type: application/json" \
      -H "x-api-key: htl_live_your_key_here" \
      -d '{
        "identity_key": "base64_public_key",
        "include_details": true
      }'
    POST
    /v1-verify
    Batch Mode

    Verify multiple identities in a single request. Pass an array of identity keys in the batch field. Max 100 per request.

    curl
    curl -X POST https://klzwvxcxjzhtgqpfyglc.supabase.co/functions/v1/v1-verify \
      -H "Content-Type: application/json" \
      -H "x-api-key: htl_live_your_key_here" \
      -d '{
        "batch": [
          { "identity_key": "key_1" },
          { "identity_key": "key_2" },
          { "identity_key": "key_3" }
        ]
      }'

    Response Format

    json
    {
      "is_human": true,
      "trust_score": 78,
      "risk_level": "low",
      "confidence": 92,
      "details": {
        "unique_interactions": 24,
        "total_proofs": 56,
        "network_diversity": 0.67,
        "account_age_days": 120,
        "last_activity_hours": 1,
        "proof_types": {
          "face_to_face": 8,
          "social_vouch": 12,
          "wallet_linked": 4
        }
      },
      "verification_id": "ver_a1b2c3d4e5",
      "timestamp": "2026-02-17T10:30:00Z",
      "cached": false
    }

    Response Fields

    is_humanbooleanWhether identity passes the human verification threshold
    trust_scorenumber0-100 composite score based on proof history, diversity, and time
    risk_levelstring"low" | "medium" | "high" | "unknown"
    confidencenumber0-100 confidence level in the assessment
    detailsobjectDetailed breakdown (when include_details: true)
    verification_idstringUnique ID for this verification event (for audit)
    cachedbooleanWhether result was served from cache

    Error Handling

    All errors return a consistent JSON structure with an error field.

    json
    {
      "error": "Invalid API key",
      "code": "AUTH_INVALID_KEY",
      "status": 401
    }
    StatusCodeDescription
    400
    INVALID_REQUESTMissing or malformed parameters
    401
    AUTH_INVALID_KEYInvalid or missing API key
    403
    KEY_INACTIVEAPI key has been revoked or suspended
    429
    RATE_LIMITEDToo many requests, retry after cooldown
    402
    QUOTA_EXCEEDEDMonthly quota exceeded (Starter tier)
    500
    INTERNAL_ERRORServer error, retry with exponential backoff

    Rate Limits

    Rate limits are applied per API key per minute. Headers are returned with each response.

    Starter
    Rate60/min
    Monthly1,000
    PriceFree
    Pro
    Rate300/min
    Monthly50,000
    Price$49/mo
    Enterprise
    Rate1,000/min
    Monthly500,000
    Price$299/mo

    Rate Limit Headers

    X-RateLimit-LimitMax requests per minute
    X-RateLimit-RemainingRequests remaining in current window
    X-RateLimit-ResetUnix timestamp when window resets

    SDKs & Libraries

    JavaScript / TypeScript
    npm install @trustlayer/sdk
    Coming Soon
    Python
    pip install trustlayer
    Coming Soon
    Go
    go get github.com/trustlayer/go-sdk
    Coming Soon
    Rust
    cargo add trustlayer
    Coming Soon

    Use Cases

    🏛️

    DAO Governance

    Ensure 1-person-1-vote in on-chain governance. Filter sybil attacks from proposal voting.

    🪂

    DeFi Airdrops

    Verify unique humans before token distribution. Prevent farming and multi-account abuse.

    🎮

    Gaming Anti-Bot

    Gate competitive features behind human verification. Keep bots out of ranked play.

    💬

    Social Platforms

    Build trust layers into social feeds. Show trust badges on verified human accounts.

    🛒

    Marketplace Trust

    Display seller trust scores. Reduce fraud in P2P trading and NFT marketplaces.

    🔐

    Access Control

    Gate premium features or communities behind minimum trust thresholds.

    Ready to integrate?

    Start with 1,000 free requests/month. No credit card required.