Skip to Content

Creating Usage Policies

Policies in Liona let you control how your users can interact with AI providers. They allow you to set spending limits, manage usage patterns, and enable advanced features like request tracing and caching.

Note

If no policies are set, users will not be able to use the service. Each project comes with a default policy that applies when a user doesn’t have a specific policy assigned.

Understanding Policies

Policies can be applied at two levels:

  1. Project level: The default policy applies to all users in a project unless they have a user-specific policy
  2. User level: Individual policies that override the project’s default policy

This two-tier system gives you flexible control over how different users access your AI providers.

Creating a Policy

In the Liona dashboard, click “Policies” in the sidebar navigation.

Navigate to Policies

Click “New Policy”

Click the “New Policy” button in the top-right corner of the page.

Enter policy details

  1. Name: Give your policy a descriptive name (e.g., “Pro Users”, “Marketing Team”)
  2. Spending Limits: Set at least one of the following limits:
  • Monthly Limit ($): Maximum spending per month
  • Daily Limit ($): Maximum spending per day
  • Hourly Limit ($): Maximum spending per hour
💡
Tip

Setting multiple limits (monthly, daily, hourly) gives you fine-grained control over usage. For example, you might set a high monthly limit but a lower hourly limit to prevent sudden spikes in usage.

Click New Policy

Configure advanced features (Pro plan)

These features are available for users on the Pro plan:

  • Request Tracing: When enabled, Liona will record full request and response data for debugging and analytics
  • Cache Requests: When enabled, identical requests will be cached to improve performance and reduce costs

Configure advanced features

Save the policy

Click “Create Policy” to create the new policy.

Setting a Default Policy

Every project needs a default policy that applies to users who don’t have a specific policy assigned.

To set the default policy:

  1. Navigate to the “Policies” page
  2. Find the policy you want to set as default
  3. Click the star icon in the “Default” column
  4. Confirm the action
Note

When you create your first project, Liona automatically creates an “Unlimited” default policy. You may want to modify this or create a more restrictive default policy.

User-Specific Policies

To create a user-specific policy that overrides the default:

  1. Navigate to the “Users” page
  2. Click on a user to view their details
  3. Under the “User Policy” section, click “Create Policy”
  4. Set the policy limits and expiration date
  5. Click “Create Policy”

User policies can include an expiration date, making them great for temporary increases or special cases.

Managing Policies

After creating policies, you can:

  • Edit: Update policy settings by clicking the pencil icon
  • Delete: Remove a policy by clicking the trash icon (not possible for the only policy in a project)
  • Set as Default: Make a policy the default for the project by clicking the star icon
Note

When deleting a default policy, you’ll need to select a new default policy. All users using the deleted policy will automatically switch to the new default.

Next Steps

With policies in place, you’re ready to:

  1. Add users and assign them to your policies
  2. Learn more about request tracing (Pro feature)
  3. Explore request caching (Pro feature)
Last updated on