Skip to main content

Signed time-locked offers and discounts for AI capabilities

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aimarket_promo-2.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aimarket_promo-2.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file aimarket_promo-2.0.0.tar.gz.

File metadata

  • Download URL: aimarket_promo-2.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for aimarket_promo-2.0.0.tar.gz
Algorithm Hash digest
SHA256 6c4c997e3ef37989252f5249ff6b72f0441b3344adacce81adb539a0d7701530
MD5 2e3e4ca72391bec5e87d949126eded2e
BLAKE2b-256 47f5628f60d10048cd76621dcd390c429631c0a12793015cb5cfb429d6b3696f

See more details on using hashes here.

File details

Details for the file aimarket_promo-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aimarket_promo-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9d76fd3f592e63d677fc4dea762ae489e055222f7da0550670ae3ede400adfe
MD5 2f1d293133cfa7700ffc7502aaafa41a
BLAKE2b-256 ec3ac81b49cca6c6abb166157a234d1229956cd0c0aeb4a567b11e7cbf7848dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page