Skip to content
הדף עדיין אינו זמין בשפה שלכם, ולכן הוא מוצג באנגלית.

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`).

כל התיעוד
POST/v1/music/generations/uploadTask
  • Async task: submitting returns a task_id; poll GET /v1/music/tasks/:task_id for 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 for version, audio_format, or any other parameters not listed in this article.

דוגמאות לבקשות

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

Authorizationstringrequired

All 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:

text
Authorization: Bearer YOUR_API_KEY

Body

audioFilePathstringrequired

Uploaded 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_id upon submission and poll with GET /v1/music/tasks/{task_id}. Use the task_id + audio_index=1 of this task for other operations; upload results may only contain audio_id, not guaranteeing a playable audio_url.

Response

codeinteger

Response status code

dataarray

Returned data array

Attributes

statusstring

Task status

  • submitted - Submitted
task_idstring

Unique task identifier (used to poll GET /v1/music/tasks/{task_id} for the result)

תגובות

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

מצאתם בעיה בתיעוד? אפשר לשלוח אימייל לכתובת support@apisea.ai.