Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Billing Multi‑Tenant AI Usage – Platform Records, Internal Counters, and Recovery

说明与用途

多租户 AI 平台需要准确计费,考虑重试和崩溃。每月对平台使用记录和内部计数器进行对账,确保精度和可审计性。

问题

Multi‑tenant AI platforms need accurate billing while handling retries, crashes, and varying attribution granularity.

结果

Monthly reconciliation of platform and internal ledgers prevents billing errors, ensures traceability, and supports auditability while maintaining operational control over prepaid balances.

工作流

  • 1. Fetch platform usage via Infrai API with retry logic and exponential backoff.
  • 2. Persist the frozen platform response as the authoritative snapshot for the invoice run.
  • 3. Record internal usage with dimensions (tenant, property, workflow, model, job ID, attempt ID) and platform request ID when available.
  • 4. Compare platform aggregate with internal aggregate using decimal arithmetic; apply tolerance to trigger human investigation.
  • 5. If discrepancy exceeds tolerance, investigate retry drift or missing records before generating invoice.
  • 6. Use stable idempotency keys for retries to avoid duplicate writes; honor Retry‑After for rate limits.
  • 7. Publish invoice with its own stable idempotency identity.
  • 8. Rotate credentials per service boundary and keep them server‑side only.

证据

Use the platform total as the invoice basis. Treat the internal total as an allocation ledger.

来源

Persist that response as the frozen platform-side input for the invoice run, then compare its documented aggregate with the internal aggregate using decimal arithmetic.

来源

  • 记录日期: 2026-09-21T16:30:36.049Z