# A2E Public API Reference

Provides guidance on A2E's public REST APIs for third-party developers and AI agents.

## Authentication
Use `Authorization: Bearer <API_TOKEN>` for all requests.
- Base URL: http://video.a2e.ai
- OpenAPI JSON: http://video.a2e.ai/dev/openapi-spec
- Full Documentation: http://video.a2e.ai/dev

## AI Quickstart
1. Create an API token in `Account > API Token`.
2. Load the machine-readable OpenAPI spec from `http://video.a2e.ai/dev/openapi-spec`.
3. Use the endpoint catalog below to choose the correct media workflow.

## API Catalog

### Image & Video Generation
#### Image to Video
- POST /api/v1/userImage2Video/start — Start image to video conversion
  - Required: image_url
- GET /api/v1/userImage2Video/allRecords — List all records
- POST /api/v1/userImage2Video/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userImage2Video/avgProcessingTime — Get average processing time
- POST /api/v1/userImage2Video/{_id}/markShared — Mark record as shared
- POST /api/v1/userImage2Video/{_id}/markDownloaded — Mark record as downloaded
- POST /api/v1/userImage2Video/{_id}/markCopied — Mark record as copied
- GET /api/v1/userImage2Video/{_id} — Get record details
- DELETE /api/v1/userImage2Video/{_id} — Delete an image to video task
- POST /api/v1/userImage2Video/prompt_extension — Extend prompt with AI
- POST /api/v1/userImage2Video/flf2v_prompt_extension — Extend video prompt with AI
#### Text to Image
- POST /api/v1/userText2Image/start — Start text to image generation
  - Required: prompt
  - Optional: name, width, height, model_type, input_images, aspect_ratio, max_images
- GET /api/v1/userText2Image/allRecords — Get all text to image records
- POST /api/v1/userText2Image/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userText2Image/{_id} — Get text to image record detail
- DELETE /api/v1/userText2Image/{_id} — Delete task
- POST /api/v1/userText2Image/quickAddAvatar — Quick add avatar from generated image
  - Required: _id
  - Optional: gender
#### Nano Banana
- POST /api/v1/userNanoBanana/start — Start Nano Banana image generation
  - Required: name, prompt
  - Optional: model, input_images, aspect_ratio, image_size, google_search, force_generate
- GET /api/v1/userNanoBanana/allRecords — Get Nano Banana task list
- POST /api/v1/userNanoBanana/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userNanoBanana/detail/{id} — Get task details
- DELETE /api/v1/userNanoBanana/delete/{id} — Delete task
#### GPT Image
- POST /api/v1/userGptImage/start — Start GPT Image generation or editing
  - Required: name, prompt
  - Optional: input_images, aspect_ratio, quality, force_generate
- GET /api/v1/userGptImage/list — Get GPT Image task list
- POST /api/v1/userGptImage/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userGptImage/detail/{id} — Get task details
- DELETE /api/v1/userGptImage/{id} — Delete GPT Image task
#### Flux 2
- POST /api/v1/userFlux2/start — Start Flux 2 Pro image generation or editing
  - Required: name, prompt
  - Optional: input_images, aspect_ratio, resolution, force_generate
- GET /api/v1/userFlux2/list — Get Flux 2 Pro task list
- POST /api/v1/userFlux2/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userFlux2/detail/{id} — Get task details
- DELETE /api/v1/userFlux2/{id} — Delete Flux 2 Pro task
#### Wan Image to Video
- POST /api/v1/userWan25/start — Start Wan 2.5 image to video conversion
  - Required: name, image_url, prompt
- GET /api/v1/userWan25/allRecords — Get all Wan 2.5 tasks
- POST /api/v1/userWan25/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userWan25/{_id} — Get Wan 2.5 task details
- DELETE /api/v1/userWan25/{_id} — Delete a Wan 2.5 task
#### Veo Video
- POST /api/v1/veoVideo/start — Start Veo 3.1 video generation
  - Required: prompt
  - Optional: name, generationType, imageUrls, model, aspectRatio, watermark, seeds
