Trillboards Attention Metrics API

Attention-verified impression metrics from FEIN edge AI. Only Trillboards provides deterministic attention data in DOOH — measured by on-device computer vision, not estimated.

GitHub OpenAPI

Operations 3

GET /v1/advertiser/attribution/campaign/{campaignId}/attention Attention metrics summary #
GET /v1/advertiser/attribution/campaign/{campaignId}/attention/creative Per-creative attention comparison #
GET /v1/advertiser/attribution/campaign/{campaignId}/attention/timeseries Attention metrics over time #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trillboards-com:trillboards-com-attention-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trillboards-com-attention-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trillboards Attribution & Measurement Attention Metrics API
  version: 1.0.0
  description: 'Closed-loop DOOH attribution engine with attention-verified impressions,

    cross-channel multi-touch attribution, Bayesian incrementality measurement,

    and creative performance optimization.


    ## Why This Matters


    Traditional DOOH attribution estimates impressions using population data.

    Trillboards MEASURES them: on-device computer vision (ML Kit) counts faces

    and tracks gaze, audio classification (YAMNet TFLite) detects ambient context,

    and third-party mobile location signals (Intuizi) prove store visits.

    Every metric in this API is deterministic, not probabilistic.


    ## Authentication


    All endpoints require a valid JWT token in the Authorization header:

    ```

    Authorization: Bearer

    ```

    Tokens are obtained via `POST /v1/user/login`.


    ## Key Concepts


    - **aCPM (Attention CPM)**: Cost per 1,000 attention-verified impressions. Unlike standard CPM, aCPM only counts impressions where someone was actually looking at the screen.

    - **Incremental Lift**: The percentage increase in store visits attributable to the DOOH campaign, measured via geo-holdout experiments with matched control groups.

    - **CPIV (Cost Per Incremental Visit)**: Total media cost divided by the number of store visits that would NOT have happened without the campaign.

    - **Weighted Confidence**: Exposure match confidence (spatial/temporal) multiplied by attention weight from FEIN edge AI. Higher = more certain the person both saw AND paid attention to the ad.

    - **Attribution Chain**: A complete user journey across channels (billboard -> mobile ad -> web visit -> store visit) with credit allocation via multi-touch models.


    ## Attribution Pipeline (6 Layers)


    1. **Signal Ingestion** — Intuizi mobile device location pings + POI reference data

    2. **Exposure Matching** — PostGIS ST_DWithin joins device signals with ad plays

    3. **Attention Enrichment** — FEIN edge AI inference (face count, gaze, emotion) attached to each exposure

    4. **Identity Resolution** — Household clustering, cross-device graph, pixel visitor linking

    5. **Attribution** — Multi-touch credit allocation across DOOH + mobile + web + store channels

    6. **Measurement** — Bayesian + frequentist incrementality with geo-holdout experiments'
  contact:
    name: Trillboards Developer Support
    email: developers@trillboards.com
    url: https://trillboards.com/developers
  license:
    name: Proprietary
    url: https://trillboards.com/terms-of-service
servers:
- url: https://api.trillboards.com
  description: Production API
- url: http://localhost:4004
  description: Local development
tags:
- name: Attention Metrics
  description: 'Attention-verified impression metrics from FEIN edge AI.

    Only Trillboards provides deterministic attention data in DOOH —

    measured by on-device computer vision, not estimated.'
