Zum Inhalt springen
API-Referenz
API-Referenz

Suno Text zu Musik

Verwenden Sie den Endpunkt „Text zu Musik", um einen asynchronen Task zu erstellen.

01

Übersicht

Verwenden Sie den Endpunkt „Text zu Musik" mit einem unterstützten Modell. Verwenden Sie die zurückgegebene Task-ID, um den Status abzurufen, oder geben Sie callback_url für die unten dokumentierten Zustellungen an.

Schnellstart

  1. Erstellen Sie einen API-Schlüssel und setzen Sie ihn als RUNAPI_API_KEY.
  2. Wählen Sie ein unterstütztes Modell und senden Sie eine POST-Anfrage, deren Body dem Schema dieses Modells entspricht.
  3. Speichern Sie die zurückgegebene Task-ID und fragen Sie den Status ab, bis ein Endzustand erreicht ist, oder verarbeiten Sie die unten dokumentierten Callbacks.

Endpunkt

POST /api/v1/suno/text_to_music
Basis-URL
https://runapi.ai
API-Version
v1
Authentifizierung
Authorization: Bearer YOUR_API_TOKEN
02

Unterstützte Modelle

Öffnen Sie eine Modellseite für aktuelle Preise, Ratenlimits und Details zur kommerziellen Nutzung.

03

Anfrage-Schema

JSON-Body

Felder und zulässige Werte hängen vom ausgewählten Modell ab. Wenn angegeben, empfängt callback_url die unten dokumentierten Task-Zustellungen.

suno-v415 Felder
audio_weightnumber
Optional

Audiogewichtung (0–1).

Bereich: 0 - 1
callback_urlstring
Optional

Webhook-URL für asynchrone Benachrichtigungen.

continue_atnumber
Optional

Zeitstempel in Sekunden, ab dem fortgefahren werden soll.

lyricsstring
Optional

Exakter Liedtext zum Singen.

Grenzwert: 5000
modelstring
Erforderlich

Modell-Slug.

negative_tagsstring
Optional

Zu vermeidende Stile.

persona_idstring
Optional

Persona-ID.

persona_typestring
Optional

Persona-Typ.

Zulässige Werte: style, voice
promptstring
Optional

Song-Briefing für automatische Liedtexte.

Grenzwert: 5000
stylestring
Optional

Musikstil.

Grenzwert: 1000
style_weightnumber
Optional

Gewichtung der Stiltreue (0–1).

Bereich: 0 - 1
titlestring
Optional

Musiktitel.

Grenzwert: 80
vocal_genderstring
Optional

Vokales Geschlecht.

Zulässige Werte: male, female
vocal_modestring
Erforderlich

Modus der Vokalgenerierung.

Zulässige Werte: auto_lyrics, exact_lyrics, instrumental
weirdness_constraintnumber
Optional

Einschränkung für Seltsamkeit (0–1).

Bereich: 0 - 1
suno-v4.515 Felder
audio_weightnumber
Optional

Audiogewichtung (0–1).

Bereich: 0 - 1
callback_urlstring
Optional

Webhook-URL für asynchrone Benachrichtigungen.

continue_atnumber
Optional

Zeitstempel in Sekunden, ab dem fortgefahren werden soll.

lyricsstring
Optional

Exakter Liedtext zum Singen.

Grenzwert: 5000
modelstring
Erforderlich

Modell-Slug.

negative_tagsstring
Optional

Zu vermeidende Stile.

persona_idstring
Optional

Persona-ID.

persona_typestring
Optional

Persona-Typ.

Zulässige Werte: style, voice
promptstring
Optional

Song-Briefing für automatische Liedtexte.

Grenzwert: 5000
stylestring
Optional

Musikstil.

Grenzwert: 1000
style_weightnumber
Optional

Gewichtung der Stiltreue (0–1).

Bereich: 0 - 1
titlestring
Optional

Musiktitel.

Grenzwert: 80
vocal_genderstring
Optional

Vokales Geschlecht.

Zulässige Werte: male, female
vocal_modestring
Erforderlich

