Skip to main content
POST
Note for users in mainland China: Please use https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.
The docs Playground does not support file uploads: Please use the cURL, Python, or JavaScript code examples below for testing.

Why Upload Audio First?

  1. Unified input flow - Upload local audio once and reuse the returned public URL
  2. Less repeated transfer - The same uploaded audio can be reused in multiple requests

Authorizations

string
required
Use Bearer Token for authenticationGet your API Key: Visit API Key Management

Body

file
required
Audio fileSupported formats:
  • MP3 (.mp3)
  • WAV (.wav)
  • M4A (.m4a)
Limits:
  • Maximum file size: 50MB
string
Upload purpose (optional)Default: generation

Response

boolean
Whether the request succeeded
object