BunshipBunship
Integrations

AI Providers

Practical AI model and pricing setup: configure models, define pricing rules, and use dynamic parameter-based billing.

This page focuses on three core topics: how to configure models, how pricing is configured, and what dynamic pricing is currently supported.

Admin Configuration Screenshot

AI model configuration page (English)

1. How to Configure Models (Fast Path)

In Admin -> AI Models, configure in this order:

  1. Choose provider (fal / replicate / kie)
  2. Set model (for example fal-ai/flux/dev)
  3. Choose modality (image / video / audio / text)
  4. Set enabled and fallback creditCost
  5. Define paramSchema (allowed params + enum options)
  6. Enable pricingRule when you need dynamic billing

2. How Pricing Works (Current Capabilities)

Pricing currently supports two layers:

  • Fallback fixed price: creditCost
  • Formula pricing: pricingRule (takes priority when present)

2.1 Fixed Price

Best for initial launch and low complexity.

2.2 Unit-Based Dynamic Pricing

pricingRule.unit currently supports:

  • image: charged by output count
  • second: charged by duration (video/audio)
  • token: charged by text token usage (per 1k tokens)

2.3 Parameter-Based Dynamic Pricing

Yes, this is supported now.

  • Define enum params in paramSchema (for example quality)
  • Set per-attribute prices via pricing rule editor
  • Or use tiers.match to apply conditional price tiers

So both "single-image pricing" and "dynamic pricing by model params" are supported.

3. Practical Pricing Rule Example

{
  "type": "formula",
  "billingMode": "charge_on_complete",
  "unit": "image",
  "price": { "perImage": 10 },
  "tiers": [
    { "match": { "quality": "high" }, "price": { "perImage": 16 } },
    { "match": { "quality": "ultra" }, "price": { "perImage": 24 } }
  ]
}

Meaning: default 10 credits per image, with automatic premium tiers for higher quality options.

4. Key Highlights

  • Unified multi-provider management (fal/replicate/kie)
  • Fixed + formula pricing can coexist
  • Dynamic pricing by parameter enums and tier matching
  • Separate estimate and final charge stages
  • Price changes are operational, not code changes
  1. Start with creditCost for all models.
  2. Move high-volume/high-cost models to pricingRule.
  3. Add surcharges for expensive params (quality, duration, outputs).
  4. Combine rate limits with pricing to cap risk.

Next Steps