Zum Hauptinhalt springen
Die Hauptfunktion der Producer Tasks API besteht darin, den Status der Ausführung eines Auftrags abzufragen, der durch die Producer Audios Generation API generierte Aufgaben-ID eingegeben wurde. Dieses Dokument wird die Integrationsanleitung der Producer Tasks API detailliert beschreiben, um Ihnen zu helfen, diese API einfach zu integrieren und ihre leistungsstarken Funktionen voll auszuschöpfen. Mit der Producer Tasks API können Sie den Status der Ausführung von Aufgaben der Producer Audios Generation API einfach abfragen.

Antragsprozess

Um die Producer Tasks API zu nutzen, müssen Sie zunächst auf die Anmeldeseite Producer Audios Generation API gehen und den entsprechenden Dienst beantragen, dann kopieren Sie die Aufgaben-ID der Producer Audios Generation API, wie im Bild gezeigt:

Gehen Sie schließlich zur Tasks API-Seite Producer Tasks API, um den entsprechenden Dienst zu beantragen. Klicken Sie nach dem Betreten der Seite auf die Schaltfläche „Acquire“, wie im Bild gezeigt: Anmeldeseite Wenn Sie noch nicht angemeldet oder registriert sind, werden Sie automatisch zur Anmeldeseite weitergeleitet, die Sie zur Registrierung und Anmeldung einlädt. Nach der Anmeldung werden Sie automatisch zur aktuellen Seite zurückgeleitet. Bei der ersten Antragstellung gibt es ein kostenloses Kontingent, mit dem Sie die API kostenlos nutzen können.

Anfragebeispiel

Die Producer Tasks API kann verwendet werden, um die Ergebnisse der Producer Audios Generation API abzufragen. Informationen zur Nutzung der Producer Audios Generation API finden Sie im Dokument Producer Audios Generation API. Wir nehmen als Beispiel eine von der Producer Audios Generation API zurückgegebene Aufgaben-ID und demonstrieren, wie man diese API verwendet. Angenommen, wir haben eine Aufgaben-ID: 1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad, im Folgenden zeigen wir, wie man eine Aufgaben-ID übergibt.

Aufgabenbeispielbild

Anforderungsheader und Anforderungstext festlegen

Request Headers umfassen:
  • accept: Gibt an, dass die Antwort im JSON-Format empfangen werden soll, hier eingetragen als application/json.
  • authorization: Der Schlüssel zur API-Nutzung, der nach der Beantragung direkt ausgewählt werden kann.
Request Body umfasst:
  • id: Die hochgeladene Aufgaben-ID.
  • action: Die Art der Operation auf der Aufgabe.
Einstellung wie im folgenden Bild gezeigt:

Codebeispiel

Es ist zu erkennen, dass auf der rechten Seite der Seite bereits automatisch Code in verschiedenen Sprachen generiert wurde, wie im Bild gezeigt:

Einige Codebeispiele sind wie folgt:

CURL

curl -X POST 'https://api.acedata.cloud/producer/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
  "action": "retrieve"
}'

Antwortbeispiel

Nach erfolgreicher Anfrage gibt die API die Detailinformationen zu dieser Aufgabe zurück. Zum Beispiel:
{
  "_id": "69541b81ff2676299ccc3b29",
  "id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
  "api_id": "01d96900-9f8c-41d7-814c-95c7a885ba61",
  "application_id": "920ba772-867a-48ae-8efa-9b9f94136199",
  "created_at": 1767119745.524,
  "credential_id": "eeae817d-d6ff-493e-8f88-6c62391da7c6",
  "request": {
    "action": "generate",
    "model": "FUZZ-2.0 Pro",
    "instrumental": false,
    "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
    "custom": true,
    "callback_url": "https://webhook.site/0d73431d-f833-4be4-9276-b6e1690d55c1"
  },
  "trace_id": "1da03537-4eb8-410d-b849-43f03085a3bb",
  "type": "audios",
  "user_id": "ad7afe47-cea9-4cda-980f-2ad8810e51cf",
  "response": {
    "task_id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
    "data": [
      {
        "id": "1dd08826-478e-43a6-868f-aff5ababac2c",
        "title": "Woke up with the sun in my eyes",
        "image_url": "https://storage.googleapis.com/corpusant-app-public/riffs/3bff6223-fe13-4bef-973e-2cbaef430d5d/image/1dd08826-478e-43a6-868f-aff5ababac2c.jpg",
        "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
        "audio_url": "https://storage.googleapis.com/corpusant-app-public/riffs/3bff6223-fe13-4bef-973e-2cbaef430d5d/audio/1dd08826-478e-43a6-868f-aff5ababac2c.m4a",
        "video_url": null,
        "image_id": "1dd08826-478e-43a6-868f-aff5ababac2c",
        "topic": null,
        "seed": "1490770667",
        "sound": "",
        "created_at": "2025-12-30T18:36:00.994141Z",
        "model": "FUZZ-2.0 Pro",
        "progress": "100%",
        "state": "succeeded",
        "duration": "135.2330158730159"
      }
    ]
  },
  "duration": 40.06500005722046,
  "finished_at": 1767119785.589
}
Die Rückgabeergebnisse umfassen mehrere Felder, das Feld request ist der Request-Body, der beim Starten der Aufgabe gesendet wurde, während das Feld response der Response-Body ist, der nach Abschluss der Aufgabe zurückgegeben wird. Die Feldbeschreibung ist wie folgt.
  • id, die ID der generierten Aufgabe, die zur eindeutigen Identifizierung dieser Generierungsaufgabe verwendet wird.
  • request, die Anfrageinformationen in der Abfrageaufgabe.
  • response, die Rückgabeinformationen in der Abfrageaufgabe.

