Integrations

Plugs into
what you already run.

Three ways in, and they all end in the same place: your usage, rated, on the same dashboards. Pick the laziest one that fits.

Write no code at all

For usage that already exists on a machine you control. One command, no code.

2 options below

Seven lines in the language you already use

For usage that happens inside your application. A thin wrapper per ecosystem.

3 options below

One HTTPS call, from anything

For everything else. One endpoint, JSON in, per-item results out.

1 option below

Every source, with the code

These are the snippets you would paste, not a summary of them.

Agent

FreeSWITCH

Reads the CDRs your switch already writes.

The installer finds your CDR directory, tails new records, and forwards them. It can backfill the last 72 hours so your first dashboard is not empty. No inbound ports, no root, and uninstall is one command.

Typical event types
call, sms
Read the FreeSWITCH docs
Run on the machine with your CDRs
$curl -sL https://thepixeldata.com/install.sh | bash

Agent

Asterisk

Same agent, same command, detects Asterisk instead.

Works against the CDR CSV or the CDR database backend. If both are present it asks which one you bill from, rather than guessing and being wrong about your revenue.

Typical event types
call, sms
Read the Asterisk docs
Run on the machine with your CDRs
$curl -sL https://thepixeldata.com/install.sh | bash

SDK

Node.js

Seven lines. Auth, batching and retries handled.

Events are buffered and flushed on a timer or at 500, whichever comes first. Failed batches retry with backoff and survive a restart, so a deploy never loses usage.

Typical event types
api_call, tokens, custom
Read the Node.js docs
import { PixelData } from "@pixeldata/node";

const pixel = new PixelData({ key: process.env.PIXEL_KEY! });

await pixel.track({
  event_id: crypto.randomUUID(),
  event_type: "api_call",
  timestamp: new Date().toISOString(),
  account: "acct_orbitapi",
  quantity: 1,
  unit: "requests",
  properties: { endpoint: "/v1/verify" }
});

SDK

PHP / Laravel

A Composer package with a service provider.

Tracking is dispatched to your queue, so it never sits in the request path. Publish the config to change the batch size or point a test environment at a separate tenant.

Typical event types
sms, api_call, custom
Read the PHP / Laravel docs
use PixelData\Facades\Pixel;

Pixel::track([
    'event_id'   => (string) Str::uuid(),
    'event_type' => 'sms',
    'timestamp'  => now()->toIso8601String(),
    'account'    => $customer->reference,
    'quantity'   => 1,
    'unit'       => 'messages',
    'properties' => ['destination' => $message->to],
]);

SDK

Python

One import, one call, any Python service.

Useful for AI workloads in particular: send token counts per model and per direction, and rate input and output separately in fractions of a penny.

Typical event types
tokens, api_call
Read the Python docs
from pixeldata import PixelData

pixel = PixelData(key=os.environ["PIXEL_KEY"])

pixel.track(
    event_id=str(uuid.uuid4()),
    event_type="tokens",
    timestamp=datetime.now(timezone.utc).isoformat(),
    account="acct_kestrelai",
    quantity=18402,
    unit="tokens",
    properties={"model": "atlas-large", "kind": "input"},
)

HTTPS API

cURL and the plain HTTPS API

No SDK at all. This is the compatibility guarantee.

One endpoint takes a single event or an array of up to 500, and answers per item — valid events are never rejected because an invalid one shared the batch. Anything that can make an HTTPS request can integrate.

Typical event types
anything you like
Read the cURL and the plain HTTPS API docs
curl -X POST https://api.thepixeldata.com/v1/events \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "event_id": "5f0c1d84-6b1e-4a0e-9c7d-2e4b8f1a3c55",
    "event_type": "call",
    "timestamp": "2024-05-27T14:02:11Z",
    "account": "acct_alphacomms",
    "quantity": 372,
    "unit": "seconds",
    "properties": { "destination": "447700900123" }
  }'

Not listed? Anything that can make an HTTPS request can integrate — there is no supported-platform list to be on the wrong side of. See the API reference.

Node.js, PHP, Laravel, Python, cURL, FreeSWITCH and Asterisk are the trademarks of their respective owners. The marks shown are simplified representations, and imply no affiliation or endorsement.

One account, one key, every source

Every additional source is one line or one command, never a project. They all land in the same dashboards on thepixeldata.com.

See your own usage on a dashboard today.

Install takes one command. If you would rather look first, the sandbox is open — sample data, no card, no signup.