TinyMCE AI JWT Permissions

TinyMCE AI uses a permission-based access control system to manage user access to AI features. Permissions are specified in JWT tokens and control which features, models, and capabilities users can access.

For information about JWT authentication setup and required claims, see JWT Authentication.

Quick reference

Category Permissions

Admin

ai:admin

Models

ai:models:*, ai:models:<provider>:*, ai:models:<provider>:<model-name>, ai:models:agent

Conversations

ai:conversations:*, ai:conversations:read, ai:conversations:write, ai:conversations:websearch, ai:conversations:reasoning

Context

ai:conversations:context:*, ai:conversations:context:files:*, ai:conversations:context:files:<format>, ai:conversations:context:urls

Actions

ai:actions:*, ai:actions:custom, ai:actions:system:*, ai:actions:system:<action-name>

Reviews

ai:reviews:*, ai:reviews:custom, ai:reviews:system:*, ai:reviews:system:<review-name>

Use cases

  • Role-based access: Different user roles have different AI capabilities

  • Cost control: Limit access to expensive models or features

  • Feature gating: Enable specific AI features for premium users

  • Security: Restrict access to sensitive AI operations

Permission format

Permissions are an array of strings in the auth.ai.permissions claim of the JWT. Each string has the form ai:<permission-type>:<permission-value>, where <permission-type> is one of models, conversations, actions, reviews, or admin. The <permission-value> can contain the * wildcard. The service ignores any string that does not match this format.

Admin permissions

Permission Description

ai:admin

Grants full access to all TinyMCE AI features, models, and capabilities. Use with caution in production environments.

Model permissions

Permission Description

ai:models:*

Access to all available AI models. Use with caution as this includes access to new models that may be more expensive.

ai:models:<provider>:*

Access to all models from a specific provider (for example, ai:models:openai:*, ai:models:anthropic:*).

ai:models:<provider>:<model-name>

Access to a specific model (for example, ai:models:openai:gpt-4o, ai:models:anthropic:claude-3-sonnet).

ai:models:agent ⭐ Recommended

Access to the agent model which automatically selects the best model for each request. This is the recommended permission for most use cases.

Conversation messages, custom actions, and custom reviews also require the permission for the model that the request uses. System actions and system reviews require only their own permission.

Conversation permissions

Permission Description

ai:conversations:*

Full access to all conversation features including read, write, web search, and reasoning.

ai:conversations:read

Ability to read and list conversations, messages, and attachments.

ai:conversations:write

Ability to create, update, and delete conversations, and to send messages. Requires ai:conversations:read as well.

ai:conversations:websearch

Ability to use web search capability in conversations.

ai:conversations:reasoning

Ability to use reasoning capability in conversations.

Context permissions

Permission Description

ai:conversations:context:*

Access to all context types (files and URLs).

ai:conversations:context:files:*

Access to all file types for context.

ai:conversations:context:files:<format>

Access to specific file formats (for example, ai:conversations:context:files:pdf, ai:conversations:context:files:docx).

ai:conversations:context:urls

Ability to use web URLs as context sources.

Uploading a file also requires ai:conversations:write.

Actions permissions

Permission Description

ai:actions:*

Access to all action types, including custom and system actions.

ai:actions:custom

Ability to run custom actions with free-form prompts.

ai:actions:system:*

Access to all pre-defined system actions.

ai:actions:system:<action-name>

Access to specific system actions. Examples: ai:actions:system:improve-writing, ai:actions:system:fix-grammar, ai:actions:system:translate

Quick Actions that open in Chat, such as Explain, Summarize, and Highlight key points, and custom Quick Actions with type: 'chat', send a conversation message. They require the conversation permissions and the permission for the selected model.

Reviews permissions

Permission Description

ai:reviews:*

Access to all review types, including custom and system reviews.

ai:reviews:custom

Ability to run custom reviews with free-form prompts, including integrator-defined reviews.

ai:reviews:system:*

Access to all pre-defined system reviews.

ai:reviews:system:<review-name>

Access to specific system reviews. Examples: ai:reviews:system:correctness, ai:reviews:system:clarity, ai:reviews:system:make-tone-professional

Permission examples

Basic user

{
  "auth": {
    "ai": {
      "permissions": [
        "ai:conversations:read",
        "ai:conversations:write",
        "ai:models:agent",
        "ai:conversations:context:files:pdf",
        "ai:conversations:context:files:docx"
      ]
    }
  }
}

All tinymceai plugin features

This set covers Chat with web search, reasoning, and attachments, plus system and custom Quick Actions and reviews, with the Agent model. If a custom Quick Action or custom review uses a specific model, add the permission for that model.

{
  "auth": {
    "ai": {
      "permissions": [
        "ai:conversations:read",
        "ai:conversations:write",
        "ai:conversations:websearch",
        "ai:conversations:reasoning",
        "ai:conversations:context:*",
        "ai:models:agent",
        "ai:actions:*",
        "ai:reviews:*"
      ]
    }
  }
}

Premium user

{
  "auth": {
    "ai": {
      "permissions": [
        "ai:conversations:*",
        "ai:models:*",
        "ai:actions:system:*",
        "ai:reviews:system:*"
      ]
    }
  }
}

Enterprise admin

{
  "auth": {
    "ai": {
      "permissions": [
        "ai:admin"
      ]
    }
  }
}

Restricted user (review only)

System reviews require no model permission.

{
  "auth": {
    "ai": {
      "permissions": [
        "ai:reviews:system:correctness",
        "ai:reviews:system:clarity"
      ]
    }
  }
}

Best practices

Permission design

Begin with minimal, specific permissions based on actual requirements. Use wildcards only for testing environments and power users who need comprehensive access. Gradually expand permissions based on user needs and usage patterns.

Avoid ai:models:* in production to prevent unexpected access to new expensive models. Use provider-specific permissions like ai:models:openai:* for better control, or specify exact models for maximum control. Start with common formats (PDF, DOCX, TXT, PNG, JPEG) and add specialized formats only when needed.

Error handling

When a user lacks required permissions, the API returns a 403 Forbidden error with the code missing-permissions. The data.missingPermissions array lists the permissions that the token lacks. For the response body, see Error responses. Common issues include missing model permissions, file type restrictions, feature access without permission, and action/review access without permission.