- GET /api/v1/veoVideo/allRecords — Get all Veo video records
- POST /api/v1/veoVideo/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/veoVideo/{_id} — Get Veo video detail
- DELETE /api/v1/veoVideo/{_id} — Delete Veo video record
- GET /api/v1/veoVideo/{_id}/1080p — Get 1080P HD video
#### Grok Video
- POST /api/v1/grokVideo/start — Start Grok Imagine video generation
  - Optional: name, model_type, prompt, mode, image_urls, image_url, aspect_ratio, duration
- GET /api/v1/grokVideo/allRecords — Get Grok Video task list
- POST /api/v1/grokVideo/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/grokVideo/{_id} — Get Grok Video task detail
- DELETE /api/v1/grokVideo/{_id} — Delete Grok Video task
#### Kling Video
- POST /api/v1/klingVideo/start — Start Kling video generation
  - Required: mode, prompt
- GET /api/v1/klingVideo/allRecords — Get all Kling video records
- POST /api/v1/klingVideo/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/klingVideo/{_id} — Get Kling video detail
- PUT /api/v1/klingVideo/{_id} — Update Kling video name
  - Required: name
- DELETE /api/v1/klingVideo/{_id} — Delete Kling video
#### Kling Omni
- POST /api/v1/klingOmni/start — Start Kling Omni video generation
  - Required: prompt, duration
  - Optional: name, image_list, mode, aspect_ratio, sound, multi_shot, shot_type, multi_prompt
- GET /api/v1/klingOmni/allRecords — Get all Kling Omni video records
- POST /api/v1/klingOmni/batchDetail — Batch get Kling Omni video details
  - Required: ids
- GET /api/v1/klingOmni/{_id} — Get Kling Omni video detail
- PUT /api/v1/klingOmni/{_id} — Update Kling Omni video name
  - Required: name
- DELETE /api/v1/klingOmni/{_id} — Delete Kling Omni video
#### Image Edit
- POST /api/v1/userImageEdit/start — Start image editing task
  - Required: edit_type, image_urls
  - Optional: name, timeout
- GET /api/v1/userImageEdit/allRecords — Get all task records
- POST /api/v1/userImageEdit/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userImageEdit/{_id} — Get task details
- DELETE /api/v1/userImageEdit/{_id} — Delete task

### Face & Body
#### Face Swap
- POST /api/v1/userFaceSwapImage/add — Add a new face image for face swapping
  - Required: face_url
- GET /api/v1/userFaceSwapImage/records — Get user's face swap image records
- DELETE /api/v1/userFaceSwapImage/{_id} — Remove a face swap image
- POST /api/v1/userFaceSwapPreview/add — Create a new face swap preview task
  - Required: video_url, face_url
- GET /api/v1/userFaceSwapPreview/status — Get face swap preview status
- GET /api/v1/userFaceSwapTask/retry — Retry face swap task
- POST /api/v1/userFaceSwapTask/add — Create a new face swap task
  - Required: name, video_url, face_url
  - Optional: cover_url, model_version
- GET /api/v1/userFaceSwapTask/records — Get user's face swap task records
- GET /api/v1/userFaceSwapTask/status — Get user's face swap task status
- POST /api/v1/userFaceSwapTask/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userFaceSwapTask/{_id} — Get face swap task details
- DELETE /api/v1/userFaceSwapTask/{_id} — Delete face swap task
#### Head Swap
- POST /api/v1/headSwap/start — Start head swap generation
  - Required: image_url, target_image_url
  - Optional: minor_suspected_skip
- GET /api/v1/headSwap/allRecords — Get all head swap records
- POST /api/v1/headSwap/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/headSwap/{_id} — Get head swap task detail
- DELETE /api/v1/headSwap/{_id} — Delete head swap task
#### Actor Swap
- POST /api/v1/actorSwap/start — Start actor swap task
  - Required: image_url, video_url
  - Optional: name, prompt, negative_prompt, timeout