Batch-Abfrageoperation

Dies ist eine Abfrage von Aufgabendetails für mehrere Aufgaben-IDs. Im Gegensatz zu oben muss die Aktion auf retrieve_batch gesetzt werden. Request Body umfasst:
  • ids: Array der hochgeladenen Aufgaben-IDs.
  • action: Die Art der Operation an der Aufgabe.
Einstellungen wie im folgenden Bild gezeigt:

Codebeispiel

Es ist zu erkennen, dass auf der rechten Seite der Seite bereits automatisch Code in verschiedenen Sprachen generiert wurde, wie im Bild gezeigt:

Einige Codebeispiele sind wie folgt:

Antwortbeispiel

Nach erfolgreicher Anfrage gibt die API die spezifischen Detailinformationen aller Batch-Aufgaben zurück. Zum Beispiel:
{
  "items": [
    {
      "_id": "69541b81ff2676299ccc3b29",
      "id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
      "api_id": "01d96900-9f8c-41d7-814c-95c7a885ba61",
      "application_id": "920ba772-867a-48ae-8efa-9b9f94136199",
      "created_at": 1767119745.524,
      "credential_id": "eeae817d-d6ff-493e-8f88-6c62391da7c6",
      "request": {
        "action": "generate",
        "model": "FUZZ-2.0 Pro",
        "instrumental": false,
        "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
        "custom": true,
        "callback_url": "https://webhook.site/0d73431d-f833-4be4-9276-b6e1690d55c1"
      },
      "trace_id": "1da03537-4eb8-410d-b849-43f03085a3bb",
      "type": "audios",
      "user_id": "ad7afe47-cea9-4cda-980f-2ad8810e51cf",
      "response": {
        "task_id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
        "data": [
          {
            "id": "1dd08826-478e-43a6-868f-aff5ababac2c",
            "title": "Woke up with the sun in my eyes",
            "image_url": "https://storage.googleapis.com/corpusant-app-public/riffs/3bff6223-fe13-4bef-973e-2cbaef430d5d/image/1dd08826-478e-43a6-868f-aff5ababac2c.jpg",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://storage.googleapis.com/corpusant-app-public/riffs/3bff6223-fe13-4bef-973e-2cbaef430d5d/audio/1dd08826-478e-43a6-868f-aff5ababac2c.m4a",
            "video_url": null,
            "image_id": "1dd08826-478e-43a6-868f-aff5ababac2c",
            "topic": null,
            "seed": "1490770667",
            "sound": "",
            "created_at": "2025-12-30T18:36:00.994141Z",
            "model": "FUZZ-2.0 Pro",
            "progress": "100%",
            "state": "succeeded",
            "duration": "135.2330158730159"
          }
        ]
      },
      "duration": 40.06500005722046,
      "finished_at": 1767119785.589
    }, {
      "_id": "69541b81ff2676299ccc3b29",
      "id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
      "api_id": "01d96900-9f8c-41d7-814c-95c7a885ba61",
      "application_id": "920ba772-867a-48ae-8efa-9b9f94136199",
      "created_at": 1767119745.524,
      "credential_id": "eeae817d-d6ff-493e-8f88-6c62391da7c6",
      "request": {
        "action": "generate",
        "model": "FUZZ-2.0 Pro",
        "instrumental": false,
        "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
        "custom": true,
        "callback_url": "https://webhook.site/0d73431d-f833-4be4-9276-b6e1690d55c1"
      },
      "trace_id": "1da03537-4eb8-410d-b849-43f03085a3bb",
      "type": "audios",
      "user_id": "ad7afe47-cea9-4cda-980f-2ad8810e51cf",
      "response": {
        "task_id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
        "data":
[
          {
            "id": "1dd08826-478e-43a6-868f-aff5ababac2c",
            "title": "Wachte mit der Sonne in meinen Augen auf",
            "image_url": "https://storage.googleapis.com/corpusant-app-public/riffs/3bff6223-fe13-4bef-973e-2cbaef430d5d/image/1dd08826-478e-43a6-868f-aff5ababac2c.jpg",
            "lyric": "[Strophe]\nWachte mit der Sonne in meinen Augen auf\nKeine Wolken darüber, nur Blau am Himmel\nSchuhe an meinen Füßen, ich bin bereit zu rennen\nJeder Schritt fühlt sich an wie eine geladene Waffe\n[Refrain]\nGlückliche Tage rollen herein\nLass die Freude unter meiner Haut\nKeine Schatten mehr, keine Lügen mehr\nNur die Wahrheit, die mich hoch hebt\n[Strophe 2]\nTanze durch die Straßen der Stadt\nEin Rhythmus, der in meinem Herzschlag pocht\nFremde lächeln, es ist ansteckend\nDiese Welt ist eine Bühne, wir sind alle ein Lied\n[Refrain]\nGlückliche Tage rollen herein\nLass die Freude unter meiner Haut\nKeine Schatten mehr, keine Lügen mehr\nNur die Wahrheit, die mich hoch hebt\n[Bridge]\nWirf deine Sorgen aus der Tür\nLass sie zum Meeresboden sinken\nWir leben und das ist genug\nDas Leben ist chaotisch, aber es ist Liebe\n[Refrain]\nGlückliche Tage rollen herein\nLass die Freude unter meiner Haut\nKeine Schatten mehr, keine Lügen mehr\nNur die Wahrheit, die mich hoch hebt",
            "audio_url": "https://storage.googleapis.com/corpusant-app-public/riffs/3bff6223-fe13-4bef-973e-2cbaef430d5d/audio/1dd08826-478e-43a6-868f-aff5ababac2c.m4a",
            "video_url": null,
            "image_id": "1dd08826-478e-43a6-868f-aff5ababac2c",
            "topic": null,
            "seed": "1490770667",
            "sound": "",
            "created_at": "2025-12-30T18:36:00.994141Z",
            "model": "FUZZ-2.0 Pro",
            "progress": "100%",
            "state": "succeeded",
            "duration": "135.2330158730159"
          }
        ]
      },
      "duration": 40.06500005722046,
      "finished_at": 1767119785.589
    }
  ],
  "count": 2
}
Die Rückgabe enthält mehrere Felder, wobei items die spezifischen Detailinformationen der Batch-Aufgaben enthält. Die spezifischen Informationen jeder Aufgabe sind im gleichen Format wie die oben angegebene Rückgabe eines einzelnen Auftrags.
  • items, alle spezifischen Detailinformationen der Batch-Aufgaben. Es ist ein Array, und jedes Element des Arrays hat das gleiche Format wie die Rückgabe eines einzelnen Auftrags.
  • count, die Anzahl der Batch-Abfragen.

