Skip to content

AI Token Pricing

AI Credits

AI credits serve as an internal unit of currency for measuring AI-related usage within SeaTable. They are directly linked to the number of tokens consumed by using AI-based features according to the configured price of each AI model.

SeaTable supports role-based AI credit limits by configuring the ai_credit_per_user option on a user role. Please refer to the documentation on user quotas for more details.

ai_credit_per_user for organization users

AI credits are shared across all users inside a SeaTable organization. The total number of credits can be calculated by multiplying the value of ai_credit_per_user by the number of team users.

Example: Setting ai_credit_per_user to 2 will allow a team with 10 members to have 20 AI credits in total.

Pricing Configuration

In order to accurately track the number of AI credits used by users and organizations, you must configure token pricing. The configuration approach depends on your SeaTable version:

SeaTable v6.0 + v6.1

Token pricing is configured inside /opt/seatable-server/seatable/conf/dtable_web_settings.py. This can be achieved by configuring the AI_PRICES variable, which is a dictionary that maps model identifiers (e.g gpt-4o-mini) to token pricing per thousand tokens:

AI_PRICES = {
    "gpt-4o-mini": {
        "input_tokens_1k": 0.01827, # price / 1000 tokens
        "output_tokens_1k": 0.07309 # price / 1000 tokens
    },
}

Model Identifiers

The dictionary key must match the exact value of the chosen AI Model, which is configured through the SEATABLE_AI_LLM_MODEL variable inside your .env file. In case of a mismatch, AI usage will not count towards any configured credit limits!

SeaTable v6.2+

Token pricing is configured inside /opt/seatable-server/seatable/conf/seatable_config.yaml. If the file does not exist yet, simply create it.

Token pricing is now configured per 1 million tokens

Since version 6.2, token pricing is configured per 1 million tokens (previously: per 1000 tokens). This change aligns SeaTable's behavior with the behavior of most other AI-enhanced applications.

global:
  LLM_MODELS:
    - type: ...
      key: ...
      model: ...
      price:
        # Price per 1M tokens
        input_tokens: 1
        output_tokens: 5

Remember to restart the seatable-server container (since token pricing is handled by dtable-events, which runs inside the seatable-server container) by running the following command:

cd /opt/seatable-compose
docker compose up -d --force-recreate seatable-server

Note: The --force-recreate flag ensures that the container is restarted even if its .yml file or environment variables haven't changed.