paid-python
What it is and what it does
Paid is a Python client library for the Paid API, designed to handle billing, subscriptions, pricing, and cost tracking for AI agent applications. It provides a straightforward REST client interface for managing customers and subscriptions, plus an optional OpenTelemetry tracing layer that automatically instruments calls to major AI providers (OpenAI, Anthropic, Bedrock, Cohere, Google GenAI, and others) to capture and report usage costs.
The package is built around two main workflows: direct API calls for customer and subscription management, and decorator-based or context-manager-based cost tracking that wraps your agent logic. It pulls in a large set of instrumentation libraries as dependencies—one for each supported AI provider—which means you get automatic tracing integration without writing wrapper code. Configuration is handled via environment variables or constructor parameters, and the library gracefully falls back to normal execution if tracing fails.
Use it for:
- Track AI API costs in real time for multi-tenant SaaS applications serving AI agents, attributing usage to specific customers.
- Implement usage-based billing for agent workflows by wrapping agent functions with @paid_tracing and querying traces by customer metadata.
- Monitor and cap spending on AI provider calls (OpenAI, Anthropic, etc.) by collecting cost telemetry through OpenTelemetry without modifying provider SDK calls.
- Build a customer management and subscription renewal system for AI agent products using the Paid API client.
- Route cost traces to a custom OpenTelemetry collector endpoint for integration with existing observability infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Paid is a Python SDK for integrating billing, subscriptions, and cost tracking into AI agent applications via the Paid API, with built-in OpenTelemetry instrumentation for tracking AI provider costs.
Yes, if you are building a monetized or multi-tenant AI agent platform and need integrated billing and cost tracking. The low install friction, active maintenance, and automatic instrumentation of major AI providers make it a practical choice. However, verify the license terms before committing to production use, and confirm that the 18 runtime dependencies align with your environment's constraints and update cadence.
Install
paid-python on PyPI
pip
pip install paid-pythonuv
uv add paid-pythonpoetry
poetry add paid-pythonInstalling paid-python
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a recent release (38 days ago). Depends on 18 runtime packages including OpenTelemetry, Pydantic, and instrumentation libraries for multiple AI providers—a substantial but standard dependency tree for an integration SDK.
License in practice
License status is unclear; neither SPDX nor raw license metadata is available. Verify the actual license terms in the repository before adopting this package in a commercial or restricted-license project.
Quickstart
pip install paid-python
from paid import Paid
from paid.tracing import initialize_tracing, paid_autoinstrument, paid_tracing
initialize_tracing()
paid_autoinstrument()
client = Paid(token="API_KEY")
@paid_tracing("customer_id")
def my_agent():
response = client.customers.create_customer(name="John Doe")
return response
Requires Python 3.10 or later (up to 3.13). API key from Paid dashboard must be set via token parameter or PAID_API_KEY environment variable.
Verify before relying
- Whether the package's 18 runtime dependencies (particularly the openinference and opentelemetry instrumentation libraries) are all actively maintained and compatible with current AI provider SDK versions.
- Actual license terms and any commercial usage restrictions not declared in package metadata.
- Whether the default OpenTelemetry collector endpoint (collector.agentpaid.io) requires additional configuration or authentication in production environments.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (<3.14,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 18 — httpx, mutagen, openinference-instrumentation-anthropic, openinference-instrumentation-bedrock, openinference-instrumentation-claude-agent-sdk, openinference-instrumentation-google-genai, openinference-instrumentation-instructor, openinference-instrumentation-langchain, openinference-instrumentation-openai, openinference-instrumentation-openai-agents, opentelemetry-api, opentelemetry-exporter-otlp-proto-http, opentelemetry-instrumentation-cohere, opentelemetry-sdk, pydantic, pydantic-core, typing_extensions, wrapt |
| Maintenance | actively maintained — 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,636/month — #14,279 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: paid_python-1.11.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
openinference-instrumentation-openai-agentsAuto-instruments OpenAI Agents SDK to emit…
permissive · top 5,000 on PyPI
mlflowMLflow is an open-source platform for managing…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-openai-agentsAdds distributed tracing to OpenAI Agents…
permissive · top 5,000 on PyPI
promptlayerPromptLayer is a Python SDK for managing,…
permissive · top 15,000 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openaiCaptures traces of OpenAI API calls (prompts,…
permissive · top 5,000 on PyPI
mlflow-tracingInstrument GenAI applications with distributed…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-openai-agents-v2Automatically captures telemetry data from…
permissive · top 5,000 on PyPI
openinference-instrumentation-pydantic-aiAuto-instruments PydanticAI agents to emit…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-agnoAutomatically instruments the Agno framework to…
permissive · top 5,000 on PyPI