Step 1. Register and Obtain a Fotor API Key#
To use the Fotor AI Editor SDK, you first need to obtain a Fotor API Key. Please refer to the How to Obtain an API Key guide for detailed instructions.Step 2. Generate a Temporary Token via Server#
To ensure security, it is recommended to handle the API Key on the server side and generate temporary tokens for frontend use. Follow these steps:1.
Implement a Server-Side Endpoint:Create an endpoint on your server that authenticates users based on your system and exchanges the obtained API Key for a temporary token from Fotor (refer to Get Sdk Temporary Token). 2.
Ensure Sufficient Available Tokens:Make sure your account has enough tokens available for usage.
3.
It is strongly advised not to hardcode the API Key in frontend code to prevent exposure.
Step 3. Integrate Fotor AI Editor SDK#
Embed Fotor AI Editor’s editing functionalities into your project.Note:
Please replace the getToken
function in the above code with your own logic for obtaining a temporary token to ensure security and proper functionality.You have now successfully integrated the Fotor AI Editor SDK!Modified at 2025-03-17 01:12:47