Upload audio
Import a piece of public audio to obtain a track that can be referenced later (for cover / continuation, etc.); once complete, this job's `task_id` can serve as the source (`audio_index=1`).
Tüm belgeler/v1/music/generations/uploadTask- Async task: submitting returns a
task_id; pollGET /v1/music/tasks/:task_idfor the result
Note
This endpoint only accepts JSON and does not upload binary files. Please first upload the audio and obtain a public URL, then fill in
audioFilePath. Do not send parameters forversion,audio_format, or any other parameters not listed in this article.
İstek örnekleri
curl -X POST https://api.apisea.ai/v1/music/generations/uploadTask \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
--data '{
"audioFilePath": "https://example.com/my.mp3"
}'Authorizations
AuthorizationstringrequiredAll endpoints require authentication using a Bearer Token
Get an API Key:
Visit the API Key management page to get your API Key
Add the following to the request headers when using it:
Authorization: Bearer YOUR_API_KEYBody
audioFilePathstringrequiredUploaded to object storage and publicly readable audio HTTP(S) link. The local path is not available, and the blob: URL is also unavailable.
Note
Result: This is an asynchronous task. Obtain
task_idupon submission and poll withGET /v1/music/tasks/{task_id}. Use thetask_id+audio_index=1of this task for other operations; upload results may only containaudio_id, not guaranteeing a playableaudio_url.
Response
codeintegerResponse status code
dataarrayReturned data array
Attributes
statusstringTask status
submitted- Submitted
task_idstringUnique task identifier (used to poll GET /v1/music/tasks/{task_id} for the result)
Yanıtlar
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
}
]
}Bu belgelerde bir sorun mu buldunuz? support@apisea.ai adresine e-posta gönderin.