1. Upload Files
BeatAPI
  • Quick Start
  • BeatAPI Realtime Video API
  • Music Video API
    • Create Video
      • Create Music Video
    • Advanced Editing
      • Edit Shot
      • Get Shot Media
      • Compose Video
  • Ecommerce Video API
    • Create Ecommerce Video
  • Reference
    • API Overview
      • List launch workflows
    • Task Status
      • Poll task status
    • Usage & Limits
      • Get account usage and concurrency
    • Upload Files
      • Upload a file for workflow inputs
        POST
    • Webhooks
      • List webhook endpoints
      • Create a webhook endpoint
      • Get a webhook endpoint
      • Update a webhook endpoint
      • Delete a webhook endpoint
  • Realtime Video API
    • Create a realtime browser session
    • Get a realtime session
    • Close a realtime session
  1. Upload Files

Upload a file for workflow inputs

POST
/v1/files
Use file upload when your images, audio, or subtitle files are not
already hosted at public HTTPS URLs. The returned HTTPS URL can be used
directly in images, audio_url, or srt_url.
Limits:
Maximum file size is 50 MB.
Images: png, jpg, jpeg, webp
(image/png, image/jpeg, image/webp).
Audio: mp3, wav, aac, m4a
(audio/mpeg, audio/wav, audio/aac, audio/mp4).
Audio uploads must be 10-180 seconds.
Subtitles: srt (application/x-subrip; multipart uploads may use
text/plain only when the filename ends in .srt).
PDF, generic text files, octet-stream uploads, videos, and zip files
are not supported for launch.
Send either multipart form-data with a file field, or send the raw
file body with the asset Content-Type.
Returned URLs are HTTPS and long-lived for launch.
Uploaded audio files are duration-checked during upload. The response
includes audio_duration_seconds when the uploaded asset is audio.
Workflow task inputs still require public HTTPS URLs. Localhost,
private network URLs, and data URLs are not accepted.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params multipart/form-dataRequired

Responses

🟢201
application/json
File uploaded
Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.beatapi.io/v1/files' \
--header 'Authorization: Bearer <token>' \
--form 'file=@""' \
--form 'purpose=""'
Response Response Example
201 - 成功示例
{
    "data": {
        "id": "file_3xYz9",
        "object": "file",
        "url": "https://media.beatapi.io/inputs/file_3xYz9.mp3",
        "key": "inputs/file_3xYz9.mp3",
        "mime_type": "audio/mpeg",
        "size_bytes": 1048576,
        "purpose": "input",
        "audio_duration_seconds": 64.02,
        "audio_duration_source": "mp3_frame_scan",
        "created_at": 1782210000
    }
}
Modified at 2026-07-31 15:10:04
Previous
Get account usage and concurrency
Next
List webhook endpoints
Built with