- GET /api/v1/actorSwap/allRecords — Get all task records
- POST /api/v1/actorSwap/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/actorSwap/{_id} — Get task details
- DELETE /api/v1/actorSwap/{_id} — Delete task
#### Talking Photo
- POST /api/v1/talkingPhoto/start — Start talking photo generation
  - Required: name, image_url, prompt, negative_prompt
  - Optional: audio_url, duration
- GET /api/v1/talkingPhoto/allRecords — Get all task records
- POST /api/v1/talkingPhoto/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/talkingPhoto/{_id} — Get task details
- DELETE /api/v1/talkingPhoto/{_id} — Delete task
- POST /api/v1/talkingPhoto/callback — Task completion callback
#### Talking Video
- POST /api/v1/talkingVideo/start — Start talking video generation
  - Required: name, video_url, prompt, negative_prompt
  - Optional: audio_url, duration
- GET /api/v1/talkingVideo/allRecords — Get all task records
- POST /api/v1/talkingVideo/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/talkingVideo/{_id} — Get task details
- DELETE /api/v1/talkingVideo/{_id} — Delete task
#### Virtual Try-On
- POST /api/v1/virtualTryOn/start — Start virtual try-on task
  - Required: image_urls
  - Optional: name, timeout
- GET /api/v1/virtualTryOn/allRecords — Get all virtual try-on records
- POST /api/v1/virtualTryOn/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/virtualTryOn/{_id} — Get virtual try-on task detail
- DELETE /api/v1/virtualTryOn/{_id} — Delete virtual try-on task
#### Motion Transfer
- POST /api/v1/motionTransfer/start — Start motion transfer task
  - Required: image_url, video_url
  - Optional: name, positive_prompt, negative_prompt, timeout
- GET /api/v1/motionTransfer/allRecords — Get all motion transfer records
- POST /api/v1/motionTransfer/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/motionTransfer/{_id} — Get motion transfer task detail
- DELETE /api/v1/motionTransfer/{_id} — Delete motion transfer task
#### Product Avatar
- POST /api/v1/productAvatar/start — Generate product avatar with AI (Async)
  - Required: image_urls, product_rect
  - Optional: name, prompt, timeout
- GET /api/v1/productAvatar/allRecords — List all product avatar tasks
- POST /api/v1/productAvatar/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/productAvatar/{_id} — Query task status and get result
- DELETE /api/v1/productAvatar/{_id} — Delete a product avatar task

### Avatar & Video
#### Generate Avatar Videos
- POST /api/v1/video/list — Create/Run list
- POST /api/v1/anchor/list — List all avatars
  - Required: user, web_type
- POST /api/v1/video/generate — Generate AI video with avatar
  - Required: anchor_id, anchor_type
- POST /api/v1/video/generatePublicAccessToken — Generate public access token
  - Required: video_id
  - Optional: expire_minutes
#### Create Avatars
- POST /api/v1/custom_avatar/add — Add new record
- POST /api/v1/custom_avatar/list — Create/Run list
- POST /api/v1/custom_avatar/del — Delete record
- GET /api/v1/custom_avatar/all_tags — List all tags
- PUT /api/v1/custom_avatar/{_id} — Update record
#### Background Matting
- POST /api/v1/custom_back/add — Add new custom background
  - Required: img_url
- POST /api/v1/custom_back/list — Create/Run list
- POST /api/v1/custom_back/del — Delete record
- POST /api/v1/custom_back/allBackground — List all backgrounds
- POST /api/v1/custom_back/randomBackground — Get a random background
#### Video Twin
- POST /api/v1/userVideoTwin/upload — Upload file
- POST /api/v1/userVideoTwin/training — Start training
- GET /api/v1/userVideoTwin/uploadStatus — Get video twin upload status
- GET /api/v1/userVideoTwin/userRecords — Get user video twin records
- POST /api/v1/userVideoTwin/remove — Remove video twin
  - Required: _id
- GET /api/v1/userVideoTwin/records — Get video twin records
- POST /api/v1/userVideoTwin/startTraining — Start video twin training
  - Optional: name, image_url, video_url, video_backgroud_image, video_backgroud_color
