JSPM

@ryomak/suno-api

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q20762F
  • License MIT

TypeScript module for Suno AI API

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のセッションID
  • cookie: Sunoのクッキー
  • baseUrl: APIのベースURL(省略可、デフォルト: https://studio-api.suno.ai)# suno-api