Developer Docs/Video to Audio API

Video to Audio API

Build Video to Audio integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

Generate semantically-aware ambient sound effects and background audio that match the visual content of a video clip.

Primary Endpoint

POST/api/v1/thinkSound/start

Generate audio-visual content from video using AI with customizable parameters. ### Request - Send a valid bearer token. The server evaluates the operation in the authenticated caller's access context. - Send an `application/json` body. Required fields: `video_url`. - API-token callers may include `webhook_url` and `webhook_token` for best-effort terminal-state notifications; ordinary JWT/cookie calls ignore these fields. ### Behavior - This is an asynchronous operation: a successful submission creates a task and returns before processing finishes. - Persist the returned task identifier and use the corresponding detail or list operation to observe progress. - Treat the detail endpoint as the source of truth even when webhook delivery is enabled. ### Response - A `200` response confirms task acceptance; it does not by itself mean media generation has completed. - Retain the returned identifier and wait for a documented terminal status before using output URLs. - JSON object responses, including error responses, normally carry a top-level `trace_id` string for this request; include it when contacting support. It is not a task identifier. - Do not infer undocumented fields or statuses; clients should tolerate additional response properties. ### Errors - `400` — Bad Request - Invalid parameters or video format. - `401` — Unauthorized - Invalid or missing JWT token. ### Related Operations - `GET /api/v1/thinkSound/allRecords` — Get all ThinkSound records. - `DELETE /api/v1/thinkSound/{_id}` — Delete ThinkSound task. - `GET /api/v1/thinkSound/{_id}` — Get ThinkSound task details. Authentication: set header Authorization: Bearer <token> (supports user JWT or sk_ API token).

Request Parameters

NameTypeRequiredDescription
namestringNoName of the ThinkSound task
video_urlstringYesURL of the source video (must be .mp4, .avi, .mov, or .mkv)
captionstringNoCaption for the generation; default: ""
cot_descriptionstringNoChain of thought description; default: ""
seednumberNoRandom seed for reproducible results
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.; maxLength: 2048
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.; maxLength: 256
Request schema and conditional rules
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the ThinkSound task",
          "example": "My Audio-Visual Generation"
        },
        "video_url": {
          "type": "string",
          "description": "URL of the source video (must be .mp4, .avi, .mov, or .mkv)",
          "example": "https://example.com/video.mp4"
        },
        "caption": {
          "type": "string",
          "description": "Caption for the generation",
          "default": "",
          "example": "Generate audio for this silent video"
        },
        "cot_description": {
          "type": "string",
          "description": "Chain of thought description",
          "default": "",
          "example": "Detailed description of the audio generation process"
        },
        "seed": {
          "type": "number",
          "description": "Random seed for reproducible results",
          "example": 12345
        }
      },
      "required": [
        "video_url"
      ]
    },
    {
      "$ref": "#/components/schemas/WebhookInput"
    }
  ]
}

Response Fields

code: integer
data: object
data._id: string
Task ID
data.name: string
data.video_url: string
data.current_status: string
data.coins: number
data.reference_id: string
trace_id: string
Trace ID of this HTTP request. Include it when contacting support about this request. It is generated per request and is not a task identifier; use the returned task `_id` to query results.

Request Example

curl -X POST "https://www.a2e.com.cn/api/v1/thinkSound/start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "video_url": "https://example.com/video.mp4"
}'

Related Endpoints

Responses

200

ThinkSound generation started successfully

400

Bad Request - Invalid parameters or video format

401

Unauthorized - Invalid or missing bearer token

Video to Audio API Documentation