Skip to main content

aimarket-promo

Documentation

Document Description
User guide Install, configure, verify plugin is loaded
User cases Personas and cross-plugin workflows
SDK integration Code examples and hook behavior

Time-locked discount offers signed by providers. Yield Management for AI. Provider signs "50% off for queries in the next 2 hours." Crawler agents auto-discover promos. Consumers auto-apply the best available discount at invoke time. Providers pop demand when they have spare capacity.

When to Use

  • Provider has spare GPU capacity → 50% off for 2 hours
  • Launch promo → "80% off first 100 calls"
  • Volume discount → "10% off for calls > $5"
  • Trust-gated offers → "only consumers with trust_score > 0.7 get this discount"

Installation

pip install aimarket-promo

Example

from aimarket_hub.signing import Signer
from aimarket_promo.time_locked_promo import PromoMarket

signer = Signer()
market = PromoMarket(signer)

# Provider creates a 50% off offer for 2 hours
offer = market.create_offer(
    provider_hub="https://translate.example.com",
    capability_id="translate.multi@v2",
    product_id="prod-001",
    original_price_usd=1.00,
    discount_pct=0.50,
    duration_hours=2.0,
    max_uses=100,
    reason="spare capacity — GPUs idle"
)
print(f"Offer: ${offer.discounted_price_usd} (was ${offer.original_price_usd})")

# Consumer invokes — auto-applies best promo
result = market.apply_best_offer("translate.multi@v2", consumer_trust_score=0.85)
if result["applied"]:
    print(f"Price: ${result['price_usd']}, Saved: ${result['saved_usd']}")

# Market stats
print(market.market_stats())
# {"active_offers": 1, "total_consumer_savings_usd": 0.50, ...}

License

MIT · Maintained by AI-Factory

Metadata

Release files for aimarket-promo 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aimarket-promo 2.0.0
File Size Uploaded
aimarket_promo-2.0.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aimarket-promo 2.0.0
File Interpreter ABI Platform
aimarket_promo-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / aimarket_promo-2.0.0.tar.gz

Download URL aimarket_promo-2.0.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6c4c997e3ef37989252f5249ff6b72f0441b3344adacce81adb539a0d7701530
BLAKE2b-256 checksum
How to use checksums
47f5628f60d10048cd76621dcd390c429631c0a12793015cb5cfb429d6b3696f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / aimarket_promo-2.0.0-py3-none-any.whl

Download URL aimarket_promo-2.0.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9d76fd3f592e63d677fc4dea762ae489e055222f7da0550670ae3ede400adfe
BLAKE2b-256 checksum
How to use checksums
ec3ac81b49cca6c6abb166157a234d1229956cd0c0aeb4a567b11e7cbf7848dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page