Admin
Usage limit

Usage limit

For businesses leveraging AI services, effective cost management and operational efficiency are important. Usage limits play a critical role in achieving these goals, offering a two-pronged approach:

  • Predictable costs: Usage limit help curb unexpected spikes in resource usage, enabling you to maintain a predictable and controlled budget for your AI service. Efficient resource management through usage limit ensures your AI service can scale effectively to accommodate future growth without incurring unforeseen financial burdens.

  • Preventing abuse: Beyond cost control, usage limits also act as a security measure. They mitigate the risk of malicious actors attempting to exploit your AI service.

For baseline usage limit you can update ./src/configs/limit.ts;

export const MAX_LANGUAGE_MODEL_REQUEST_COUNT_PER_MONTH = ...;
// Message when limit reaches.
export const MAX_LANGUAGE_MODEL_MESSAGE = '...';
 
export const MAX_IMAGE_MODEL_REQUEST_COUNT_PER_MONTH = ...;
// Message when limit reaches.
export const MAX_IMAGE_MODEL_MESSAGE = ...;
 
export const MAX_TEXT_TO_SPEECH_MODEL_REQUEST_COUNT_PER_MONTH = 15;
// Message when limit reaches.
export const MAX_TEXT_TO_SPEECH_MODEL_MESSAGE = ...;

For per plan usage limit you can update ./src/configs/stripe.ts

export const PLANS: Plan[] = [
  {
    name: 'ShipAIFast Pro',
    limit: {
      maxLanguageModelRequestCountPerMonth: ...,
      maxImageModelRequestCountPerMonth: ...,
      maxTextToSpeechModelRequestCountPerMonth: ...,
    },
  }
]