API di Singing Pet
Singing Pet ha una API REST. I template delle canzoni e i prezzi sono aperti a chiunque. Tutto ciò che tocca i video, i crediti o i pagamenti di una persona richiede un ID token Firebase.
Specifica OpenAPI
La descrizione leggibile dalle macchine dell'intera API, con un operation id unico, parametri tipizzati e uno schema di risposta per ogni endpoint. Puntaci direttamente un generatore di client o il loader di function calling del tuo agente.
Guarda la specifica OpenAPIhttps://singing.pet/openapi.json
Autenticazione
Invia un ID token di Firebase Authentication come bearer token. Accedere con Google o con un link via email su questo sito ne genera uno. Gli endpoint indicati come pubblici non hanno bisogno di alcun header.
Endpoint
https://api.singing.pet
| GET | / | getServiceIndex | Pubblico |
| GET | /openapi.json | getOpenApiSpec | Pubblico |
| GET | /health | getHealth | Pubblico |
| GET | /templates | listTemplates | Pubblico |
| GET | /subscription/pricing | getPricing | Pubblico |
| GET | /user/me | getCurrentUser | Token |
| GET | /user/videos | listUserVideos | Token |
| POST | /create-with-template | createVideoFromTemplate | Token |
| POST | /create-with-audio | createVideoFromAudio | Token |
| DELETE | /delete-video | deleteVideo | Token |
| GET | /tts/voices | listVoices | Token |
| POST | /tts | generateSpeech | Token |
| POST | /tiktok/extract-audio | extractTikTokAudio | Token |
| GET | /subscription/status | getSubscriptionStatus | Token |
| POST | /subscription/create-checkout-session | createCheckoutSession | Token |
| POST | /subscription/create-one-time-checkout | createOneTimeCheckout | Token |
| POST | /subscription/create-portal-session | createPortalSession | Token |
| GET | /versions | listApiVersions | Pubblico |
| GET | /v1/templates | listApiTemplates | Token |
| GET | /v1/me | getApiAccount | Token |
| GET | /v1/credits | getApiCredits | Token |
| GET | /v1/videos | listApiVideos | Token |
| POST | /v1/videos | createApiVideo | Token |
| GET | /v1/videos/{id} | getApiVideo | Token |
| DELETE | /v1/videos/{id} | deleteApiVideo | Token |
| POST | /mcp | callMcpServer | Token |
Richiesta di esempio
curl https://api.singing.pet/templates
curl https://api.singing.pet/user/videos?page=1 \
-H "Authorization: Bearer $FIREBASE_ID_TOKEN"Errori
Ogni errore torna in JSON. Quello che nessun endpoint gestisce in modo specifico usa un'unica busta con un codice stabile, un messaggio leggibile e un suggerimento su cosa fare.
{
"error": {
"code": "not_found",
"message": "No route matches GET /nope",
"status": 404,
"hint": "Check the path against https://singing.pet/openapi.json.",
"documentation_url": "https://singing.pet/developers"
},
"message": "No route matches GET /nope"
}Il rendering è asincrono
Una chiamata di creazione risponde appena il rendering entra in coda. Interroga listUserVideos finché lo stato non passa da pending a completed o failed, oppure ascolta il websocket su wss://api.singing.pet.
Limiti
L'audio deve durare tra 2 e 30 secondi e il video dura esattamente quanto l'audio. Il text-to-speech accetta fino a 500 caratteri. Gli account gratuiti hanno due video al mese, i piani a pagamento sono illimitati.
Markdown per gli agenti
Ogni pagina di contenuto di questo sito serve Markdown pulito se lo chiedi con un header Accept, seguendo acceptmarkdown.com. L'indice del sito scritto a mano sta in llms.txt.