TinyMCE AI API Quick Start
This guide helps users get up and running with the TinyMCE AI service.
|
Sign up for the TinyMCE Premium Features 14-day free trial to test this feature first. The TinyMCE Premium Features free trial allows for testing SaaS services. For on-premises solutions, contact us. |
Getting Started
Every request to the TinyMCE AI APIs must include a JWT signed with a keypair from the Customer Portal. Signing must run on the application server so private keys are never exposed to the browser. The editor supplies each token by calling tinymceai_token_provider, which is typically implemented as a fetch to a backend URL that returns a signed JWT for the signed-in user.
To start using the service:
-
Sign up for one of the self-service plans, or contact us to purchase the TinyMCE AI license.
-
Generate access credentials in the Customer Portal.
-
During a Tiny Cloud trial, the demo identity service can issue JWTs (JSON Web Tokens) for testing without a custom token endpoint. See JWT Authentication.
-
For production, add Writing your own token endpoint: a backend HTTPS route that signs short-lived JWTs with the portal keypair for each authorized end user. See JWT Authentication for the full flow and code examples.
All steps are explained in detail below.
Get the TinyMCE AI license
TinyMCE AI can be purchased as a plugin for selected tiers of the self-service plans. Details are available on the pricing page.
For custom plans, contact us directly.
For testing purposes, sign up for the free trial.
After signing up, access to the customer dashboard (Customer Portal) is provided.
Log in to the Customer Portal
Log in to the Customer Portal and navigate to "JWT Keys".
For trial setup without a custom token endpoint, see Trial: demo identity service in JWT Authentication.
Create token endpoint
The next step for production is to create a security token endpoint in the application backend. That endpoint securely authorizes end users to use TinyMCE AI features based on their permissions and access rights. The editor calls this endpoint through tinymceai_token_provider in Plugin Reference. API integrations use the same JWT when calling https://tinymceai.api.tiny.cloud; see JWT Authentication for request details.
Writing your own token endpoint
To create a custom security token endpoint, generate a keypair in the JWT Keys area of the Customer Portal. In the "Generate New Keypair" section, enter a description, select the key length, and click "Add Key". Alternatively, use "Import Public Key" to add an existing key.
Once the keypair is created, use it to sign JWTs in the token endpoint. For step-by-step implementation instructions with complete code examples, see:
-
JWT authentication (Node.js): Complete Node.js implementation guide
-
JWT authentication (PHP): Complete PHP implementation guide
API Integration
All features are accessible through the API at https://tinymceai.api.tiny.cloud with JWT authentication.
For an overview of all API features, see API Overview.
For feature documentation and API access information, see:
-
Chat: Interactive AI discussions and document analysis through the Conversations API.
-
Review: Content improvement and quality analysis through the Reviews API.
-
Quick Actions: Content transformation through the Actions API.
-
Streaming: Real-time AI interactions with code examples.
Complete API Documentation: Full API reference with interactive examples for all endpoints.
Next Steps
After setting up the JWT endpoint, continue with:
-
AI Models: Choose the right model for your use case.
-
Verify model limits: Match the configured model id to
GET /v1/models/{version}and readlimitsandcapabilities. -
Permissions: Set up user access control for production.
-
Streaming: Learn how to handle real-time streaming responses.
-
Chat API: Start with interactive AI discussions.
-
Review API: Add content improvement features.
-
Quick Actions API: Implement content transformation.
-
API Overview: Optional high-level map of Chat, Review, Quick Actions, and related resources.