Fotor OpenAPI
  1. AI Editor SDK
Fotor OpenAPI
  • Getting Started
    • Introduction
    • Access and Authentication
    • For Serverless Clients
    • Token Consumption
  • Reference
    • AI Upscaler
      POST
    • AI Skin Retouch
      POST
    • Text to Image
      POST
    • Image to Image (AI Art Effects)
      POST
    • Background Remover
      POST
    • AI Headshot
      POST
    • Photo Colorize
      POST
    • Photo Restoration
      POST
    • Face Swap
      POST
    • AI Replace
      POST
    • Query Task Details
      GET
  • Webhook
    • Webhook
  • AI Editor SDK
    • Getting Started
    • Get Sdk Temporary Token
      GET
  1. AI Editor SDK

Getting Started

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.
Security Recommendation:
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
Previous
Webhook
Next
Get Sdk Temporary Token
Built with