- POST /api/v1/userVideoTwin/continueTraining — Continue video twin training
  - Required: _id
- GET /api/v1/userVideoTwin/trainingRecords — Get training records
- POST /api/v1/userVideoTwin/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userVideoTwin/{_id} — Get record details
- POST /api/v1/userVideoTwin/retry — Retry a failed task
- POST /api/v1/userVideoTwin/eyeContact — Start eye contact enhancement
  - Optional: _id

### Voice & Audio
#### TTS and Voice Clone
- POST /api/v1/anchor/tts_list — List system voices (TTS presets)
- POST /api/v1/anchor/language_list — List supported languages/regions for voices
  - Optional: voice_map_type
- POST /api/v1/anchor/voice_list — List available voices by country/region
  - Optional: country, region, voice_map_type
- GET /api/v1/anchor/voice_list — List available voices (GET)
- POST /api/v1/video/send_tts — Generate text-to-speech audio
  - Required: msg
  - Optional: tts_id, user_voice_id, country, region, speechRate, type, turnstile_token, captchaVerifyParam
- GET /api/v1/tts/preview/list — Get TTS preview list
- DELETE /api/v1/tts/preview/{id} — Delete TTS preview record
- POST /api/v1/userVoice/training — Start voice training
- GET /api/v1/userVoice/trainingRecord — Get voice training records
- GET /api/v1/userVoice/completedRecord — Get completed voice training records
- DELETE /api/v1/userVoice/{_id} — Delete voice training record
- GET /api/v1/userVoice/{_id} — Get voice training record detail
- PUT /api/v1/userVoice/{_id} — Update voice training record name
#### AI Dubbing
- POST /api/v1/userDubbing/startDubbing — Start AI dubbing task
- GET /api/v1/userDubbing/allRecords — Get all task records
- GET /api/v1/userDubbing/allProcessing — List processing records
- GET /api/v1/userDubbing/{_id} — Get task details
- DELETE /api/v1/userDubbing/{_id} — Delete dubbing task
#### ThinkSound
- POST /api/v1/thinkSound/start — Start ThinkSound generation
  - Required: video_url
  - Optional: name, caption, cot_description, seed
- DELETE /api/v1/thinkSound/{_id} — Delete ThinkSound task
- GET /api/v1/thinkSound/{_id} — Get ThinkSound task details
- GET /api/v1/thinkSound/allRecords — Get all ThinkSound records
- POST /api/v1/thinkSound/batchDetail — Batch query task details
  - Required: ids

### Post Processing
#### Caption Removal
- POST /api/v1/userCaptionRemoval/start — Start caption removal task
  - Required: name, source_url
- GET /api/v1/userCaptionRemoval/allRecords — Get all task records
- GET /api/v1/userCaptionRemoval/allProcessing — List processing records
- POST /api/v1/userCaptionRemoval/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userCaptionRemoval/{_id} — Get task details
- DELETE /api/v1/userCaptionRemoval/{_id} — Delete caption removal task
- POST /api/v1/userCaptionRemoval/retry — Retry a failed task
#### Upscale
- POST /api/v1/userUpscale/start — Start upscale task
  - Required: source_url
  - Optional: name
- GET /api/v1/userUpscale/allRecords — Get all task records
- POST /api/v1/userUpscale/batchDetail — Batch query task details
  - Required: ids
- GET /api/v1/userUpscale/{_id} — Get task details
- DELETE /api/v1/userUpscale/{_id} — Delete task

### Utilities
#### Miscellaneous
- POST /api/v1/user/add — Add new record
  - Required: username, password
- POST /api/v1/token/generate — Generate API token
  - Required: alias
- POST /api/v1/token/delete — Delete API token
  - Required: _id
- GET /api/v1/token/list — List API tokens
- POST /api/v1/token/status — Toggle token status
  - Required: _id, enabled
- POST /api/v1/r2/upload-presigned-url — Get pre-signed upload URL
  - Required: key
  - Optional: bucket, expiresIn, contentType