Skip to content

Commit 159271e

Browse files
Merge pull request #5 from beatsfoundation/release-please--branches--main--changes--next
release: 0.1.0-alpha.1
2 parents 5fdfc6f + eb8a60d commit 159271e

15 files changed

+115
-53
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.1-alpha.1"
2+
".": "0.1.0-alpha.1"
33
}

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 3
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beats-ai-beatsfoundation%2Fbeats-foundation-f711efcd99b00b3dc26c741770eecb8c17dc76bac1372c192aa232b4aae417e9.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beats-ai-beatsfoundation%2Fbeats-foundation-9e8f99d19503143b44d679b3743fc6791e0f6ece45048c58926ed10376d78af5.yml

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 0.1.0-alpha.1 (2025-01-14)
4+
5+
Full Changelog: [v0.0.1-alpha.1...v0.1.0-alpha.1](https://github.com/beatsfoundation/beats-foundation-sdk/compare/v0.0.1-alpha.1...v0.1.0-alpha.1)
6+
7+
### Features
8+
9+
* **api:** api update ([#8](https://github.com/beatsfoundation/beats-foundation-sdk/issues/8)) ([abe66f1](https://github.com/beatsfoundation/beats-foundation-sdk/commit/abe66f1a8d13dc74b713c81c26d824819b2ca0ac))
10+
* **api:** api update ([#9](https://github.com/beatsfoundation/beats-foundation-sdk/issues/9)) ([126444e](https://github.com/beatsfoundation/beats-foundation-sdk/commit/126444eb9473a7c1da054741c7f9aa658cb30dbd))
11+
* **api:** update via SDK Studio ([#6](https://github.com/beatsfoundation/beats-foundation-sdk/issues/6)) ([94dcca5](https://github.com/beatsfoundation/beats-foundation-sdk/commit/94dcca579b38b9c238093de3617f425934432f44))
12+
13+
14+
### Chores
15+
16+
* remove custom code ([7cef31e](https://github.com/beatsfoundation/beats-foundation-sdk/commit/7cef31ea40ff84ec06b17bf92d487e9c011557ec))
17+
* update SDK settings ([#10](https://github.com/beatsfoundation/beats-foundation-sdk/issues/10)) ([8e3d6b5](https://github.com/beatsfoundation/beats-foundation-sdk/commit/8e3d6b51086c021cf77aee85ba8b79794dfa1ae0))
18+
319
## 0.0.1-alpha.1 (2025-01-13)
420

521
Full Changelog: [v0.0.1-alpha.0...v0.0.1-alpha.1](https://github.com/beatsfoundation/beats-foundation-sdk/compare/v0.0.1-alpha.0...v0.0.1-alpha.1)

README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
1-
# AI Creation Engine SDK, by the BEATS AI Foundation
1+
# Beats Foundation Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/beats_foundation.svg)](https://pypi.org/project/beats_foundation/)
3+
[![PyPI version](https://img.shields.io/pypi/v/beats-foundation.svg)](https://pypi.org/project/beats-foundation/)
44

5-
The AI Creation Engine SDK, by the BEATS AI Foundation, provides convenient access to the AI Creation Engine REST API from any Python 3.8+
5+
The Beats Foundation Python library provides convenient access to the Beats Foundation REST API from any Python 3.8+
66
application. The library includes type definitions for all request params and response fields,
77
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
88

99
It is generated with [Stainless](https://www.stainlessapi.com/).
1010

1111
## Documentation
1212

13-
The REST API documentation can be found on [docs.beats-foundation.com](https://docs.beats-foundation.com). The full API of this library can be found in [api.md](api.md).
13+
The REST API documentation can be found on [docs.beatsfoundation.com](https://docs.beatsfoundation.com). The full API of this library can be found in [api.md](api.md).
1414

1515
## Installation
1616

1717
```sh
1818
# install from PyPI
19-
pip install --pre beats_foundation
19+
pip install --pre beats-foundation
2020
```
2121

2222
## Usage
2323

2424
The full API of this library can be found in [api.md](api.md).
2525

2626
```python
27+
import os
2728
from beats_foundation import BeatsFoundation
2829

29-
client = BeatsFoundation()
30+
client = BeatsFoundation(
31+
bearer_token=os.environ.get(
32+
"BEATSFOUNDATION_BEARER_TOKEN"
33+
), # This is the default and can be omitted
34+
)
3035

3136
song = client.songs.retrieve(
3237
"REPLACE_ME",
@@ -44,10 +49,15 @@ so that your Bearer Token is not stored in source control.
4449
Simply import `AsyncBeatsFoundation` instead of `BeatsFoundation` and use `await` with each API call:
4550

4651
```python
52+
import os
4753
import asyncio
4854
from beats_foundation import AsyncBeatsFoundation
4955

50-
client = AsyncBeatsFoundation()
56+
client = AsyncBeatsFoundation(
57+
bearer_token=os.environ.get(
58+
"BEATSFOUNDATION_BEARER_TOKEN"
59+
), # This is the default and can be omitted
60+
)
5161

5262

5363
async def main() -> None:

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or products provided by Beats Foundation please follow the respective company's
2020

2121
### Beats Foundation Terms and Policies
2222

23-
Please contact dev-feedback@beats-foundation.com for any questions or concerns regarding security of our services.
23+
Please contact dev-feedback@beatsfoundation.com for any questions or concerns regarding security of our services.
2424

2525
---
2626

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ from beats_foundation.types import Song, SongCreateResponse, SongListResponse
88

99
Methods:
1010

11-
- <code title="post /api/songs">client.songs.<a href="./src/beats_foundation/resources/songs.py">create</a>(\*\*<a href="src/beats_foundation/types/song_create_params.py">params</a>) -> <a href="./src/beats_foundation/types/song_create_response.py">object</a></code>
11+
- <code title="post /api/songs">client.songs.<a href="./src/beats_foundation/resources/songs.py">create</a>(\*\*<a href="src/beats_foundation/types/song_create_params.py">params</a>) -> <a href="./src/beats_foundation/types/song_create_response.py">SongCreateResponse</a></code>
1212
- <code title="get /api/songs/{id}">client.songs.<a href="./src/beats_foundation/resources/songs.py">retrieve</a>(id) -> <a href="./src/beats_foundation/types/song.py">Song</a></code>
1313
- <code title="get /api/songs">client.songs.<a href="./src/beats_foundation/resources/songs.py">list</a>(\*\*<a href="src/beats_foundation/types/song_list_params.py">params</a>) -> <a href="./src/beats_foundation/types/song_list_response.py">SongListResponse</a></code>

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
2-
name = "beats_foundation"
3-
version = "0.0.1-alpha.1"
2+
name = "beats-foundation"
3+
version = "0.1.0-alpha.1"
44
description = "The official Python library for the beats-foundation API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
8-
{ name = "Beats Foundation", email = "dev-feedback@beats-foundation.com" },
8+
{ name = "Beats Foundation", email = "dev-feedback@beatsfoundation.com" },
99
]
1010
dependencies = [
1111
"httpx>=0.23.0, <1",

src/beats_foundation/_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
if base_url is None:
9292
base_url = os.environ.get("BEATS_FOUNDATION_BASE_URL")
9393
if base_url is None:
94-
base_url = f"https://www.beatsfoundation.com/api"
94+
base_url = f"https://www.beatsfoundation.com"
9595

9696
super().__init__(
9797
version=__version__,
@@ -259,7 +259,7 @@ def __init__(
259259
if base_url is None:
260260
base_url = os.environ.get("BEATS_FOUNDATION_BASE_URL")
261261
if base_url is None:
262-
base_url = f"https://www.beatsfoundation.com/api"
262+
base_url = f"https://www.beatsfoundation.com"
263263

264264
super().__init__(
265265
version=__version__,

src/beats_foundation/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "beats_foundation"
4-
__version__ = "0.0.1-alpha.1" # x-release-please-version
4+
__version__ = "0.1.0-alpha.1" # x-release-please-version

src/beats_foundation/resources/songs.py

+15-18
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ..types.song import Song
2222
from .._base_client import make_request_options
2323
from ..types.song_list_response import SongListResponse
24+
from ..types.song_create_response import SongCreateResponse
2425

2526
__all__ = ["SongsResource", "AsyncSongsResource"]
2627

@@ -49,7 +50,6 @@ def create(
4950
self,
5051
*,
5152
prompt: str,
52-
creator_wallet_address: str | NotGiven = NOT_GIVEN,
5353
genre: str | NotGiven = NOT_GIVEN,
5454
is_instrumental: bool | NotGiven = NOT_GIVEN,
5555
lyrics: str | NotGiven = NOT_GIVEN,
@@ -60,22 +60,22 @@ def create(
6060
extra_query: Query | None = None,
6161
extra_body: Body | None = None,
6262
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
63-
) -> object:
63+
) -> SongCreateResponse:
6464
"""Generate a new AI song based on provided parameters.
6565
6666
Rate limited to 2 calls per
6767
hour per API key.
6868
6969
Args:
70-
prompt: Text prompt for song generation
71-
72-
creator_wallet_address: Wallet address of the creator
70+
prompt: Text prompt for song generation (max 200 characters)
7371
7472
genre: Musical genre
7573
76-
is_instrumental: Whether the song should be instrumental
74+
is_instrumental: Whether the song should be instrumental. If the song is instrumental, the lyrics
75+
will be ignored.
7776
78-
lyrics: Optional lyrics for the song
77+
lyrics: Optional lyrics for the song. If not provided, the prompt will be used to
78+
generate lyrics.
7979
8080
mood: Mood of the song
8181
@@ -92,7 +92,6 @@ def create(
9292
body=maybe_transform(
9393
{
9494
"prompt": prompt,
95-
"creator_wallet_address": creator_wallet_address,
9695
"genre": genre,
9796
"is_instrumental": is_instrumental,
9897
"lyrics": lyrics,
@@ -103,7 +102,7 @@ def create(
103102
options=make_request_options(
104103
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
105104
),
106-
cast_to=object,
105+
cast_to=SongCreateResponse,
107106
)
108107

109108
def retrieve(
@@ -210,7 +209,6 @@ async def create(
210209
self,
211210
*,
212211
prompt: str,
213-
creator_wallet_address: str | NotGiven = NOT_GIVEN,
214212
genre: str | NotGiven = NOT_GIVEN,
215213
is_instrumental: bool | NotGiven = NOT_GIVEN,
216214
lyrics: str | NotGiven = NOT_GIVEN,
@@ -221,22 +219,22 @@ async def create(
221219
extra_query: Query | None = None,
222220
extra_body: Body | None = None,
223221
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
224-
) -> object:
222+
) -> SongCreateResponse:
225223
"""Generate a new AI song based on provided parameters.
226224
227225
Rate limited to 2 calls per
228226
hour per API key.
229227
230228
Args:
231-
prompt: Text prompt for song generation
232-
233-
creator_wallet_address: Wallet address of the creator
229+
prompt: Text prompt for song generation (max 200 characters)
234230
235231
genre: Musical genre
236232
237-
is_instrumental: Whether the song should be instrumental
233+
is_instrumental: Whether the song should be instrumental. If the song is instrumental, the lyrics
234+
will be ignored.
238235
239-
lyrics: Optional lyrics for the song
236+
lyrics: Optional lyrics for the song. If not provided, the prompt will be used to
237+
generate lyrics.
240238
241239
mood: Mood of the song
242240
@@ -253,7 +251,6 @@ async def create(
253251
body=await async_maybe_transform(
254252
{
255253
"prompt": prompt,
256-
"creator_wallet_address": creator_wallet_address,
257254
"genre": genre,
258255
"is_instrumental": is_instrumental,
259256
"lyrics": lyrics,
@@ -264,7 +261,7 @@ async def create(
264261
options=make_request_options(
265262
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
266263
),
267-
cast_to=object,
264+
cast_to=SongCreateResponse,
268265
)
269266

270267
async def retrieve(

src/beats_foundation/types/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
from .song_list_params import SongListParams as SongListParams
77
from .song_create_params import SongCreateParams as SongCreateParams
88
from .song_list_response import SongListResponse as SongListResponse
9+
from .song_create_response import SongCreateResponse as SongCreateResponse

src/beats_foundation/types/song_create_params.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@
1111

1212
class SongCreateParams(TypedDict, total=False):
1313
prompt: Required[str]
14-
"""Text prompt for song generation"""
15-
16-
creator_wallet_address: Annotated[str, PropertyInfo(alias="creatorWalletAddress")]
17-
"""Wallet address of the creator"""
14+
"""Text prompt for song generation (max 200 characters)"""
1815

1916
genre: str
2017
"""Musical genre"""
2118

2219
is_instrumental: Annotated[bool, PropertyInfo(alias="isInstrumental")]
23-
"""Whether the song should be instrumental"""
20+
"""Whether the song should be instrumental.
21+
22+
If the song is instrumental, the lyrics will be ignored.
23+
"""
2424

2525
lyrics: str
26-
"""Optional lyrics for the song"""
26+
"""Optional lyrics for the song.
27+
28+
If not provided, the prompt will be used to generate lyrics.
29+
"""
2730

2831
mood: str
2932
"""Mood of the song"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
5+
from .song import Song
6+
from .._models import BaseModel
7+
8+
__all__ = ["SongCreateResponse"]
9+
10+
11+
class SongCreateResponse(BaseModel):
12+
song: Optional[Song] = None

0 commit comments

Comments
 (0)