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 |
|
Models |
|
Conversations |
|
Context |
|
Actions |
|
Reviews |
|
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 follow a hierarchical format: ai:<category>:<subcategory>:<specific-permission>
Admin Permissions
| Permission | Description |
|---|---|
|
Grants full access to all TinyMCE AI features, models, and capabilities. Use with caution in production environments. |
Model Permissions
| Permission | Description |
|---|---|
|
Access to all available AI models. Use with caution as this includes access to new models that may be more expensive. |
|
Access to all models from a specific provider (for example, |
|
Access to a specific model (for example, |
|
Access to the agent model which automatically selects the best model for each request. This is the recommended permission for most use cases. |
Conversation Permissions
| Permission | Description |
|---|---|
|
Full access to all conversation features including read, write, web search, and reasoning. |
|
Ability to read and list conversations. |
|
Ability to create and send messages in conversations. |
|
Ability to use web search capability in conversations. |
|
Ability to use reasoning capability in conversations. |
Context Permissions
| Permission | Description |
|---|---|
|
Access to all context types (files and URLs). |
|
Access to all file types for context. |
|
Access to specific file formats (for example, |
|
Ability to use web URLs as context sources. |
Actions Permissions
| Permission | Description |
|---|---|
|
Access to all action types, including custom and system actions. |
|
Ability to run custom actions with free-form prompts. |
|
Access to all pre-defined system actions. |
|
Access to specific system actions. Examples: |
Reviews Permissions
| Permission | Description |
|---|---|
|
Access to all review types, including custom and system reviews. |
|
Ability to run custom reviews with free-form prompts. |
|
Access to all pre-defined system reviews. |
|
Access to specific system reviews. Examples: |
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"
]
}
}
}
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 message "No permissions to the resource". Common issues include missing model permissions, file type restrictions, feature access without permission, and action/review access without permission.
Related Features
-
JWT Authentication: JWT authentication setup and required claims.
-
AI Models: Model selection and capabilities.
-
Chat: Interactive AI discussions.
-
Review: Content improvement.
-
Quick Actions: Content transformation.