{"_id":"@dodopayments/ingestion-blueprints","_rev":"7-e2d0732e04fb03138720e54e1a8f7367","name":"@dodopayments/ingestion-blueprints","dist-tags":{"latest":"0.6.1"},"versions":{"0.1.0":{"name":"@dodopayments/ingestion-blueprints","version":"0.1.0","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"_id":"@dodopayments/ingestion-blueprints@0.1.0","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"dist":{"shasum":"9ec04708a0dafd780f8f75ec3c650e7263aa58ec","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.1.0.tgz","fileCount":25,"integrity":"sha512-kvI5nprkpUCcnGA8cBko+a+n8xJDGVsR3QT5GPH8SEtQcoTWLP53Fd/kVbEVVzSChZ5YhYT938yBpgOyevH/vA==","signatures":[{"sig":"MEUCIQDkefeH3NQvGvE5BXPpLNnjJf2VIRLjwg/RNVJec9mrCgIgQ6RrcUny7lPa6ZJos/u0DtBYNJ8NhTHxQX2YiHMdCwU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":99761},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"890057a9d155cf94da74ccbf6c4f660eb5fba463","scripts":{"dev":"rollup -c -w","lint":"eslint src/**/*.ts","build":"rollup -c","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dodopayments","email":"ayush@dodopayments.com"},"repository":{"url":"git+https://github.com/dodopayments/ingestion-blueprints.git","type":"git"},"_npmVersion":"10.8.2","description":"Sophisticated Dodo Payments Ingestion Blueprints","directories":{},"_nodeVersion":"20.19.5","dependencies":{"dodopayments":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.36.0","rimraf":"^6.0.1","rollup":"^4.45.0","typescript":"^5.8.2","@types/node":"^24.5.2","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.44.1","@rollup/plugin-node-resolve":"^16.0.0","@typescript-eslint/eslint-plugin":"^8.44.1"},"_npmOperationalInternal":{"tmp":"tmp/ingestion-blueprints_0.1.0_1759487127201_0.8586576153199714","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dodopayments/ingestion-blueprints","version":"0.2.0","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"_id":"@dodopayments/ingestion-blueprints@0.2.0","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"dist":{"shasum":"d1bab9729b8177c038dc4eb8f7850f50394833fd","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.2.0.tgz","fileCount":25,"integrity":"sha512-FH2vsWv7D3/XWhMsO1XomCJKHlqGz6sq7y2oVACcGK7FQiM10xmfP6R7J/5p8k75/xSayrWDFyFdul1dryB7Zw==","signatures":[{"sig":"MEQCIHD+mBpxZ9DozdmLvBcx4Ar1s657Q/GtEwNtBMnBGp3kAiAy7jhFavBEy+TmnUE93AOG4ZCEbt3aCd+m3oD32GeC3w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":103295},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"0e7d2b9fede84c94f168a368fdb2ade99ed82e95","scripts":{"dev":"rollup -c -w","lint":"eslint src/**/*.ts","build":"rollup -c","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dodopayments","email":"ayush@dodopayments.com"},"repository":{"url":"git+https://github.com/dodopayments/ingestion-blueprints.git","type":"git"},"_npmVersion":"10.8.2","description":"Sophisticated Dodo Payments Ingestion Blueprints","directories":{},"_nodeVersion":"20.19.5","dependencies":{"dodopayments":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.36.0","rimraf":"^6.0.1","rollup":"^4.45.0","typescript":"^5.8.2","@types/node":"^24.5.2","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.44.1","@rollup/plugin-node-resolve":"^16.0.0","@typescript-eslint/eslint-plugin":"^8.44.1"},"_npmOperationalInternal":{"tmp":"tmp/ingestion-blueprints_0.2.0_1759522131238_0.6130122621895018","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@dodopayments/ingestion-blueprints","version":"0.3.1","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"_id":"@dodopayments/ingestion-blueprints@0.3.1","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"dist":{"shasum":"ff265a690fd33db63a2f7e6a523a5c12a7698696","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.3.1.tgz","fileCount":25,"integrity":"sha512-/TVQ6dwl7dBH50c8V4BwZFTAJtz6v1Jh+eVMV3XuWzv+2+5T4PbX38r3Voq/8NUOrDhRqYYDtmtI8eXX99oPhA==","signatures":[{"sig":"MEUCIQCXP5xWheBMeA8ZrpcpwPt/rFdgEij9Lzd5Ekv29UY1ugIgapsWgfpvZMtJvObdWzXpRo+Zuahc0ZKl8eYPSs3Todg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":104341},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ac4a6315cd70f23bfb1d33d19a23aa64a075302c","scripts":{"dev":"rollup -c -w","lint":"eslint src/**/*.ts","build":"rollup -c","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dodopayments","email":"ayush@dodopayments.com"},"repository":{"url":"git+https://github.com/dodopayments/ingestion-blueprints.git","type":"git"},"_npmVersion":"10.8.2","description":"Sophisticated Dodo Payments Ingestion Blueprints","directories":{},"_nodeVersion":"20.19.5","dependencies":{"dodopayments":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.36.0","rimraf":"^6.0.1","rollup":"^4.45.0","typescript":"^5.8.2","@types/node":"^24.5.2","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.44.1","@rollup/plugin-node-resolve":"^16.0.0","@typescript-eslint/eslint-plugin":"^8.44.1"},"_npmOperationalInternal":{"tmp":"tmp/ingestion-blueprints_0.3.1_1760003212190_0.08740752198058077","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@dodopayments/ingestion-blueprints","version":"0.4.0","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"_id":"@dodopayments/ingestion-blueprints@0.4.0","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"dist":{"shasum":"7d2a88d4ead902c8f92d2119ff3247ed87885940","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.4.0.tgz","fileCount":35,"integrity":"sha512-89eU26ubS54xt7v/OmxCBw1Czt8kHduawUuWXgPC9fPFjvcg+qx5/qQ8RwedDdrNUbaZsydmnrol3DcAUv9guw==","signatures":[{"sig":"MEQCIGi1bA0V58q3NDRNKYEqfnM3VcaD9q7kqWO4LauV4s6XAiAdZAdD405USUJeThzathZwbD04P7N3l0lRkDVxhS81sg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":127657},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"dfeb6952ebe688f807dbd1e2f1b72466587fb10a","scripts":{"dev":"rollup -c -w","lint":"eslint src/**/*.ts","build":"rollup -c","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dodopayments","email":"ayush@dodopayments.com"},"repository":{"url":"git+https://github.com/dodopayments/ingestion-blueprints.git","type":"git"},"_npmVersion":"10.8.2","description":"Sophisticated Dodo Payments Ingestion Blueprints","directories":{},"_nodeVersion":"20.19.5","dependencies":{"dodopayments":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.36.0","rimraf":"^6.0.1","rollup":"^4.45.0","typescript":"^5.8.2","@types/node":"^24.5.2","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.44.1","@rollup/plugin-node-resolve":"^16.0.0","@typescript-eslint/eslint-plugin":"^8.44.1"},"_npmOperationalInternal":{"tmp":"tmp/ingestion-blueprints_0.4.0_1760296226113_0.2884501883927624","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@dodopayments/ingestion-blueprints","version":"0.5.0","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"_id":"@dodopayments/ingestion-blueprints@0.5.0","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"dist":{"shasum":"82e44d2d38ca9f5e728b62e69b7f792aafda45bd","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.5.0.tgz","fileCount":35,"integrity":"sha512-vb0RANKO9R6XQj0tPYk1CCt/SmE4ffdz+K2tJCSdvFUEeH5LfSvgeK2NsS6XJSDmLxd4pmZ+yyCZTSpOkwP+Mg==","signatures":[{"sig":"MEYCIQDpohUwA1/HtvDHXPw9DXgKaoqwNAWeDIC1QELTx/W9NQIhAIVz5mfxSe6LWp0qI0yJbhv8TT2/JSKUhZjhPfvsq/h4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":122555},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e92fdbbe55654d238d6c4e25dc293f24b0188158","scripts":{"dev":"rollup -c -w","lint":"eslint src/**/*.ts","build":"rollup -c","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dodopayments","email":"ayush@dodopayments.com"},"repository":{"url":"git+https://github.com/dodopayments/ingestion-blueprints.git","type":"git"},"_npmVersion":"10.8.2","description":"Sophisticated Dodo Payments Ingestion Blueprints","directories":{},"_nodeVersion":"20.19.5","dependencies":{"dodopayments":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.36.0","rimraf":"^6.0.1","rollup":"^4.45.0","typescript":"^5.8.2","@types/node":"^24.5.2","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.44.1","@rollup/plugin-node-resolve":"^16.0.0","@typescript-eslint/eslint-plugin":"^8.44.1"},"_npmOperationalInternal":{"tmp":"tmp/ingestion-blueprints_0.5.0_1760422503727_0.0670816389862785","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@dodopayments/ingestion-blueprints","version":"0.6.0","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"_id":"@dodopayments/ingestion-blueprints@0.6.0","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"dist":{"shasum":"ac33ddd8516570bab0b81c1a5550f2b4e696ba5b","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.6.0.tgz","fileCount":35,"integrity":"sha512-xUCOpGrEHwiq5TzZ7iX+RFXyd+nZpnCOm1d49IJU4ZT5PjCKSa33Bsb1G9QjpUznlJ7ydC5AaMdbkpWuXA0yyQ==","signatures":[{"sig":"MEQCIBLS9EfE/f8zsn/rhNJU0p3za09d8VPGc628PYXzNebYAiBK3fkpbSj0UbZS29b6laMqea8HLSTlVJvKGE8QPwfITg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":122556},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"65c2d32613f27ffe326e65c687ddc413ea0cf9dc","scripts":{"dev":"rollup -c -w","lint":"eslint src/**/*.ts","build":"rollup -c","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dodopayments","email":"ayush@dodopayments.com"},"repository":{"url":"git+https://github.com/dodopayments/ingestion-blueprints.git","type":"git"},"_npmVersion":"10.8.2","description":"Sophisticated Dodo Payments Ingestion Blueprints","directories":{},"_nodeVersion":"20.19.6","dependencies":{"dodopayments":"^2.11.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.39.2","rimraf":"^6.1.2","rollup":"^4.53.5","typescript":"^5.9.3","@types/node":"^25.0.3","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0","@typescript-eslint/parser":"^8.50.0","@rollup/plugin-node-resolve":"^16.0.3","@typescript-eslint/eslint-plugin":"^8.50.0"},"_npmOperationalInternal":{"tmp":"tmp/ingestion-blueprints_0.6.0_1766223460014_0.9986655496146515","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@dodopayments/ingestion-blueprints","version":"0.6.1","type":"module","description":"Sophisticated Dodo Payments Ingestion Blueprints","main":"./dist/index.cjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"rollup -c","dev":"rollup -c -w","lint":"eslint src/**/*.ts","typecheck":"tsc --noEmit","clean":"rimraf dist"},"keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"author":{"name":"Dodo Payments"},"dependencies":{"dodopayments":"^2.11.0"},"devDependencies":{"@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.3","@rollup/plugin-typescript":"^12.3.0","@types/node":"^25.0.3","@typescript-eslint/eslint-plugin":"^8.50.0","@typescript-eslint/parser":"^8.50.0","eslint":"^9.39.2","rimraf":"^6.1.2","rollup":"^4.53.5","tslib":"^2.8.1","typescript":"^5.9.3"},"repository":{"type":"git","url":"git+https://github.com/dodopayments/ingestion-blueprints.git"},"gitHead":"f5d2fb60981445f12c3d8a34d564cc86c00e26a5","_id":"@dodopayments/ingestion-blueprints@0.6.1","bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","_nodeVersion":"20.20.2","_npmVersion":"11.6.2","dist":{"integrity":"sha512-+OgDckufibJegXr6e+P/ogGW0eEFkuLTbE4UgE6DtwBcFGou7ZKICX6NIPh14/h6QC1LdUCUTNMvaEuxeIrSJw==","shasum":"b51f71d06c025b5fc69f9be96afd27719736bc63","tarball":"https://registry.npmjs.org/@dodopayments/ingestion-blueprints/-/ingestion-blueprints-0.6.1.tgz","fileCount":35,"unpackedSize":122556,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dodopayments%2fingestion-blueprints@0.6.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCqddrLmAOtbAyXC//kvk3/dV1bebGTNgWM2VR93GRiigIhAMNj2Wt8sVfz1FmPdsKOF9wshTynf4lS2u86e6Xuqy6A"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ea4eb602-e394-4504-bb16-063677cb6014"}},"directories":{},"maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ingestion-blueprints_0.6.1_1787555703483_0.0420513117610688"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-03T10:25:27.102Z","modified":"2026-08-24T07:15:03.884Z","0.1.0":"2025-10-03T10:25:27.408Z","0.2.0":"2025-10-03T20:08:51.436Z","0.3.1":"2025-10-09T09:46:52.376Z","0.4.0":"2025-10-12T19:10:26.290Z","0.5.0":"2025-10-14T06:15:03.925Z","0.6.0":"2025-12-20T09:37:40.173Z","0.6.1":"2026-08-24T07:15:03.609Z"},"bugs":{"url":"https://github.com/dodopayments/ingestion-blueprints/issues"},"author":{"name":"Dodo Payments"},"homepage":"https://github.com/dodopayments/ingestion-blueprints#readme","keywords":["dodo-payments","usage-based-billing","llm","token-tracking","ingestion","billing"],"repository":{"type":"git","url":"git+https://github.com/dodopayments/ingestion-blueprints.git"},"description":"Sophisticated Dodo Payments Ingestion Blueprints","maintainers":[{"name":"dodopayments","email":"ayush@dodopayments.com"}],"readme":"# Ingestion Blueprints\n\n<p align=\"center\">\n  <img src=\"./.github/cover.png\" alt=\"Ingestion Blueprints Cover\" width=\"100%\" />\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@dodopayments/ingestion-blueprints\">\n    <img src=\"https://img.shields.io/npm/v/@dodopayments/ingestion-blueprints?color=cb3837&label=npm&logo=npm\" alt=\"npm version\" />\n  </a>\n  <a href=\"https://discord.gg/bYqAp4ayYh\">\n    <img src=\"https://img.shields.io/discord/1305511580854779984?label=Join%20Discord&logo=discord\" alt=\"Join Discord\" />\n  </a>\n  <a href=\"LICENSE\">\n    <img src=\"https://img.shields.io/badge/license-GPLv3-blue.svg\" alt=\"License: GPLv3\" />\n  </a>\n</p>\n\n**Pre-built solutions to track usage and automate billing for your SaaS.** Track LLM tokens, API calls, storage uploads, streaming bandwidth, and compute time with just a few lines of code.\n\n## Available Blueprints\n\n- **[LLM Tracking](#llm-blueprint)** - Automatic token usage tracking for OpenAI, Anthropic, Groq, AI SDK, and more\n- **[API Gateway](#api-gateway-blueprint)** - Track API calls and implement usage-based API billing\n- **[Object Storage](#object-storage-blueprint)** - Monitor file uploads to S3, GCS, Azure Blob, and other storage services\n- **[Stream](#stream-blueprint)** - Track streaming data consumption for video, audio, and live streams\n- **[Time Range](#time-range-blueprint)** - Bill based on compute time for serverless functions, containers, and VMs\n\n---\n\n## LLM Blueprint\n\nTrack LLM token usage automatically for usage-based billing. Works with OpenAI, Anthropic, Groq, AI SDK, Google Gemini, and OpenRouter.\n\n📖 **[Full Documentation](https://docs.dodopayments.com/developer-resources/ingestion-blueprints/llm)**\n\n### Example\n```javascript\nimport { createLLMTracker } from '@dodopayments/ingestion-blueprints';\nimport { generateText } from 'ai';\nimport { google } from '@ai-sdk/google';\n\nconst llmTracker = createLLMTracker({\n  apiKey: process.env.DODO_PAYMENTS_API_KEY,\n  environment: 'test_mode',\n  eventName: 'your_meter_event_name'\n});\n\nconst client = llmTracker.wrap({\n  client: { generateText },\n  customerId: 'customer_123'\n});\n\nconst response = await client.generateText({\n  model: google('gemini-2.0-flash'),\n  prompt: 'Hello!',\n  maxOutputTokens: 500\n});\n\nconsole.log(response.text);\nconsole.log(response.usage);\n// ✅ Usage automatically tracked to Dodo Payments!\n```\n\n---\n\n## API Gateway Blueprint\n\nTrack API calls at the gateway level for usage-based API billing. Perfect for API-as-a-service platforms and multi-tenant SaaS.\n\n📖 **[Full Documentation](https://docs.dodopayments.com/developer-resources/ingestion-blueprints/api-gateway)**\n\n### Example\n```javascript\nimport { Ingestion, trackAPICall } from '@dodopayments/ingestion-blueprints';\n\nconst ingestion = new Ingestion({\n  apiKey: process.env.DODO_PAYMENTS_API_KEY,\n  environment: 'test_mode',\n  eventName: 'api_call'\n});\n\n// Track an API call\nawait trackAPICall(ingestion, {\n  customerId: 'customer_123',\n  metadata: {\n    endpoint: '/api/v1/users',\n    method: 'GET',\n    status_code: 200,\n    response_time_ms: 45\n  }\n});\n```\n\n---\n\n## Object Storage Blueprint\n\nTrack file uploads and storage usage for S3, Google Cloud Storage, Azure Blob, and other object storage services.\n\n📖 **[Full Documentation](https://docs.dodopayments.com/developer-resources/ingestion-blueprints/object-storage)**\n\n### Example\n```javascript\nimport { Ingestion, trackObjectStorage } from '@dodopayments/ingestion-blueprints';\n\nconst ingestion = new Ingestion({\n  apiKey: process.env.DODO_PAYMENTS_API_KEY,\n  environment: 'test_mode',\n  eventName: 'object_storage_upload'\n});\n\n// Track S3 upload\nawait trackObjectStorage(ingestion, {\n  customerId: 'customer_123',\n  bytes: 1048576, // 1MB\n  metadata: {\n    bucket: 'my-bucket',\n    key: 'uploads/document.pdf'\n  }\n});\n```\n\n---\n\n## Stream Blueprint\n\nTrack streaming data consumption for video, audio, live streams, and real-time data transfer billing.\n\n📖 **[Full Documentation](https://docs.dodopayments.com/developer-resources/ingestion-blueprints/stream)**\n\n### Example\n```javascript\nimport { Ingestion, trackStreamBytes } from '@dodopayments/ingestion-blueprints';\n\nconst ingestion = new Ingestion({\n  apiKey: process.env.DODO_PAYMENTS_API_KEY,\n  environment: 'test_mode',\n  eventName: 'stream_consumption'\n});\n\n// Track video streaming\nawait trackStreamBytes(ingestion, {\n  customerId: 'customer_123',\n  bytes: 10485760, // 10MB\n  metadata: {\n    stream_type: 'video'\n  }\n});\n```\n\n---\n\n## Time Range Blueprint\n\nTrack resource consumption based on elapsed time for serverless functions, containers, VMs, and any time-based billing.\n\n📖 **[Full Documentation](https://docs.dodopayments.com/developer-resources/ingestion-blueprints/time-range)**\n\n### Example\n```javascript\nimport { Ingestion, trackTimeRange } from '@dodopayments/ingestion-blueprints';\n\nconst ingestion = new Ingestion({\n  apiKey: process.env.DODO_PAYMENTS_API_KEY,\n  environment: 'test_mode',\n  eventName: 'function_execution'\n});\n\n// Track function execution time\nconst startTime = Date.now();\nawait yourBusinessLogic();\nconst durationMs = Date.now() - startTime;\n\nawait trackTimeRange(ingestion, {\n  customerId: 'customer_123',\n  durationMs: durationMs,\n  metadata: {\n    function_name: 'image-processor',\n    memory_mb: 512\n  }\n});\n```\n\n---\n\n## Try the Examples\n\nAll blueprints come with runnable examples you can try immediately.\n\n### Setup\n\n1. **Clone and install**:\n   ```bash\n   git clone https://github.com/dodopayments/ingestion-blueprints.git\n   cd ingestion-blueprints\n   npm install\n   npm run build\n   ```\n\n2. **Set up environment variables** in `examples/.env`:\n    ```bash\n    DODO_PAYMENTS_API_KEY=your_dodo_key_here\n    OPENAI_API_KEY=your_openai_key_here\n    ANTHROPIC_API_KEY=your_anthropic_key_here\n    GROQ_API_KEY=your_groq_key_here\n    GOOGLE_GENERATIVE_AI_API_KEY=your_google_key_here\n    OPENROUTER_API_KEY=your_openrouter_api_key_here\n    ```\n\n3. **Run examples**:\n   ```bash\n   cd examples\n   npm install\n\n   # LLM examples\n   npx tsx ai-sdk-example.ts\n   npx tsx openai-example.ts\n   npx tsx anthropic-example.ts\n   npx tsx groq-example.ts\n   npx tsx google-genai-example.ts\n   npx tsx openrouter-example.ts\n\n   # Other blueprint examples\n   npx tsx api-gateway-example.ts\n   npx tsx object-storage-example.ts\n   npx tsx stream-example.ts\n   npx tsx time-range-example.ts\n   ```\n\n---\n\n## Why Use Ingestion Blueprints?\n\n- **🚀 Quick Integration** - Get started in minutes with pre-built solutions\n- **📊 Accurate Tracking** - Automatic usage capture with no manual logging\n- **💰 Usage-Based Billing** - Convert usage directly into billing events\n- **🔧 Flexible** - Track tokens, bytes, API calls, time, or custom metrics\n- **🎯 Production-Ready** - Battle-tested, TypeScript support, minimal overhead\n- **🌐 Universal** - Works with a variety of popular providers\n\n**Perfect for:** SaaS platforms, AI applications, API services, streaming platforms, cloud compute billing.\n\n---\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.\n\n## Security\n\nPlease report security vulnerabilities to security@dodopayments.com. See our [Security Policy](SECURITY.md) for more information.\n\n## Support\n\n- 📧 Email: support@dodopayments.com\n- 💬 Discord: [Join our Discord](https://discord.gg/bYqAp4ayYh)\n- 📖 Documentation: [Dodo Payments Docs](https://docs.dodopayments.com)","readmeFilename":"README.md"}