Singing Pet API
Singing Pet には REST API があります。曲テンプレートと価格は誰でも取得できます。ユーザーの動画・クレジット・請求に関わるものはすべて Firebase の ID トークンが必要です。
OpenAPI 仕様
API 全体の機械可読な定義です。すべてのエンドポイントに一意の operation id、型付きパラメータ、レスポンススキーマがあります。クライアント生成ツールやエージェントの function calling ローダーをそのまま向けられます。
OpenAPI 仕様を見るhttps://singing.pet/openapi.json
認証
Firebase Authentication の ID トークンをベアラートークンとして送ります。このサイトで Google またはメールリンクでサインインすると発行されます。公開と記載されたエンドポイントにはヘッダーは不要です。
エンドポイント
https://api.singing.pet
| GET | / | getServiceIndex | 公開 |
| GET | /openapi.json | getOpenApiSpec | 公開 |
| GET | /health | getHealth | 公開 |
| GET | /templates | listTemplates | 公開 |
| GET | /subscription/pricing | getPricing | 公開 |
| GET | /user/me | getCurrentUser | トークン |
| GET | /user/videos | listUserVideos | トークン |
| DELETE | /user | deleteAccount | トークン |
| POST | /create-with-template | createVideoFromTemplate | トークン |
| POST | /create-with-audio | createVideoFromAudio | トークン |
| DELETE | /delete-video | deleteVideo | トークン |
| GET | /tts/voices | listVoices | トークン |
| POST | /tts | generateSpeech | トークン |
| POST | /tiktok/extract-audio | extractTikTokAudio | トークン |
| GET | /subscription/status | getSubscriptionStatus | トークン |
| POST | /subscription/create-checkout-session | createCheckoutSession | トークン |
| POST | /subscription/create-one-time-checkout | createOneTimeCheckout | トークン |
| POST | /subscription/create-portal-session | createPortalSession | トークン |
| GET | /versions | listApiVersions | 公開 |
| GET | /v1/templates | listApiTemplates | トークン |
| GET | /v1/me | getApiAccount | トークン |
| GET | /v1/credits | getApiCredits | トークン |
| GET | /v1/videos | listApiVideos | トークン |
| POST | /v1/videos | createApiVideo | トークン |
| GET | /v1/videos/{id} | getApiVideo | トークン |
| DELETE | /v1/videos/{id} | deleteApiVideo | トークン |
| POST | /v1/songs | createApiSong | トークン |
| GET | /v1/songs/{id} | getApiSong | トークン |
| POST | /mcp | callMcpServer | トークン |
リクエスト例
curl https://api.singing.pet/templates
curl https://api.singing.pet/user/videos?page=1 \
-H "Authorization: Bearer $FIREBASE_ID_TOKEN"エラー
失敗はすべて JSON で返ります。個別のエンドポイントが処理しないものは、安定したコード、読めるメッセージ、次に何をすべきかのヒントを含む共通の形式を使います。
{
"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"
}ペットの歌
POST /v1/songs は、ペットの写真と少しの情報からオリジナルソングを作ります。歌詞、録音した曲、ペットが歌う無料プレビューです。GET /v1/songs/:id をポーリングしてください。プレビューができると、HD動画とシェア用のギフトページを購入できる決済リンクが付きます。payment: "credits" を送れば、100クレジット(Standard)または200クレジット(Deluxe)を使ってすぐにレンダリングします。
クレジット
キー作成時のクレジットは0です。APIキーページでパックを購入してください(10クレジットで$54.99、50クレジットで$269、250クレジットで$1,299)。購入したクレジットで支払われた動画には透かしは入りません。キーは singing.pet/dashboard/api-keys で作成できます。
レンダリングは非同期です
作成 API はレンダリングがキューに入った時点で返ります。listUserVideos をポーリングして status が pending から completed または failed に変わるのを待つか、wss://api.singing.pet の WebSocket を購読してください。
制限
音声は2秒から30秒の間である必要があり、動画の長さは音声と完全に一致します。テキスト読み上げは最大500文字までです。無料動画はありません。週単位プランには週10本、年単位プランには月5本、7日間のトライアルには3本が含まれます。
エージェント向けの Markdown
このサイトのコンテンツページは、acceptmarkdown.com に従って Accept ヘッダーで要求すると、きれいな Markdown を返します。手書きのサイト索引は llms.txt にあります。