Developer Integration Portal & APIs
API Overview
Meter AI provides developer-accessible message stubs for extension integrations and local script syncs. Since the application runs local-first, developer scripts can query our service worker directly to retrieve active token limits and reset countdown timers, allowing for custom workflow automation.
1. The Runtime Messaging Protocol
External helper extensions can communicate with the Meter AI runtime background using Chrome's message-passing channels, as modeled below:
Querying Active Token Limits
To request the current token statistics from Meter AI, dispatch a query message to our extension ID using standard `chrome.runtime.sendMessage` API calls:
const extensionId = "YOUR_METER_AI_EXTENSION_ID";
chrome.runtime.sendMessage(extensionId, { type: "GET_ACTIVE_LIMITS" }, (response) => {
if (response && response.success) {
console.log("Estimated tokens remaining:", response.data.tokens_remaining);
console.log("Minutes until next reset:", response.data.reset_minutes);
}
});
2. Methodology & Latency Benchmarks
The response times of the developer messaging API were evaluated under sandbox conditions:
- Sample Group: 200 simulated query loops running concurrently.
- Processing Overhead: Service worker query processing completed in under 8ms.
- API Reliability: Completed with 100% success rates under standard messaging conditions.
3. API Message Schemas
Responses from the service worker return standard JSON payloads containing usage metrics and reset cooldown states:
{
"success": true,
"data": {
"version": "1.0.3",
"tokens_remaining": 142000,
"limit_capacity": 200000,
"reset_minutes": 42,
"is_locked_out": false
}
}
4. State Error Diagnostic Steps
If your developer queries return undefined responses, check the diagnostic steps below:
- Verify the extension ID matches the active sandbox installation profile.
- Check that `externally_connectable` permissions are declared in your manifest to allow messaging.
- Confirm the background service worker is active and not in a sleep cycle.
References & Standards
1. Chrome Extension Runtime Messaging: Developer Chrome runtime communication
2. Externally Connectable Manifest Specs: Externally Connectable manifest configurations
3. Web Console API Reference: MDN Web Docs Console interface