> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Pricing

> Learn how to set up custom token pricing in Maxim for accurate cost reporting in AI evaluations and logs, ensuring displayed costs match your actual expenses.

Configure your negotiated token costs for accurate cost reporting in AI evaluations and real-time logs. Custom token pricing ensures that displayed costs match your actual expenses based on special pricing agreements.

## How it works

<Steps>
  <Step title="Define Token Costs">
    Enter your custom input and output token costs
  </Step>

  <Step title="Apply Pricing">
    Apply costs to model configs and log repositories
  </Step>

  <Step title="Cost Calculation">
    System calculates actual costs for each evaluation
  </Step>

  <Step title="Default Pricing">
    Standard pricing applies when no custom rates exist
  </Step>
</Steps>

## Create custom pricing structures

1. Navigate to **Settings > Models > Pricing**
2. Enter a model name pattern (string or regex) that matches your model names
3. Input your token usage cost (per 1000 tokens)

<img src="https://mintcdn.com/maximai/5erI5VqjDLLSmvnr/images/docs/observe/custom-pricing-structures/add_pricing.png?fit=max&auto=format&n=5erI5VqjDLLSmvnr&q=85&s=ebb7366f76fc9bfa34c2fe55d2406ccb" alt="Interface for creating custom token pricing structures" width="1394" height="938" data-path="images/docs/observe/custom-pricing-structures/add_pricing.png" />

## Configure model pricing

1. Go to **Settings > Models > Model Configs**
2. Select a model config to edit
3. Locate the **Pricing structure** section
4. Choose your pricing structure from the dropdown

<Note>
  Custom pricing supports OpenAI, Microsoft Azure, Groq, HuggingFace, Together AI, Google Cloud, and Amazon Bedrock models.
</Note>

<img src="https://mintcdn.com/maximai/5erI5VqjDLLSmvnr/images/docs/observe/custom-pricing-structures/attach_pricing_model_config.png?fit=max&auto=format&n=5erI5VqjDLLSmvnr&q=85&s=3df3da2875a3bd81de8b9af4ab32de33" alt="Attach the pricing structure to model config" width="1060" height="1686" data-path="images/docs/observe/custom-pricing-structures/attach_pricing_model_config.png" />

## Set up pricing for log repository

1. Open **Logs** from the sidebar
2. Select the log repository you want to configure custom pricing for
3. Find the **Pricing structure** section
4. Choose your pricing structure from the dropdown

<img src="https://mintcdn.com/maximai/5erI5VqjDLLSmvnr/images/docs/observe/custom-pricing-structures/attach_pricing_log_repo.png?fit=max&auto=format&n=5erI5VqjDLLSmvnr&q=85&s=4203b9415e54ecc7608d846976c59b64" alt="Attach pricing structure to log repository" width="1074" height="1280" data-path="images/docs/observe/custom-pricing-structures/attach_pricing_log_repo.png" />
