Naar inhoud springen
API-referentie
API-referentie

Suno stijl versterken

Gebruik het boost style-eindpunt om een resultaat in hetzelfde antwoord te ontvangen.

01

Overzicht

Gebruik het boost style-eindpunt en lees het resultaat uit hetzelfde antwoord.

Snelstart

  1. Maak een API-sleutel aan en stel deze in als RUNAPI_API_KEY.
  2. Stuur een POST-verzoek waarvan de body overeenkomt met het verzoekschema.
  3. Lees het resultaat uit de body van de geslaagde respons.

Eindpunt

POST /api/v1/suno/boost_style
Basis-URL
https://runapi.ai
API-versie
v1
Authenticatie
Authorization: Bearer YOUR_API_TOKEN
02

Ondersteunde modellen

Open een modelpagina voor actuele prijzen, snelheidslimieten en details over commercieel gebruik.

03

Verzoekschema

JSON-body

Stuur alleen de velden die voor dit eindpunt zijn gedeclareerd.

Verzoekbody1 veld
descriptionstring
Verplicht

Stijlbeschrijving om uit te breiden naar genre-tags.

04

Succesvol antwoord

HTTP 200

POST /api/v1/suno/boost_style

Responsschema
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
    },
    "style": {
      "type": "string"
    }
  },
  "required": [
    "style",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

JSON
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "style": "electronic pop, dance, upbeat"
}
05

Fouten

HTTP 401

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Fouten

HTTP 400

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Leesbare foutmelding.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Leesbare validatiesamenvatting.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validatieberichten gekoppeld aan het openbare aanvraagveld, met een reeks leesbare tekenreeksen per veld.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}

Responsvoorbeeld

JSON
{
  "error": "Validation failed",
  "errors": {
    "description": [
      "is required"
    ]
  }
}
07

Fouten

HTTP 402

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Fouten

HTTP 429

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Fouten

HTTP 409

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Fouten

HTTP 429

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Fouten

HTTP 503

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Fouten

HTTP 504

POST /api/v1/suno/boost_style

Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

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

Gegenereerde codevoorbeelden

Gebruik cURL rechtstreeks, of installeer een SDK voor uw taal. Elk voorbeeld dient het gevalideerde verzoek in dat in deze referentie wordt getoond.

Installeren

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

client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
result = client.boost_style.run(
  description="An upbeat pop track with electronic beats."
)