A2E
  1. Miscellaneous
A2E
  • AI Avatar API
  • Get Tokens
    • Getting API Tokens (2025 version)
  • TTS and Voice Clone
    • List Public TTS Options
      GET
    • List Voice Clone Options
      GET
    • Train TTS Model of The User's Voice (Voice Clone)
      POST
    • List Ongoing Voice Clone Tasks
      GET
    • Generate TTS Audio (Text-to-Speech)
      POST
    • Get Details of a Voice
      GET
    • Delete a User Voice
      DELETE
  • Generate Avatar Videos
    • Generate AI Avatar Videos
      POST
    • List of Result Videos
      GET
    • List One or All Avatars
      GET
    • Obtain the Status of One Avatar Video Task
      POST
    • Delete or Cancel a Video
      DELETE
    • Auto Language Detect
      POST
    • Auto Swith to Public Computing Pool
      POST
  • Create Avatars and Train Lip-sync Models
    • Create A Custom Avatar by a Video or an Image
      POST
    • Train a Personalized Lip-sync Model (Optional) a.k.a. Continue Training 💠
      POST
    • Remove A Customized Avatar
      POST
    • Get Status of All Tasks
      GET
    • Get All Ongoing "Training" Tasks
      GET
    • Status of One Task
      GET
    • Clone Voice from a Video
      POST
  • Background Matting and Replacement
    • Obtain the List of Background Images
    • Add Custom Background Image
    • Delete Custom Image
  • Face Swap
    • Manage Face Swap Resource
      • Add Face Swap Image
      • Get Records of Face Swap Images
      • Delete User Face Swap Image
    • Quickly Preview Face Swap
      • Add User Face Swap Preview
      • Get Status of Face Swap Preview Process
    • Start and Manage Face Swap Tasks
      • Start a Face Swap Task
      • Get Status of Face Swap Task
      • Get Face Swap Task Records
      • Get Details of Face Swap
      • Delete Record
  • AI Dubbing
    • Start dubbing
    • List Dubbing Tasks
    • List All Processing Dubbing Tasks
    • Get Details
    • Delete Record
  • Image to Video
    • Start Image-to-Video
    • Check Status of One Task
    • List Status of All Tasks
    • Delete Record
  • Caption Removal
    • Start Caption Removal
    • Get Records of All Tasks
    • Get Status of All Tasks in Processing
    • Get Details of One Task
    • Delete a Task
  • Streaming Avatar
    • Get All avatars
    • Get a Streaming Avatar Token
    • Set QA Context
    • Get QA Context
    • Ask a Question to the Avatar
    • Let the Avatar Speak Directly
    • Leave the Room
  • Miscellaneous
    • Add a User
      POST
    • Get User Remaining Credits
      GET
    • List Available Languages
      POST
    • Save URL to A2E's storage
      POST
    • Add Watermark to Video or Image
      POST
    • Get R2 Upload Presigned URL
      POST
  • Text to Image
    • Start Text-to-Image
    • List Tasks of Text-to-Image Tasks
    • Get Details of One Task
    • Delete Record
    • Quick Add Avarar
  • Product Holding
    • Start Product Holding
    • List Tasks of Product Holding Tasks
    • Get Details of One Task
    • Delete Record
  • Talking Photo
    • Start a Task
    • List Tasks
    • Get Task Detail
    • Delete Task
  • Virtual Try-On
    • Start Virtual Try-On
    • List Tasks of Virtual Try-On
    • Get Details of One Task
    • Delete Record
  1. Miscellaneous

Get R2 Upload Presigned URL

Global Server
https://video.a2e.ai
Global Server
https://video.a2e.ai
POST
/api/v1/r2/get_upload_presigned_url
1.
Call this API to obtain a presigned URL
2.
Use the received uploadUrl to upload the file via an HTTP PUT request
3.
After successful upload, the file will be stored in the specified R2 bucket at the path indicated by data.key

Notes#

This API consumes 1 coin from the user's balance
The presigned URL is valid for 300 seconds by default; a new URL must be requested after expiration
Uploaded files are stored in the user's dedicated directory: environment/userId/storage/filename

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "key":"path/test.mp4"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://video.a2e.ai/api/v1/r2/get_upload_presigned_url' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key":"path/test.mp4"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "code": 0,
    "data": {
        "uploadUrl": "https://a2e-prod-jumpy.249f5378ffb8a0786e403d44c62e5459.r2.cloudflarestorage.com/beta/1avdcdd7bcf6ab778bad1234/storage/path/test.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=774ea6b5cfe6a35a7bfa721eee24b0a5%2F20250801%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250801T092045Z&X-Amz-Expires=300&X-Amz-Signature=2e5ee8be0b46a42c58f67eb8ff70f3b8e99e75466860cb8e9511f3f718bcc45f&X-Amz-SignedHeaders=host&x-amz-checksum-crc32=AAAAAA%3D%3D&x-amz-sdk-checksum-algorithm=CRC32&x-id=PutObject",
        "key": "beta/665da3d7bcf6ab778bad0f6a/storage/test.mp4",
        "bucket": "a2e-prod-jumpy",
        "expiresIn": 300
    },
    "trace_id": "14992ffe-68b3-44ef-973e-c72c1fe7c34c"
}
Modified at 2025-08-08 11:04:34
Previous
Add Watermark to Video or Image
Next
Start Text-to-Image
Built with