skillfed

paid-python

paid-python v1.11.0 80.6K downloads/30d#14,279 on PyPI7
License unclear Active released

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-python

uv

uv add paid-python

poetry

poetry add paid-python

Installing 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

Intended Audience :: DevelopersOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

AI agent billing SDKsubscription management for AI appscost tracking OpenTelemetryAI pricing and renewalsagent monetization library
ai-agent-billingopentelemetry-instrumentationcost-tracking

More Python Modules packages

idna

Converts domain names between Unicode and…

permissive · top 100 on PyPI

setuptools

Setuptools is a Python build backend and…

permissive · top 100 on PyPI

PyYAML

PyYAML parses and emits YAML 1.1 data format,…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

annotated-types

Provides reusable metadata objects for use with…

permissive · top 100 on PyPI

typing-inspection

Provides runtime tools to inspect and…

permissive · top 100 on PyPI

openinference-instrumentation-openai-agents

Auto-instruments OpenAI Agents SDK to emit…

permissive · top 5,000 on PyPI

mlflow

MLflow is an open-source platform for managing…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-openai-agents

Adds distributed tracing to OpenAI Agents…

permissive · top 5,000 on PyPI

promptlayer

PromptLayer is a Python SDK for managing,…

permissive · top 15,000 on PyPI

openinference-instrumentation-openai

Auto-instruments OpenAI Python SDK calls to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-openai

Captures traces of OpenAI API calls (prompts,…

permissive · top 5,000 on PyPI

mlflow-tracing

Instrument GenAI applications with distributed…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-openai-agents-v2

Automatically captures telemetry data from…

permissive · top 5,000 on PyPI

openinference-instrumentation-pydantic-ai

Auto-instruments PydanticAI agents to emit…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-agno

Automatically instruments the Agno framework to…

permissive · top 5,000 on PyPI

Further reading