runapi-suno 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38f1f7c4c8dfc3ae057f27b46e3a12fb9ef1dabc21f2e7326b5bbfd264c02a5a
4
- data.tar.gz: b09ce08b5734ad22f5cc68c6339e3ec68d21d7c0530228c9b25261224f9f08c8
3
+ metadata.gz: 0dd793483d6ace66eaf84f7f4e28a88642782e620169c4c7a442a71f36e6f9a4
4
+ data.tar.gz: a50038bc7efa5ff36f1f490eb1630c0d094dbce6ad13469ed765451aa710c2d1
5
5
  SHA512:
6
- metadata.gz: 58d85f17b750573729801b93041b729d2ba27c994cbb1d67f6066eded3624527fb0bb5aa3b2106dc06a735148849de209016b4bc577859b00592451c1d4b969c
7
- data.tar.gz: 135b5ab665b08462083d1dce9c6a35f65ec1ac10e011f132e347f7ca905cd66a859c99101babdb70be702fc1644316735653105b891058c7f4692afec3cd8ea7
6
+ metadata.gz: 460bb0e80a4d86ec69eab534b8d28e9a257186f860c2cc92afb5a910a34082bbdf408fc5e07829a5bc6c2334cbe4daf9a3d7f334937a2ea12d044f6f40542f0d
7
+ data.tar.gz: dba87b509ef5f8a088176775925c720852c277c18d76009be43a490de2bd0ece54611381d462b3697cb6db298d1919f1cba54c3f0be24e20ce65b8ec313986ba
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Suno Ruby SDK is the language-specific package for Suno on RunAPI. Use this package for song generation, lyrics, vocals, extension, and audio transformation workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Ruby.
4
4
 
5
- This README is the Ruby package guide inside the public `suno-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/suno; for API reference, use https://runapi.ai/docs#suno; for SDK docs, use https://runapi.ai/docs#sdk-suno.
5
+ This README is the Ruby package guide inside the public `suno-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/suno; for API reference, use https://runapi.ai/docs/api/suno/text-to-music; for SDK docs, use https://runapi.ai/docs/resources/sdks.
6
6
 
7
7
  ## Install
8
8
 
@@ -17,7 +17,7 @@ require "runapi/suno"
17
17
 
18
18
  client = RunApi::Suno::Client.new
19
19
  task = client.text_to_music.create(
20
- # Pass the Suno JSON request body from https://runapi.ai/docs#suno.
20
+ # Pass the Suno JSON request body from https://runapi.ai/docs/api/suno/text-to-music.
21
21
  )
22
22
  status = client.text_to_music.get(task.id)
