Points d'accès API

Fournisseur MiniMax

POST/v2/minimax/generate

API de génération du fournisseur MiniMax

Générez de la musique via le fournisseur MiniMax intégré.

POSThttps://udioapi.pro/api/v2/minimax/generate

tips

Fournisseur MiniMax : utilisez ce point de terminaison lorsque vous avez besoin de MiniMax.

Interrogation : Appelez /v2/minimax/feed?workId=... jusqu'à ce que SUCCÈS ou ÉCHEC.

requestHeaders

namerequireddescription
AuthorizationyesJeton du porteur pour l'authentification
Content-Typeyesapplication/json

requestBody

Demande de génération MiniMax

commonParams

paramNameparamTyperequireddescriptionexample
promptstringyesInvite de génération de musiqueCinematic orchestral pop, emotional female vocal, warm piano, strings, gradual build, polished studio mix.
lyricsstringnoParoles facultativesVerse 1: The city lights are fading\nChorus: We rise into the morning glow
bitratenumbernoDébit audio256000
sample_ratenumbernoTaux d'échantillonnage audio44100
callback_urlstringnoURL de rappel facultativehttps://api.example.com/webhooks/minimax
publicbooleannoSi la tâche peut être publiquefalse

endpoint.generate.responseSectionsHeading

endpoint.generate.responseSections.generateResponse.title

fieldparamTypedescriptionexample
codenumberendpoint.generate.responseSections.generateResponse.fields.code.description200
messagestringendpoint.generate.responseSections.generateResponse.fields.message.descriptionsuccess
data.task_idstringendpoint.generate.responseSections.generateResponse.fields.dataTaskId.descriptionn74abc123music
data.statusstringendpoint.generate.responseSections.generateResponse.fields.dataStatus.descriptionIN_PROGRESS

responses

json
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "n74abc123music",
    "status": "IN_PROGRESS",
    "type": "text2music"
  }
}
json
{
  "code": 400,
  "message": "Bad Request: 'prompt' is required.",
  "data": null
}
json
{
  "code": 401,
  "message": "No API key provided in Authorization header",
  "data": null
}

codeExamples

curl
curl -X POST "https://udioapi.pro/api/v2/minimax/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Cinematic orchestral pop, emotional female vocal, warm piano, strings, gradual build, polished studio mix.",
    "lyrics": "Verse 1: The city lights are fading\nChorus: We rise into the morning glow",
    "bitrate": 256000,
    "sample_rate": 44100,
    "callback_url": "https://api.example.com/webhooks/minimax"
  }'
javascript
const response = await fetch('https://udioapi.pro/api/v2/minimax/generate', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Cinematic orchestral pop, emotional female vocal, warm piano, strings, gradual build, polished studio mix.',
    lyrics: 'Verse 1: The city lights are fading\nChorus: We rise into the morning glow',
    bitrate: 256000,
    sample_rate: 44100,
    callback_url: 'https://api.example.com/webhooks/minimax'
  })
});

const data = await response.json();
console.log(data.data.task_id);
GET/v2/minimax/feed?workId=xxx

API d'état des tâches du fournisseur MiniMax

Récupérez les URL de statut et de résultat pour une tâche MiniMax.

GEThttps://udioapi.pro/api/v2/minimax/feed?workId=xxx

tips

Utilisez task_id à partir du point de terminaison généré comme workId.

Lorsque le statut devient SUCCÈS, la réponse contient des URL audio.

requestParams

paramNameparamTyperequireddescription
workIdstringyesID de tâche MiniMax renvoyé par le point de terminaison de génération

responses

json
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "n74abc123music",
    "status": "IN_PROGRESS",
    "consumed_credits": 30,
    "error_message": null,
    "created_at": "2026-06-13 12:00:00",
    "type": "text2music",
    "request": {
      "prompt": "Cinematic orchestral pop...",
      "bitrate": 256000,
      "sample_rate": 44100
    },
    "response": null
  }
}
json
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "n74abc123music",
    "status": "SUCCESS",
    "consumed_credits": 30,
    "error_message": null,
    "created_at": "2026-06-13 12:00:00",
    "type": "text2music",
    "request": {
      "prompt": "Cinematic orchestral pop...",
      "bitrate": 256000,
      "sample_rate": 44100
    },
    "response": [
      "https://example-cdn.com/generated-minimax-track.mp3"
    ]
  }
}
json
{
  "code": 404,
  "message": "Task not found",
  "data": null
}

codeExamples

curl
curl -X GET "https://udioapi.pro/api/v2/minimax/feed?workId=n74abc123music"
javascript
const response = await fetch('https://udioapi.pro/api/v2/minimax/feed?workId=n74abc123music');
const data = await response.json();

if (data.data.status === 'SUCCESS') {
  console.log('Audio URLs:', data.data.response);
}