- menivor-reels.json: menivor_llm_call count metric (the code videogen metering.py sends per Relay-routed LLM call), charged at $0 on menivor_reels so current_usage shows it without billing it. - autogtm.json (Rally): gtm_topup sum metric over properties.amount_cents (vcglass meterRagoTopup), and the gtm_usage plan vcglass subscribes projects to by default (RAGO_GTM_PLAN_CODE) which did not exist: $0 base, $0 charges, because money moves through the Creem-funded balance. - import.sh default base URL and README examples now include /api/v1 (routes are nested there); README org SQL includes the required slug. - CONSUMERS.md: menivor_llm_call is now seeded. Verified by importing both seeds into a local rago-api on a throwaway Postgres, subscribing, sending events: gtm_topup sums 5000, llm calls count 2, both $0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
94 lines
3.8 KiB
JSON
94 lines
3.8 KiB
JSON
{
|
|
"consumer": "menivor",
|
|
"description": "Rago catalog seed for Menivor reel generation \u2014 the `menivor_reels` plan its three per-unit reel metrics (generated reels, render-seconds, AI credits), and the `menivor_llm_call` count metric for Relay-routed LLM calls. Amounts match rago's built-in reel pricing defaults (RAGO_REEL_PRICING, cents-per-unit) so an operator can bill reel usage without setting the env var. Import under the same Menivor org token as menivor.json.",
|
|
"currency": "USD",
|
|
"billable_metrics": [
|
|
{
|
|
"name": "Reels generated",
|
|
"code": "reel_generated",
|
|
"description": "One event per billable reel produced. Counted, not summed.",
|
|
"aggregation_type": "count_agg",
|
|
"recurring": false
|
|
},
|
|
{
|
|
"name": "Reel render seconds",
|
|
"code": "reel_render_seconds",
|
|
"description": "Output video duration billed per whole second. `properties.seconds` carries the quantity.",
|
|
"aggregation_type": "sum_agg",
|
|
"field_name": "seconds",
|
|
"recurring": false
|
|
},
|
|
{
|
|
"name": "Reel AI credits",
|
|
"code": "reel_ai_credits",
|
|
"description": "AI model credits (LLM / image / voice) consumed by the render. `properties.credits` carries the quantity.",
|
|
"aggregation_type": "sum_agg",
|
|
"field_name": "credits",
|
|
"recurring": false
|
|
},
|
|
{
|
|
"name": "Menivor LLM calls",
|
|
"code": "menivor_llm_call",
|
|
"description": "One event per LLM call Menivor routes through Relay (videogen apps/api/app/integrations/railyard/metering.py, RAILYARD_RAGO_LLM_METRIC). `properties` carries calls, model, provider, prompt_chars, completion_chars, routed_via. Counted, not summed. Token spend is recorded by Relay itself; this metric is the per-product call count.",
|
|
"aggregation_type": "count_agg",
|
|
"recurring": false
|
|
}
|
|
],
|
|
"plans": [
|
|
{
|
|
"name": "Menivor Reels",
|
|
"code": "menivor_reels",
|
|
"interval": "monthly",
|
|
"description": "Metered reel generation: per-reel, per-render-second, and per-AI-credit charges. Prices match the RAGO_REEL_PRICING defaults ($0.20/reel, $0.01/render-second, $0.01/AI credit). LLM calls are tracked at $0 (usage visibility only; not billed).",
|
|
"amount_cents": 0,
|
|
"amount_currency": "USD",
|
|
"pay_in_advance": false,
|
|
"bill_charges_monthly": true,
|
|
"charges": [
|
|
{
|
|
"billable_metric_code": "reel_generated",
|
|
"charge_model": "standard",
|
|
"invoiceable": true,
|
|
"properties": {
|
|
"amount": "0.20"
|
|
}
|
|
},
|
|
{
|
|
"billable_metric_code": "reel_render_seconds",
|
|
"charge_model": "standard",
|
|
"invoiceable": true,
|
|
"properties": {
|
|
"amount": "0.01"
|
|
}
|
|
},
|
|
{
|
|
"billable_metric_code": "reel_ai_credits",
|
|
"charge_model": "standard",
|
|
"invoiceable": true,
|
|
"properties": {
|
|
"amount": "0.01"
|
|
}
|
|
},
|
|
{
|
|
"billable_metric_code": "menivor_llm_call",
|
|
"charge_model": "standard",
|
|
"invoiceable": true,
|
|
"properties": {
|
|
"amount": "0"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"sample_events": [
|
|
{
|
|
"code": "reel_generated",
|
|
"note": "POST /reels/usage { render_id, external_subscription_id, generated: true, render_seconds: 30, ai_credits: 8 } expands into one reel_generated event plus reel_render_seconds (properties.seconds) and reel_ai_credits (properties.credits) events, idempotent by render_id."
|
|
},
|
|
{
|
|
"code": "menivor_llm_call",
|
|
"note": "POST /events { event: { transaction_id: 'llm:<request_id>', external_subscription_id, code: 'menivor_llm_call', properties: { calls: 1, model, provider, prompt_chars, completion_chars, routed_via } } } \u2014 one per Relay-routed call."
|
|
}
|
|
]
|
|
}
|