23
23
  ```
@@ -33,8 +33,8 @@ Use Ruby keyword arguments and the `RunApi::Suno` error classes when building mu
33
33
  ## Links
34
34
 
35
35
  - Model page: https://runapi.ai/models/suno
36
- - SDK docs: https://runapi.ai/docs#sdk-suno
37
- - Product docs: https://runapi.ai/docs#suno
36
+ - SDK docs: https://runapi.ai/docs/resources/sdks
37
+ - Product docs: https://runapi.ai/docs/api/suno/text-to-music
38
38
  - Pricing and rate limits: https://runapi.ai/models/suno/v4
39
39
  - Provider comparison: https://runapi.ai/providers/suno
40
40
  - Full catalog: https://runapi.ai/models
@@ -16,6 +16,7 @@ module RunApi
16
16
  attr_reader :text_to_music
17
17
  # @return [Resources::ExtendMusic] continues an existing track from a specified timestamp
18
18
  attr_reader :extend_music
19
+ attr_reader :stitch_audio, :remaster_audio, :add_samples
19
20
  # @return [Resources::GenerateArtwork] creates cover artwork for an existing music task
20
21
  attr_reader :generate_artwork
21
22
  # @return [Resources::CoverAudio] re-records vocals over an uploaded audio file with a new style or voice
@@ -62,6 +63,9 @@ module RunApi
62
63
 
63
64
  @text_to_music = Resources::TextToMusic.new(http)
64
65
  @extend_music = Resources::ExtendMusic.new(http)
66
+ @stitch_audio = Resources::StitchAudio.new(http)
67
+ @remaster_audio = Resources::RemasterAudio.new(http)
68
+ @add_samples = Resources::AddSamples.new(http)
65
69
  @generate_artwork = Resources::GenerateArtwork.new(http)
66
70
  @cover_audio = Resources::CoverAudio.new(http)
67
71
  @add_instrumental = Resources::AddInstrumental.new(http)
@@ -68,6 +68,91 @@ module RunApi
68
68
  }
69
69
  }
70
70
  },
71
+ "add-samples" => {
72
+ "models" => ["suno-v4", "suno-v4.5", "suno-v4.5-plus", "suno-v5", "suno-v5.5"],
73
+ "fields_by_model" => {
74
+ "suno-v4" => {
75
+ "audio_url" => {
76
+ "required" => true
77
+ },
78
+ "end_seconds" => {
79
+ "required" => true,
80
+ "min" => 0
81
+ },
82
+ "model" => {
83
+ "required" => true
84
+ },
85
+ "start_seconds" => {
86
+ "required" => true,
87
+ "min" => 0
88
+ }
89
+ },
90
+ "suno-v4.5" => {
91
+ "audio_url" => {
92
+ "required" => true
93
+ },
94
+ "end_seconds" => {
95
+ "required" => true,
96
+ "min" => 0
97
+ },
98
+ "model" => {
99
+ "required" => true
100
+ },
101
+ "start_seconds" => {
102
+ "required" => true,
103
+ "min" => 0
104
+ }
105
+ },
106
+ "suno-v4.5-plus" => {
107
+ "audio_url" => {
108
+ "required" => true
109
+ },
110
+ "end_seconds" => {
111
+ "required" => true,
112
+ "min" => 0
113
+ },
114
+ "model" => {
115
+ "required" => true
116
+ },
117
+ "start_seconds" => {
118
+ "required" => true,
119
+ "min" => 0
120
+ }
121
+ },
122
+ "suno-v5" => {
123
+ "audio_url" => {
124
+ "required" => true
125
+ },
126
+ "end_seconds" => {
127
+ "required" => true,
128
+ "min" => 0
129
+ },
130
+ "model" => {
131
+ "required" => true
132
+ },
133
+ "start_seconds" => {
134
+ "required" => true,
135
+ "min" => 0
136
+ }
137
+ },
138
+ "suno-v5.5" => {
139
+ "audio_url" => {
140
+ "required" => true
141
+ },
142
+ "end_seconds" => {
143
+ "required" => true,
144
+ "min" => 0
145
+ },
146
+ "model" => {
147
+ "required" => true
148
+ },
149
+ "start_seconds" => {
150
+ "required" => true,
151
+ "min" => 0
152
+ }
153
+ }
154
+ }
155
+ },
71
156
  "add-vocals" => {
72
157
  "models" => ["suno-v4.5-plus", "suno-v5"],
73
158
  "fields_by_model" => {
@@ -624,6 +709,66 @@ module RunApi
624
709
  }
625
710
  }
626
711
  },
712
+ "remaster-audio" => {
713
+ "models" => ["suno-v4", "suno-v4.5", "suno-v4.5-plus", "suno-v5", "suno-v5.5"],
714
+ "fields_by_model" => {
715
+ "suno-v4" => {
716
+ "audio_id" => {
717
+ "required" => true
718
+ },
719
+ "model" => {
720
+ "required" => true
721
+ },
722
+ "source_task_id" => {
723
+ "required" => true
724
+ }
725
+ },
726
+ "suno-v4.5" => {
727
+ "audio_id" => {
728
+ "required" => true
729
+ },
730
+ "model" => {
731
+ "required" => true
732
+ },
733
+ "source_task_id" => {
734
+ "required" => true
735
+ }
736
+ },
737
+ "suno-v4.5-plus" => {
738
+ "audio_id" => {
739
+ "required" => true
740
+ },
741
+ "model" => {
742
+ "required" => true
743
+ },
744
+ "source_task_id" => {
745
+ "required" => true
746
+ }
747
+ },
748
+ "suno-v5" => {
749
+ "audio_id" => {
750
+ "required" => true
751
+ },
752
+ "model" => {
753
+ "required" => true
754
+ },
755
+ "source_task_id" => {
756
+ "required" => true
757
+ }
758
+ },
759
+ "suno-v5.5" => {
760
+ "audio_id" => {
761
+ "required" => true
762
+ },
763
+ "model" => {
764
+ "required" => true
765
+ },
766
+ "source_task_id" => {
767
+ "required" => true
768
+ }
769
+ }
770
+ }
771
+ },
627
772
  "replace-section" => {
628
773
  "models" => [],
629
774
  "fields_by_model" => {
@@ -677,6 +822,66 @@ module RunApi
677
822
  "required" => ["stem_name"]
678
823
  }]
679
824
  },
825
+ "stitch-audio" => {
826
+ "models" => ["suno-v4", "suno-v4.5", "suno-v4.5-plus", "suno-v5", "suno-v5.5"],
827
+ "fields_by_model" => {
828
+ "suno-v4" => {
829
+ "audio_id" => {
830
+ "required" => true
831
+ },
832
+ "model" => {
833
+ "required" => true
834
+ },
835
+ "source_task_id" => {
836
+ "required" => true
837
+ }
838
+ },
839
+ "suno-v4.5" => {
840
+ "audio_id" => {
841
+ "required" => true
842
+ },
843
+ "model" => {
844
+ "required" => true
845
+ },
846
+ "source_task_id" => {
847
+ "required" => true
848
+ }
849
+ },
850
+ "suno-v4.5-plus" => {
851
+ "audio_id" => {
852
+ "required" => true
853
+ },
854
+ "model" => {
855
+ "required" => true
856
+ },
857
+ "source_task_id" => {
858
+ "required" => true
859
+ }
860
+ },
861
+ "suno-v5" => {
862
+ "audio_id" => {
863
+ "required" => true
864
+ },
865
+ "model" => {
866
+ "required" => true
867
+ },
868
+ "source_task_id" => {
869
+ "required" => true
870
+ }
871
+ },
872
+ "suno-v5.5" => {
873
+ "audio_id" => {
874
+ "required" => true
875
+ },
876
+ "model" => {
877
+ "required" => true
878
+ },
879
+ "source_task_id" => {
880
+ "required" => true
881
+ }
882
+ }
883
+ }
884
+ },
680
885
  "text-to-music" => {
681
886
  "models" => ["suno-v4", "suno-v4.5", "suno-v4.5-all", "suno-v4.5-plus", "suno-v5", "suno-v5.5"],
682
887
  "fields_by_model" => {
@@ -0,0 +1,18 @@
1
+ module RunApi
2
+ module Suno
3
+ module Resources
4
+ class AddSamples < AudioAction
5
+ ENDPOINT = "/api/v1/suno/add_samples"
6
+ ACTION = "add-samples"
7
+
8
+ def create(options: nil, **params)
9
+ if params[:end_seconds].to_f <= params[:start_seconds].to_f
10
+ raise RunApi::Core::ValidationError, "end_seconds must be greater than start_seconds"
11
+ end
12
+
13
+ super
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RunApi
4
+ module Suno
5
+ module Resources
6
+ class AudioAction
7
+ include RunApi::Core::ResourceHelpers
8
+
9
+ def initialize(http) = @http = http
10
+
11
+ def create(options: nil, **params)
12
+ params = compact_params(params)
13
+ validate_contract!(CONTRACT.fetch(self.class::ACTION), params)
14
+ request(:post, self.class::ENDPOINT, body: params, options: options)
15
+ end
16
+
17
+ def get(id, options: nil) = request(:get, "#{self.class::ENDPOINT}/#{id}", options: options)
18
+
19
+ def run(options: nil, **params)
20
+ task = create(options: options, **params)
21
+ poll_until_complete { get(task.id, options: options) }
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,11 @@
1
+ module RunApi
2
+ module Suno
3
+ module Resources
4
+ class RemasterAudio < AudioAction
5
+ ENDPOINT = "/api/v1/suno/remaster_audio"
6
+ ACTION = "remaster-audio"
7
+ def create(options: nil, **params) = super
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module RunApi
2
+ module Suno
3
+ module Resources
4
+ class StitchAudio < AudioAction
5
+ ENDPOINT = "/api/v1/suno/stitch_audio"
6
+ ACTION = "stitch-audio"
7
+ def create(options: nil, **params) = super
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/runapi/suno.rb CHANGED
@@ -6,6 +6,10 @@ require_relative "suno/contract_gen"
6
6
  require_relative "suno/validators"
7
7
  require_relative "suno/resources/text_to_music"
8
8
  require_relative "suno/resources/extend_music"
9
+ require_relative "suno/resources/audio_action"
10
+ require_relative "suno/resources/stitch_audio"
11
+ require_relative "suno/resources/remaster_audio"
12
+ require_relative "suno/resources/add_samples"
9
13
  require_relative "suno/resources/generate_artwork"
10
14
  require_relative "suno/resources/cover_audio"
11
15
  require_relative "suno/resources/add_instrumental"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-suno
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.3.0
18
+ version: 0.3.2
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.3.0
25
+ version: 0.3.2
26
26
  description: The Suno Ruby SDK is the language-specific package for Suno on RunAPI.
27
27
  Use this package for song generation, lyrics, vocals, extension, and audio transformation
28
28
  workflows when your application needs request bodies, task status lookup, and consistent
@@ -41,7 +41,9 @@ files:
41
41
  - lib/runapi/suno/client.rb
42
42
  - lib/runapi/suno/contract_gen.rb
43
43
  - lib/runapi/suno/resources/add_instrumental.rb
44
+ - lib/runapi/suno/resources/add_samples.rb
44
45
  - lib/runapi/suno/resources/add_vocals.rb
46
+ - lib/runapi/suno/resources/audio_action.rb
45
47
  - lib/runapi/suno/resources/blend_lyrics.rb
46
48
  - lib/runapi/suno/resources/boost_style.rb
47
49
  - lib/runapi/suno/resources/check_voice.rb
@@ -56,8 +58,10 @@ files:
56
58
  - lib/runapi/suno/resources/generate_voice.rb
57
59
  - lib/runapi/suno/resources/get_timestamped_lyrics.rb
58
60
  - lib/runapi/suno/resources/regenerate_validation_phrase.rb
61
+ - lib/runapi/suno/resources/remaster_audio.rb
59
62
  - lib/runapi/suno/resources/replace_section.rb
60
63
  - lib/runapi/suno/resources/separate_audio_stems.rb
64
+ - lib/runapi/suno/resources/stitch_audio.rb
61
65
  - lib/runapi/suno/resources/text_to_music.rb
62
66
  - lib/runapi/suno/resources/text_to_sound.rb
63
67
  - lib/runapi/suno/resources/visualize_music.rb
@@ -88,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
92
  - !ruby/object:Gem::Version
89
93
  version: '0'
90
94
  requirements: []
91
- rubygems_version: 4.0.17
95
+ rubygems_version: 4.0.10
92
96
  specification_version: 4
93
97
  summary: Suno API Ruby SDK for RunAPI
94
98
  test_files: []