paths:
  /v1/advertiser/attribution/campaign/{campaignId}/attention:
    get:
      operationId: getCampaignAttention
      summary: Attention metrics summary
      description: 'Returns attention-verified impression metrics from FEIN edge AI.

        This is data that ONLY Trillboards can provide in DOOH.


        Unlike CTV viewability which uses probabilistic models ("MRC standard"

        = 50% of pixels visible for 2 seconds), Trillboards measures actual

        human attention via on-device computer vision:


        - **face_count**: How many people were actually in front of the screen

        - **attention_score**: What fraction were looking at the screen (gaze detection)

        - **dwell_seconds**: How long they stayed in view

        - **emotion_engagement**: Facial expression analysis (not recording, edge-only)

        - **aCPM**: Cost per 1,000 attention-verified impressions


        These are MEASURED signals, not estimates.'
      tags:
      - Attention Metrics
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      responses:
        '200':
          description: Attention metrics for the campaign
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/AttentionMetrics'
              example:
                success: true
                data:
                  campaign_id: camp_abc123
                  total_impressions: 128500
                  unique_devices: 45200
                  attention:
                    avg_attention_score: 0.72
                    median_attention_score: 0.68
                    p90_attention_score: 0.94
                    attention_qualified_pct: 64.3
                    avg_dwell_seconds: 8.4
                    avg_face_count: 2.3
                  economics:
                    standard_cpm: 12.5
                    attention_cpm: 19.4
                    cost_per_attentive_reach: 0.34
                    cost_per_attentive_visit: 8.75
                  emotion:
                    avg_emotion_engagement: 0.58
                    positive_emotion_pct: 42.1
                    emotion_breakdown:
                      neutral: 45.2
                      happy: 28.3
                      surprised: 13.8
                      interested: 8.4
                      other: 4.3
                  breakdowns:
                    daypart_breakdown:
                      morning:
                        avg_attention: 0.78
                        avg_dwell: 9.2
                      afternoon:
                        avg_attention: 0.65
                        avg_dwell: 7.1
                      evening:
                        avg_attention: 0.74
                        avg_dwell: 8.8
                    venue_type_breakdown:
                      gym:
                        avg_attention: 0.85
                        avg_dwell: 12.3
                      coffee_shop:
                        avg_attention: 0.71
                        avg_dwell: 6.5
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/advertiser/attribution/campaign/{campaignId}/attention/creative:
    get:
      operationId: getCreativeAttentionComparison
      summary: Per-creative attention comparison
      description: 'Compares attention metrics across creatives within a campaign.

        Answers: "Which creative gets more attention AND more store visits?"


        This is the holy grail of DOOH optimization — correlating creative

        execution with actual human attention and downstream conversion.

        No other platform can show this because no other platform measures

        attention at the creative level.'
      tags:
      - Attention Metrics
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      responses:
        '200':
          description: Per-creative attention comparison
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CreativeAttentionComparison'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/advertiser/attribution/campaign/{campaignId}/attention/timeseries:
    get:
      operationId: getAttentionTimeseries
      summary: Attention metrics over time
      description: 'Returns daily attention quality metrics. Use this to detect

        attention fatigue: if attention_score drops over time while

        impressions stay flat, the creative is wearing out and needs

        refreshing.'
      tags:
      - Attention Metrics
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      - name: startDate
        in: query
        schema:
          type: string
          format: date
      - name: endDate
        in: query
        schema:
          type: string
          format: date
      responses:
        '200':
          description: Daily attention metrics timeseries
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AttentionTimeseriesPoint'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    AttentionTimeseriesPoint:
      type: object
      properties:
        metric_date:
          type: string
          format: date
        total_impressions:
          type: integer
        avg_attention_score:
          type: number
        avg_dwell_seconds:
          type: number
        avg_face_count:
          type: number
        avg_emotion_engagement:
          type: number
        attention_qualified_pct:
          type: number
        attention_cpm:
          type: number
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        error:
          type: string
    CreativeAttentionComparison:
      type: object
      properties:
        creative_id:
          type: string
        impressions:
          type: integer
        avg_attention_score:
          type: number
        avg_dwell_seconds:
          type: number
        avg_emotion_engagement:
          type: number
        dominant_emotion:
          type: string
        attention_qualified_pct:
          type: number
        standard_cpm:
          type: number
        attention_cpm:
          type: number
    AttentionMetrics:
      type: object
      description: 'Attention-verified impression metrics from FEIN edge AI.

        Every field is MEASURED by on-device computer vision, not estimated.

        '
      properties:
        campaign_id:
          type: string
        total_impressions:
          type: integer
        unique_devices:
          type: integer
        attention:
          type: object
          properties:
            avg_attention_score:
              type: number
              minimum: 0
              maximum: 1
              description: Mean fraction of faces looking at screen across all impressions
            median_attention_score:
              type: number
            p90_attention_score:
              type: number
              description: 90th percentile — the attention floor for top 10% of impressions
            attention_qualified_pct:
              type: number
              description: Percentage of impressions with attention_score >= 0.5
            avg_dwell_seconds:
              type: number
              description: Average time faces were in view of the screen
            avg_face_count:
              type: number
              description: Average number of faces detected per impression
        economics:
          type: object
          description: Attention-adjusted pricing metrics
          properties:
            standard_cpm:
              type: number
              description: Traditional CPM (cost per 1,000 impressions)
            attention_cpm:
              type: number
              description: 'aCPM = cost / (SUM(attention_score * face_count) / 1000).

                The true cost of an attention-verified impression.

                '
            cost_per_attentive_reach:
              type: number
            cost_per_attentive_visit:
              type: number
        emotion:
          type: object
          properties:
            avg_emotion_engagement:
              type: number
            positive_emotion_pct:
              type: number
              description: Percentage of impressions with happy/surprised/interested emotions
            emotion_breakdown:
              type: object
              additionalProperties:
                type: number
        breakdowns:
          type: object
          properties:
            daypart_breakdown:
              type: object
              additionalProperties:
                type: object
            venue_type_breakdown:
              type: object
              additionalProperties:
                type: object
  parameters:
    campaignId:
      name: campaignId
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-zA-Z0-9_-]{1,128}$
      description: Campaign identifier
  responses:
    Unauthorized:
      description: Missing or invalid authentication token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained via POST /v1/user/login