# FAQ

This page addresses common technical questions developers may have when integrating Revenium for AI cost tracking, usage metering, and billing. If you're just getting started, we recommend reviewing the [Quick Start Guide](https://docs.revenium.io/quick-start-guide) first.

[Sign Up Here](https://app.revenium.ai/sign-up).

***

### 🔧 Setup & Integration

#### **Do I need to modify my API calls to use Revenium?**

If you're using one of our SDKs, no changes to your API logic are needed beyond importing the Revenium wrapper and optionally passing usage metadata. This is generally a one-line integration to add basic tracking. Our SDK wraps the AI provider's native client library to extract transactional metadata for storage and analysis.

\
For direct API integrations, you'll send usage events to Revenium via POST requests.

***

#### **Which languages or frameworks are supported?**

As this list is regularly evolving, please check the [Integration Options](https://docs.revenium.io/integration-options-for-ai-metering#supported-sdk-integrations) page for details.

***

### 📈 Performance & Overhead

#### **Will using the Revenium SDK slow down my application?**

No. SDK calls are async and typically add **<50ms** per call. Usage data is queued and sent in the background.

***

#### **Can I batch events instead of sending them per-request?**

Yes, though batching is only supported in **direct API integration mode**, not via the SDK. If you choose this integration model, you'll need to review the direct API integration process on the [Integration Options](https://docs.revenium.io/integration-options-for-ai-metering) page:

***

### ✅ Validation & Troubleshooting

#### **Why did my metering call return 201 but the cost shows $0?**

The metering API returns `201 Created` even when your payload contains unrecognized field names. Misspelled or incorrect fields are silently ignored, which means token counts or cost-relevant data may not be processed.

**Common causes:**

* Using `imageCount` instead of `actualImageCount`
* Using `audioLength` instead of `audioDurationSeconds`
* Using `stop_reason` instead of `stopReason`
* Omitting the required `stopReason` field entirely

**How to fix:**

1. Review the [API documentation](https://revenium.readme.io/reference/meter_ai_completion) to verify exact field names
2. Check the AI Analytics dashboard to confirm costs are being calculated
3. Use one of our [SDKs](https://docs.revenium.io/integration-options-for-ai-metering#supported-sdk-integrations) to avoid field-name issues entirely — SDKs handle correct field mapping automatically

***

#### **What happens if I send metadata incompatible with Revenium?**

When using our SDK, the good news is, because our wrapping function is async / 'fire and forget', your call to the AI provider will continue unaffected, though usage to Revenium will not be tracked. Most of our SDKs use standard logging to inform that this has occurred so you can be aware of the problem and fix whatever is causing the failure to Revenium's metering engine.

***

#### **How can I test whether usage is being tracked?**

Go to the [**AI Transactions** log](https://docs.revenium.io/system-and-transaction-logs) page in the Revenium UI to see usage, tokens, latency, and cost per call. You can also verify metadata like orgs and subscribers there.

***

### 📊 Usage Metadata

#### **Which fields should I always include in `usage_metadata`?**

This varies by use case, but we generally recommend these as a solid starting point as they're broadly useful in internal & external use cases alike:

* `organizationId` – for customer-level grouping
* `subscriber.id` – for user-level reporting
* `productId` – for feature- or product-based cost attribution
* `taskType` – for purpose-based classification

See the full [Metadata Reference](https://docs.revenium.io/integration-options-for-ai-metering#usage-metadata-reference) for additional options.

***

#### **Do I need to use snake\_case or camelCase for metadata fields?**

Use whatever is idiomatic for your environment. Our SDKs handle proper casing automatically. If you're using our direct API integration, read the [instructions here](https://docs.revenium.io/integration-options-for-ai-metering#direct-api-integration).

***

#### **Can I tag anonymous usage and update it later?**

Yes. You can:

* Use a temporary subscriberId or credential value for anonymous users
* Later update the subscriber record with a real `id` or `email`

This helps associate historic usage with real users once identified.

***

### 💰 Billing & Cost Attribution

#### **How does Revenium calculate AI cost per request?**

If you're using the SDK, Revenium automatically extracts:

* Model name and vendor
* Token counts
* Pricing tier

We apply your vendor's pricing model (e.g., OpenAI) and update cost tracking automatically. You don’t need to calculate total cost, we'll do it for you. If you're an enterprise with custom pricing from the AI providers, we support custom pricing in our Enterprise plans.

***

#### **What if I’m using a model not yet supported by Revenium?**

For custom fine-tined models, we support tracking costs related to these on our enterprise plans.

For public models, even brand new ones, this shoudn't happen in practice, but if necessary, you can request support for a new provider or model at <support@revenium.io>

***

#### **Can I override the cost calculated by Revenium?**

Yes, in the direct API integration mode you can send:

* `totalCost`
* `inputTokenCount` / `outputTokenCount`

In this case, our pricing engine will override the normally calculated costs with a value you provide.

***

#### **Where can I manage AI model pricing?**

Go to **Settings → AI Models & Pricing** to view and manage model pricing. Here you can:

* **View all models** — See global models (provider defaults) and any custom models you've added
* **Filter by type** — Use the dropdown to show All, Global, or Custom models
* **Edit pricing** — Override default pricing for specific models (e.g., negotiated enterprise rates)
* **View history** — Track pricing changes over time via the Actions menu → View History

{% hint style="info" %}
Custom pricing is useful when you have negotiated rates with AI providers that differ from published pricing.
{% endhint %}

***

### 📣 Alerts & Monitoring

#### **Can I receive alerts when usage or cost spikes?**

Yes. Use Cost & Performance Alerts to:

* Get notified via Slack or email
* Set thresholds by org, user, model, or product
* Monitor error rates and latency anomalies

***

#### **How often does Revenium evaluate alert conditions?**

You can set the evaluation period to as short as a minute. Cumulative alerts are used for recurring budget alerts and automatically reset on a calendar period (daily, weekly, monthly, quarterly, etc.).

***

### 🔒 Privacy & Data Handling

#### **Does Revenium have access to the content of prompts or model responses?**

{% hint style="success" %}
**By default, no.** Revenium does not access, store, or analyze the raw input (prompts) or output (responses) of your AI calls unless you explicitly opt in.
{% endhint %}

Our SDK and APIs are designed to capture **usage metadata only** by default, such as:

* Token counts (input and output)
* Model type and latency
* Subscriber, organization, and product identifiers
* Optional quality or classification metrics

This enables precise cost tracking, performance alerts, and usage-based billing — **without exposing any user-generated content**.

#### **Can I enable prompt capture for debugging or analysis?**

Yes. Revenium supports **optional prompt capture** with a double opt-in model that requires both a tenant-level setting and an SDK-level flag to be enabled. This ensures prompts are never captured accidentally.

See the [Prompt Capture](https://docs.revenium.io/prompt-capture) documentation for setup instructions and details.

***

#### **What data does Revenium collect?**

Revenium receives and stores:

* Structured `usage_metadata` fields you explicitly provide
* Token usage and timing metadata returned by the AI model
* Diagnostic and performance data to support analytics and alerting

Revenium does **not**:

* Access or infer prompt or response content
* Perform NLP, classification, or logging of raw payloads

If you're using our SDK, no model request or response content is sent to Revenium — only metadata derived from the API call is transmitted.

***

#### **Where is data stored and processed?**

All data is stored in secure cloud environments that comply with modern enterprise security standards. If you require region-specific storage or audit controls, please contact <support@revenium.io>.

### 🧠 Advanced Topics

#### **What if I use multiple credentials for one user?**

You can:

* Send the same `subscriber.id` with different `credential.value`
* Revenium will track usage per credential and roll it up by subscriber.

Useful for device-based segmentation where a user may wish to share a license among multiple parties, but still know how much each party uses the service.

***

#### **How can I programmatically reconcile usage with my own systems?**

Use our reporting APIs or export logs from:

* AI Transactions
* Cost breakdowns by org, subscriber, or product
* Alerts and system logs

Contact <support@revenium.io> if you need a custom export format we don't already support. (this is an area of continued development for us, so we'd love to hear your requirements here)

***

### 📤 Direct API Integration

#### **When should I use the direct API instead of the SDK?**

Use the direct API if:

* You want full control over payloads and batching
* You’re instrumenting AI workloads outside of standard LLM clients

See [Direct API Integration](https://docs.revenium.io/integration-options-for-ai-metering#direct-api-integration) for an example.

***

Still have questions? [Contact support →](mailto:support@revenium.io)