Modus der Vokalgenerierung.

Zulässige Werte: auto_lyrics, exact_lyrics, instrumental
weirdness_constraintnumber
Optional

Einschränkung für Seltsamkeit (0–1).

Bereich: 0 - 1
suno-v4.5-all15 Felder
audio_weightnumber
Optional

Audiogewichtung (0–1).

Bereich: 0 - 1
callback_urlstring
Optional

Webhook-URL für asynchrone Benachrichtigungen.

continue_atnumber
Optional

Zeitstempel in Sekunden, ab dem fortgefahren werden soll.

lyricsstring
Optional

Exakter Liedtext zum Singen.

Grenzwert: 5000
modelstring
Erforderlich

Modell-Slug.

negative_tagsstring
Optional

Zu vermeidende Stile.

persona_idstring
Optional

Persona-ID.

persona_typestring
Optional

Persona-Typ.

Zulässige Werte: style, voice
promptstring
Optional

Song-Briefing für automatische Liedtexte.

Grenzwert: 5000
stylestring
Optional

Musikstil.

Grenzwert: 1000
style_weightnumber
Optional

Gewichtung der Stiltreue (0–1).

Bereich: 0 - 1
titlestring
Optional

Musiktitel.

Grenzwert: 80
vocal_genderstring
Optional

Vokales Geschlecht.

Zulässige Werte: male, female
vocal_modestring
Erforderlich

Modus der Vokalgenerierung.

Zulässige Werte: auto_lyrics, exact_lyrics, instrumental
weirdness_constraintnumber
Optional

Einschränkung für Seltsamkeit (0–1).

Bereich: 0 - 1
suno-v4.5-plus15 Felder
audio_weightnumber
Optional

Audiogewichtung (0–1).

Bereich: 0 - 1
callback_urlstring
Optional

Webhook-URL für asynchrone Benachrichtigungen.

continue_atnumber
Optional

Zeitstempel in Sekunden, ab dem fortgefahren werden soll.

lyricsstring
Optional

Exakter Liedtext zum Singen.

Grenzwert: 5000
modelstring
Erforderlich

Modell-Slug.

negative_tagsstring
Optional

Zu vermeidende Stile.

persona_idstring
Optional

Persona-ID.

persona_typestring
Optional

Persona-Typ.

Zulässige Werte: style, voice
promptstring
Optional

Song-Briefing für automatische Liedtexte.

Grenzwert: 5000
stylestring
Optional

Musikstil.

Grenzwert: 1000
style_weightnumber
Optional

Gewichtung der Stiltreue (0–1).

Bereich: 0 - 1
titlestring
Optional

Musiktitel.

Grenzwert: 80
vocal_genderstring
Optional

Vokales Geschlecht.

Zulässige Werte: male, female
vocal_modestring
Erforderlich

Modus der Vokalgenerierung.

Zulässige Werte: auto_lyrics, exact_lyrics, instrumental
weirdness_constraintnumber
Optional

Einschränkung für Seltsamkeit (0–1).

Bereich: 0 - 1
suno-v515 Felder
audio_weightnumber
Optional

Audiogewichtung (0–1).

Bereich: 0 - 1
callback_urlstring
Optional

Webhook-URL für asynchrone Benachrichtigungen.

continue_atnumber
Optional

Zeitstempel in Sekunden, ab dem fortgefahren werden soll.

lyricsstring
Optional

Exakter Liedtext zum Singen.

Grenzwert: 5000
modelstring
Erforderlich

Modell-Slug.

negative_tagsstring
Optional

Zu vermeidende Stile.

persona_idstring
Optional

Persona-ID.

persona_typestring
Optional

Persona-Typ.

Zulässige Werte: style, voice
promptstring
Optional

Song-Briefing für automatische Liedtexte.

Grenzwert: 5000
stylestring
Optional

Musikstil.

Grenzwert: 1000
style_weightnumber
Optional

Gewichtung der Stiltreue (0–1).

Bereich: 0 - 1
titlestring
Optional

