Skip to content

Spendware Developer Documentation

Spendware helps AI application teams meter provider usage, run preflight policy checks, log token and request activity, manage customers and projects, connect usage to billing, and deliver operational events through webhooks.

This site is for developers integrating Spendware SaaS into an AI application. It focuses on practical onboarding, raw API calls, Python SDK methods, TypeScript SDK methods, and the customer-facing API reference.

Start Here

  • Follow the quickstart to create a project, customer, runtime key, and first usage event.
  • Read entities to understand the objects you will see in APIs and SDKs.
  • Read usage tracking before wiring provider adapters or direct usage logging.
  • Browse guides for task-oriented integration flows.
  • Use the API reference when you need endpoint schemas or SDK method mapping.

Common Integration Paths

Goal Start With
Wrap an OpenAI, Anthropic, Gemini, Azure OpenAI, Bedrock, or OpenAI-compatible client Provider adapters
Log usage directly from your backend Preflight and usage logging
Accept usage before resources exist Partial usage logging
Manage customers and projects from automation Projects and customers
Issue least-privilege runtime keys API keys
Connect billing workflows Billing
Subscribe to Spendware events Webhooks

Integration Setup

Before writing code, sign in to Spendware and collect the values your integration needs:

  • SPENDWARE_BASE_URL for backend API calls.
  • SPENDWARE_WEBHOOKS_BASE_URL when your account uses a separate webhooks API base URL.
  • A user API key for management automation.
  • A customer key for runtime preflight checks and usage logging.
  • Project, customer, and organization identifiers for the resources your application owns.

Keep management keys server-side. Use customer keys only for runtime usage paths that are designed for customer-key authentication.