CURL

curl -X POST 'https://api.acedata.cloud/producer/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "ids": ["1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad","1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad"],
  "action": "retrieve_batch"
}'

Fehlerbehandlung

Wenn beim Aufruf der API ein Fehler auftritt, gibt die API den entsprechenden Fehlercode und die Informationen zurück. Zum Beispiel:
  • 400 token_mismatched: Ungültige Anfrage, möglicherweise aufgrund fehlender oder ungültiger Parameter.
  • 400 api_not_implemented: Ungültige Anfrage, möglicherweise aufgrund fehlender oder ungültiger Parameter.
  • 401 invalid_token: Unbefugt, ungültiger oder fehlender Autorisierungstoken.
  • 429 too_many_requests: Zu viele Anfragen, Sie haben das Rate-Limit überschritten.
  • 500 api_error: Interner Serverfehler, etwas ist auf dem Server schiefgelaufen.

Fehlerantwortbeispiel

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "Abruf fehlgeschlagen"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Fazit

Durch dieses Dokument haben Sie gelernt, wie Sie die Producer Tasks API verwenden, um die spezifischen Detailinformationen einzelner oder Batch-Aufgaben abzufragen. Wir hoffen, dass dieses Dokument Ihnen hilft, die API besser zu integrieren und zu nutzen. Bei Fragen wenden Sie sich bitte jederzeit an unser technisches Support-Team.