Suno Sesten Doğrulama Cümlesine
Asenkron bir Görev oluşturmak için sesten doğrulama ifadesine uç noktasını kullanın.
Genel Bakış
Gerekli girişlerle sesten doğrulama ifadesine uç noktasını kullanın. Durumunu almak için döndürülen Görev Kimliğini kullanın veya aşağıda belgelenen teslimler için callback_url sağlayın.
Hızlı başlangıç
- Bir API anahtarı oluşturun ve RUNAPI_API_KEY olarak ayarlayın.
- Gövdesi istek şemasıyla eşleşen bir POST isteği gönderin.
- Döndürülen görev kimliğini saklayın, ardından bir terminal durumuna ulaşana kadar yoklama yapın ya da aşağıda belgelenen geri çağırmaları işleyin.
Uç Nokta
- Temel URL
https://runapi.ai- API sürümü
v1- Kimlik doğrulama
Authorization: Bearer YOUR_API_TOKEN
Desteklenen modeller
Güncel fiyatlandırma, hız sınırları ve ticari kullanım ayrıntıları için bir model sayfası açın.
İstek şeması
Yalnızca belgelenen alanları gönderin. Sağlandığında, callback_url aşağıda belgelenen Görev teslimlerini alır.
İstek gövdesi5 alan
callback_urlstringAsenkron bildirimler için webhook URL'si.
languagestringDil kodu.
İzin verilen değerler:en, zh, es, fr, pt, de, ja, ko, hi, ru
vocal_end_secondsintegerKaynak vokal segmentinin bitiş zamanı (saniye cinsinden). vocal_start_seconds değerinden büyük olmalıdır.
vocal_start_secondsintegerKaynak vokal bölümünün başlangıç zamanı (saniye cinsinden).
voice_urlstringKaynak ses kaydı URL'si.
Kabul oluştur
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"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
}
Yanıt örneği
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"status": "processing"
}
Yoklama işleniyor
GET /api/v1/suno/voice_to_validation_phrase/:id
Yanıt şeması
{
"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"
},
"provider_status": {
"enum": [
"wait_processing",
"processing_validate"
],
"type": "string"
},
"status": {
"enum": [
"processing"
],
"type": "string"
},
"validation_phrase": {
"type": "string"
}
},
"required": [
"id",
"status",
"provider_status",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"provider_status": "processing_validate",
"status": "processing"
}
Yoklama tamamlandı
GET /api/v1/suno/voice_to_validation_phrase/:id
Yanıt şeması
{
"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"
},
"provider_status": {
"type": "string"
},
"status": {
"enum": [
"completed"
],
"type": "string"
},
"validation_phrase": {
"type": "string"
}
},
"required": [
"id",
"status",
"provider_status",
"validation_phrase",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"provider_status": "wait_validating",
"status": "completed",
"validation_phrase": "Harmonies fill the air with joyful melodies tonight."
}
Yoklama başarısız oldu
GET /api/v1/suno/voice_to_validation_phrase/:id
Yanıt şeması
{
"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
}
Yanıt örneği
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"error": "Task processing failed.",
"id": "tsk_reference_demo",
"status": "failed"
}
Müşteri geri çağırması: tamamlandı
POST callback_url
Yanıt şeması
{
"properties": {
"id": {
"type": "string"
},
"provider_status": {
"type": "string"
},
"status": {
"enum": [
"completed"
],
"type": "string"
},
"validation_phrase": {
"type": "string"
}
},
"required": [
"id",
"status",
"provider_status",
"validation_phrase"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"id": "tsk_reference_demo",
"provider_status": "wait_validating",
"status": "completed",
"validation_phrase": "Harmonies fill the air with joyful melodies tonight."
}
Müşteri geri çağırması: başarısız oldu
POST callback_url
Yanıt şeması
{
"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
}
Yanıt örneği
{
"error": {
"code": "generation_failed",
"message": "Task processing failed."
},
"id": "tsk_reference_demo",
"status": "failed"
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "Authentication required"
}
Hatalar
GET /api/v1/suno/voice_to_validation_phrase/:id
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "Authentication required"
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"oneOf": [
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
},
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir doğrulama özeti.",
"type": "string"
},
"errors": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "Herkese açık istek alanına göre anahtarlanan doğrulama mesajları; her alan için insan tarafından okunabilir dizelerden oluşan bir dizi içerir.",
"type": "object"
}
},
"required": [
"error",
"errors"
],
"type": "object",
"unevaluatedProperties": false
}
]
}
Yanıt örneği
{
"error": "Validation failed",
"errors": {
"voice_url": [
"is required"
]
}
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "Insufficient balance"
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "API key credit limit exceeded"
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "The request uses features that are not supported for the selected model"
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "Rate limit reached. Please retry later."
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "Service under maintenance, please try again later"
}
Hatalar
POST /api/v1/suno/voice_to_validation_phrase
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "The request timed out"
}
Hatalar
GET /api/v1/suno/voice_to_validation_phrase/:id
Yanıt şeması
{
"properties": {
"error": {
"description": "İnsan tarafından okunabilir hata mesajı.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Yanıt örneği
{
"error": "Task with id 'tsk_reference_demo' not found"
}
Oluşturulan Kod Örnekleri
Doğrudan cURL kullanın veya diliniz için bir SDK yükleyin. Her örnek, bu başvuruda gösterilen doğrulanmış isteği gönderir.
Yükle
pip install runapi-suno
import os
from runapi.suno import SunoClient
client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.voice_to_validation_phrase.create(
voice_url="https://file.runapi.ai/source-vocal.mp3",
vocal_start_seconds=2,
vocal_end_seconds=12,
language="en"
)