Musiktitel.

Grenzwert: 80
vocal_genderstring
Optional

Vokales Geschlecht.

Zulässige Werte: male, female
vocal_modestring
Erforderlich

Modus der Vokalgenerierung.

Zulässige Werte: auto_lyrics, exact_lyrics, instrumental
weirdness_constraintnumber
Optional

Einschränkung für Seltsamkeit (0–1).

Bereich: 0 - 1
suno-v5.516 Felder
audio_weightnumber
Optional

Audiogewichtung (0–1).

Bereich: 0 - 1
callback_urlstring
Optional

Webhook-URL für asynchrone Benachrichtigungen.

continue_atnumber
Optional

Zeitstempel in Sekunden, ab dem fortgefahren werden soll.

duration_secondsinteger
Optional

Bevorzugte Dauer in Sekunden; nur für benutzerdefinierte Suno V5.5-Anfragen verfügbar.

Bereich: 10 - 360
lyricsstring
Optional

Exakter Liedtext zum Singen.

Grenzwert: 5000
modelstring
Erforderlich

Modell-Slug.

negative_tagsstring
Optional

Zu vermeidende Stile.

persona_idstring
Optional

Persona-ID.

persona_typestring
Optional

Persona-Typ.

Zulässige Werte: style, voice
promptstring
Optional

Song-Briefing für automatische Liedtexte.

Grenzwert: 5000
stylestring
Optional

Musikstil.

Grenzwert: 1000
style_weightnumber
Optional

Gewichtung der Stiltreue (0–1).

Bereich: 0 - 1
titlestring
Optional

Musiktitel.

Grenzwert: 80
vocal_genderstring
Optional

Vokales Geschlecht.

Zulässige Werte: male, female
vocal_modestring
Erforderlich

Modus der Vokalgenerierung.

Zulässige Werte: auto_lyrics, exact_lyrics, instrumental
weirdness_constraintnumber
Optional

Einschränkung für Seltsamkeit (0–1).

Bereich: 0 - 1

Bedingte Regeln

Diese Anforderungen gelten, wenn alle aufgeführten Bedingungen zutreffen.

  1. Wenn vocal_mode = auto_lyrics
    Erforderlich
    prompt
    Nicht akzeptiert
    lyrics, style, title, negative_tags, vocal_gender, duration_seconds
  2. Wenn vocal_mode = exact_lyrics
    Erforderlich
    lyrics, style, title
    Nicht akzeptiert
    prompt
  3. Wenn vocal_mode = instrumental
    Erforderlich
    style, title
    Nicht akzeptiert
    prompt, lyrics, vocal_gender
  4. Wenn model = suno-v4
    Erforderlich
    Nicht akzeptiert
    duration_seconds
  5. Wenn model = suno-v4.5
    Erforderlich
    Nicht akzeptiert
    duration_seconds
  6. Wenn model = suno-v4.5-all
    Erforderlich
    Nicht akzeptiert
    duration_seconds
  7. Wenn model = suno-v4.5-plus
    Erforderlich
    Nicht akzeptiert
    duration_seconds
  8. Wenn model = suno-v5
    Erforderlich
    Nicht akzeptiert
    duration_seconds
04

Annahme erstellen

HTTP 202

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
05

Abfrage wird verarbeitet

HTTP 200

GET /api/v1/suno/text_to_music/:id

