Package Exports
- @ryomak/suno-api
- @ryomak/suno-api/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ryomak/suno-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Suno AI TypeScript Module
SunoAIを利用するためのTypeScriptモジュールです。
インストール
npm install使用方法
import { SunoClient } from './src';
const client = new SunoClient({
sessionId: 'your_session_id',
cookie: 'your_cookie'
});
// 曲一覧を取得
const songs = await client.getSongs();
// いいねした曲の一覧を取得
const likedSongs = await client.getLikedSongs();
// 曲を作成
const newSong = await client.createSong({
prompt: 'A happy song about sunshine',
make_instrumental: false,
wait_audio: true
});
// 曲にいいね
await client.likeSong('song_id');
// いいねを取り消し
await client.unlikeSong('song_id');API機能
getSongs(): 曲一覧取得getLikedSongs(): いいねした曲の一覧取得createSong(): 曲作成likeSong(): いいね処理unlikeSong(): いいね取り消しgetSongById(): ID指定で曲取得
設定
SunoClientのコンストラクタには以下の設定が必要です:
sessionId: SunoのセッションIDcookie: SunoのクッキーbaseUrl: APIのベースURL(省略可、デフォルト: https://studio-api.suno.ai)# suno-api