Skip to content
PluginStats

@stripe/ai-sdk weekly downloads statistics

By stripe (8 listings) · npm · AI SDKs

Stripe AI SDK - Provider and metering utilities for Vercel AI SDK

View on npm Fresh · Oct 27, 2026 · data Jul 1, 2026

@stripe/ai-sdk has 1,974 recorded weekly downloads on npm.

Weekly downloads
1,974
Official API · Jul 1, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
—
Among tracked npm listings

About @stripe/ai-sdk

Stripe AI SDK - Provider and metering utilities for Vercel AI SDK

The Stripe AI SDK provides comprehensive tools for integrating AI models with Stripe's billing infrastructure. This unified package includes both a custom Vercel AI SDK provider and metering utilities for tracking token usage across any AI SDK provider.

Private preview access required

The Stripe AI SDK is currently only available to organizations participating in the Billing for LLM Tokens Private Preview. If you do not have access and would like to request it, please visit:

Request Access to Billing for LLM Tokens Private Preview

Overview

This package contains two main components:

Provider (@stripe/ai-sdk/provider)

A custom Vercel AI SDK provider that routes requests through Stripe's LLM proxy at llm.stripe.com, enabling automatic usage tracking and billing integration.

Key Features:

  • Unified API: Access OpenAI, Google Gemini, and Anthropic Claude through a single interface
  • Automatic tracking: Token usage is automatically reported to Stripe
  • Built-in billing: Seamlessly integrate AI costs into your Stripe billing workflow
  • Customer attribution: Automatically attribute usage to specific customers

Quick Start:

import { createStripe } from '@stripe/ai-sdk/provider';
import { generateText } from 'ai';

const stripeLLM = createStripe({
  apiKey: process.env.STRIPE_API_KEY,
  customerId: 'cus_xxxxx',
});

const { text } = await generateText({
  model: stripe('openai/gpt-5'),
  prompt: 'What are the three primary colors?',
});

→ Full Provider Documentation

Meter (@stripe/ai-sdk/meter)

A wrapper utility that adds billing tracking to any Vercel AI SDK language model, allowing you to use your preferred provider while still tracking usage in Stripe.

Key Features:

  • Universal Compatibility: Works with any AI SDK v2 provider
  • Non-Intrusive: Preserves all original model functionality
  • Fire-and-Forget: Billing events are sent asynchronously
  • Automatic Metering: Token consumption is automatically tracked
  • Customer Attribution: Attribute usage to specific customers

Quick Start:

import { meteredModel } from '@stripe/ai-sdk/meter';
import { openai } from '@ai-sdk/openai';
import { generateText } from 'ai';

const model = meteredModel(
  openai('gpt-4o-mini'),
  process.env.STRIPE_API_KEY,
  'cus_xxxxx'
);

const { text } = await generateText({
  model,
  prompt: 'What are the three primary colors?',
});

→ Full Meter Documentation

Installation

npm install @stripe/ai-sdk

Which should I use?

Use the Provider when:
  • You want a unified interface to multiple AI providers
  • You prefer routing through Stripe's LLM proxy
  • You want automatic usage tracking without any wrapper code
  • You're building a new application
Use the Meter when:
  • You need to use specific provider features or configurations
  • You want to keep your existing provider setup
  • You need direct access to the native provider APIs
  • You're integrating into an existing codebase

Usage examples

Provider example
import { createStripe } from '@stripe/ai-sdk/provider';
import { streamText } from 'ai';

const stripeLLM = createStripe({
  apiKey: process.env.STRIPE_API_KEY,
  customerId: 'cus_xxxxx',
});

// Works with any supported model
const result = await streamText({
  model: stripeLLM('anthropic/claude-sonnet-4'),
  prompt: 'Write a short story about AI.',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}
Meter example
import { meteredModel } from '@stripe/ai-sdk/meter';
import { anthropic } from '@ai-sdk/anthropic';
import { streamText } from 'ai';

const model = meteredModel(
  anthropic('claude-3-5-sonnet-20241022'),
  process.env.STRIPE_API_KEY,
  'cus_xxxxx'
);

const result = await streamText({
  model,
  prompt: 'Write a short story about AI.',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Supported models

Provider models

The provider supports models from:

  • OpenAI: GPT-5, GPT-4.1, o3, o1, and more
  • Google: Gemini 2.5 Pro, Gemini 2.5 Flash, and more
  • Anthropic: Claude Opus 4, Claude Sonnet 4, Claude Haiku, and more
Meter compatibility

The meter works with any AI SDK v2 provider, including:

  • OpenAI (@ai-sdk/openai)
  • Anthropic (@ai-sdk/anthropic)
  • Google Gemini (@ai-sdk/google)
  • Azure OpenAI
  • Amazon Bedrock
  • And any custom v2 provider

Token usage tracking

Both components automatically report token usage to Stripe meter events:

{
  event_name: 'token-billing-tokens',
  payload: {
    stripe_customer_id: 'cus_xxxxx',
    value: '100',
    model: 'openai/gpt-4o-mini',
    token_type: 'input'
  }
}

Documentation

Examples

License

MIT

Description from the npm listing.

  • stripe
  • ai
  • provider
  • billing
  • metering
  • ai-sdk
  • vercel

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@stripe/ai-sdk weekly downloads on npm, last 90 days: 1,974 weekly downloads as of Jul 1, 2026.@stripe/ai-sdkWeekly downloads on npm · Last 90 days1,974downloads / weekNo observations recorded in this periodno observations · 0 observations · Updated Jul 1, 2026pluginstats.com
@stripe/ai-sdk weekly downloads on npm, last 90 days: 1,974 weekly downloads as of Jul 1, 2026.

7/30/90-day growth

@stripe/ai-sdk weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@stripe/ai-sdkWeekly downloads growth on npm1,974downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Jul 1, 2026pluginstats.com
@stripe/ai-sdk weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@stripe/ai-sdk has no ranking history on npm yet.@stripe/ai-sdknpm ranking · by weekly downloads · Last 90 daysNo ranking observations in this periodno observations · 0 observations · Updated Jul 1, 2026pluginstats.com
@stripe/ai-sdk has no ranking history on npm yet.

Listing placement

All npm2,577 listings · 129 pages · 1,290 shown · page 74, #16 (overall #1,476)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs284 listings · 15 pages · page 6, #16 (overall #116)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for @stripe/ai-sdk
Date (UTC)Weekly downloadsChange vs. previous
1,974—

Similar npm AI SDKs plugins

All 20 @stripe/ai-sdk alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@stripe/ai-sdk. First seen Oct 27, 2026; last successful collection Oct 27, 2026. See the methodology.