Antwort-Schema
JSON
{
  "properties": {
    "audios": {
      "items": {
        "properties": {
          "audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "duration": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "lyrics": {
            "type": "string"
          },
          "model_name": {
            "type": "string"
          },
          "stream_audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "generation_stage": {
      "enum": [
        "text_generated",
        "first_audio_ready"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "generation_stage": "text_generated",
  "id": "tsk_reference_demo",
  "status": "processing"
}
06

Abfrage abgeschlossen

HTTP 200

GET /api/v1/suno/text_to_music/:id

Antwort-Schema
JSON
{
  "properties": {
    "audios": {
      "items": {
        "properties": {
          "audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "duration": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "lyrics": {
            "type": "string"
          },
          "model_name": {
            "type": "string"
          },
          "stream_audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "generation_stage": {
      "enum": [
        "text_generated",
        "first_audio_ready",
        "all_audios_ready",
        "failed"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "audios",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "audios": [
    {
      "audio_url": "https://file.runapi.ai/reference-audio.mp3",
      "id": "audio_reference"
    }
  ],
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "completed"
}
07

Abfrage fehlgeschlagen

HTTP 200

GET /api/v1/suno/text_to_music/:id

Antwort-Schema
JSON
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
08

Kunden-Callback: wird verarbeitet

HTTP 200

POST callback_url

Antwort-Schema
JSON
{
  "properties": {
    "audios": {
      "items": {
        "properties": {
          "audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "duration": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "lyrics": {
            "type": "string"
          },
          "model_name": {
            "type": "string"
          },
          "stream_audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "generation_stage": {
      "enum": [
        "text_generated",
        "first_audio_ready"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "generation_stage": "text_generated",
  "id": "tsk_reference_demo",
  "status": "processing"
}
09

Kunden-Callback: abgeschlossen

HTTP 200

POST callback_url

Antwort-Schema
JSON
{
  "properties": {
    "audios": {
      "items": {
        "properties": {
          "audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "duration": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "lyrics": {
            "type": "string"
          },
          "model_name": {
            "type": "string"
          },
          "stream_audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "generation_stage": {
      "enum": [
        "text_generated",
        "first_audio_ready",
        "all_audios_ready",
        "failed"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "audios"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "audios": [
    {
      "audio_url": "https://file.runapi.ai/reference-audio.mp3",
      "id": "audio_reference"
    }
  ],
  "id": "tsk_reference_demo",
  "status": "completed"
}
10

Kunden-Callback: fehlgeschlagen

HTTP 200

POST callback_url

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "limit_cents": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "reset_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "used_cents": {
              "type": "integer"
            },
            "window": {
              "enum": [
                "1h",
                "1d",
                "7d",
                "daily",
                "weekly",
                "monthly",
                "lifetime"
              ],
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
11

Fehler

HTTP 401

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "Authentication required"
}
12

Fehler

HTTP 401

GET /api/v1/suno/text_to_music/:id

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "Authentication required"
}
13

Fehler

HTTP 400

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Für Menschen lesbare Fehlermeldung.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Menschenlesbare Validierungszusammenfassung.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validierungsmeldungen nach öffentlichem Anforderungsfeld gegliedert, mit einem Array menschenlesbarer Zeichenketten für jedes Feld.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}

Antwortbeispiel

JSON
{
  "error": "Validation failed",
  "errors": {
    "prompt": [
      "is required"
    ]
  }
}
14

Fehler

HTTP 402

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "Insufficient balance"
}
15

Fehler

HTTP 429

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "API key credit limit exceeded"
}
16

Fehler

HTTP 409

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "The request uses features that are not supported for the selected model"
}
17

Fehler

HTTP 429

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "Rate limit reached. Please retry later."
}
18

Fehler

HTTP 503

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "Service under maintenance, please try again later"
}
19

Fehler

HTTP 504

POST /api/v1/suno/text_to_music

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "The request timed out"
}
20

Fehler

HTTP 404

GET /api/v1/suno/text_to_music/:id

Antwort-Schema
JSON
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Antwortbeispiel

JSON
{
  "error": "Task with id 'tsk_reference_demo' not found"
}
21

Generierte Code-Beispiele

Verwende cURL direkt oder installiere ein SDK für deine Programmiersprache. Jedes Beispiel übermittelt die in dieser Referenz gezeigte validierte Anfrage.

Installieren

Shell
pip install runapi-suno
PYTHON
import os
from runapi.suno import SunoClient

client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.text_to_music.create(
  model="suno-v5",
  vocal_mode="auto_lyrics",
  prompt="An uplifting acoustic pop song about a rainy city night.",
  persona_id="persona_reference",
  persona_type="style"
)