Skip to content

Commit d17beb9

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-533: docs: add scalar api schemas for /responses
1 parent 7d27e11 commit d17beb9

15 files changed

Lines changed: 196 additions & 188 deletions

File tree

docs/api-references/music-models/MiniMax/minimax-music-[legacy].md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ An advanced AI model that generates diverse high-quality audio compositions by a
1414

1515
<summary>Step-by-Step Instructions</summary>
1616

17-
#### :digit\_one: Setup You Can’t Skip
17+
:digit\_one: **Setup You Can’t Skip**
1818

1919
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet).\
2020
:black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.
2121

22-
#### :digit\_two: Copy the code example
22+
:digit\_two: **Copy the code example**
2323

2424
At the bottom of this page, you'll find [a code example](minimax-music-\[legacy].md#quick-code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
2525

@@ -32,7 +32,7 @@ Generating a music piece using this model involves sequentially calling two endp
3232
The code example combines both endpoint calls.
3333
{% endhint %}
3434

35-
#### :digit\_three: Modify the code example
35+
:digit\_three: **Modify the code example**
3636

3737
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key from your account.\
3838
:black\_small\_square: Provide your lyrics via the `prompt` parameter. The model will use it to generate a song.
@@ -43,11 +43,11 @@ Keep in mind that the maximum length of generated audio is 1 minute. If you prov
4343

4444
:black\_small\_square: Via `reference_audio_url` parameter, provide a URL to a reference track from which the model will extract the genre, style, tempo, vocal and instrument timbres, and the overall mood of the piece.
4545

46-
#### :digit\_four: <sup><sub><mark style="background-color:yellow;">(Optional)<mark style="background-color:yellow;"><sub></sup> Adjust other optional parameters if needed
46+
:digit\_four: <sup><sub><mark style="background-color:yellow;">**(Optional)**<mark style="background-color:yellow;"><sub></sup>**&#x20;Adjust other optional parameters if needed**
4747

4848
Only `prompt` is a required parameter for this model (and we’ve already filled it in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding [API schema](minimax-music-\[legacy].md#api-schemas) ("Generate a music sample"), which lists all available parameters along with notes on how to use them.
4949

50-
#### :digit\_five: Run your modified code
50+
:digit\_five: **Run your modified code**
5151

5252
Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds 1 minute.
5353

@@ -57,6 +57,24 @@ If you need a more detailed walkthrough for setting up your development environm
5757

5858
</details>
5959

60+
## API Schemas
61+
62+
### Generate a music sample
63+
64+
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
65+
66+
{% openapi-operation spec="minimax-music" path="/v2/generate/audio" method="post" %}
67+
[OpenAPI minimax-music](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/MiniMax/minimax-music.json)
68+
{% endopenapi-operation %}
69+
70+
### Retrieve the generated music sample from the server <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
71+
72+
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 50-60 seconds or take a bit more.
73+
74+
{% openapi-operation spec="minimax-music-fetch" path="/v2/generate/audio" method="get" %}
75+
[OpenAPI minimax-music-fetch](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/MiniMax/minimax-music-pair.json)
76+
{% endopenapi-operation %}
77+
6078
## Quick Code Example
6179

6280
Here is an example of generation an audio file based on a sample and a prompt using the music model **minimax-music**.
@@ -322,21 +340,3 @@ Generation: {'id': '906aec79-b0af-40c4-adae-15e6c4410e29:minimax-music', 'status
322340
Listen to the track we generated:
323341

324342
{% embed url="https://drive.google.com/file/d/1itPTKlfuOLCtgw7SycISdPLj6gTftp1t/view" fullWidth="false" %}
325-
326-
## API Schemas
327-
328-
### Generate a music sample
329-
330-
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
331-
332-
{% openapi-operation spec="minimax-music" path="/v2/generate/audio" method="post" %}
333-
[OpenAPI minimax-music](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/MiniMax/minimax-music.json)
334-
{% endopenapi-operation %}
335-
336-
### Retrieve the generated music sample from the server <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
337-
338-
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 50-60 seconds or take a bit more.
339-
340-
{% openapi-operation spec="minimax-music-fetch" path="/v2/generate/audio" method="get" %}
341-
[OpenAPI minimax-music-fetch](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/MiniMax/minimax-music-pair.json)
342-
{% endopenapi-operation %}

docs/api-references/music-models/MiniMax/music-01.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ An advanced AI model that generates diverse high-quality audio compositions by a
1212

1313
If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
1414

15+
## API Schemas
16+
17+
### Upload a reference sample
18+
19+
This endpoint uploads a reference music piece to the server, analyzes it, and returns identifiers for the voice and/or instrumental patterns to use later.
20+
21+
{% openapi src="../../../.gitbook/assets/music-01-pair.json" path="/v2/generate/audio/minimax/upload" method="post" %}
22+
[music-01-pair.json](../../../.gitbook/assets/music-01-pair.json)
23+
{% endopenapi %}
24+
25+
### Generate music sample <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
26+
27+
This endpoint generates a new music piece based on the voice and/or instrumental pattern identifiers obtained from the first endpoint above.\
28+
The generation can be completed in 50-60 seconds or take a bit more.
29+
30+
{% openapi src="../../../.gitbook/assets/music-01.json" path="/v2/generate/audio/minimax/generate" method="post" %}
31+
[music-01.json](../../../.gitbook/assets/music-01.json)
32+
{% endopenapi %}
33+
1534
## Quick Code Example
1635

1736
Here is an example of generation an audio file based on a sample and a prompt using the music model **music-01**.
@@ -242,22 +261,3 @@ Generated audio saved as generated_audio.mp3
242261
Listen to the track we generated:
243262
244263
{% embed url="https://drive.google.com/file/d/1sKlPIK6kiYrp6__VhKkgGpr65e8qy2PU/view?usp=sharing" %}
245-
246-
## API Schemas
247-
248-
### Upload a reference sample
249-
250-
This endpoint uploads a reference music piece to the server, analyzes it, and returns identifiers for the voice and/or instrumental patterns to use later.
251-
252-
{% openapi src="../../../.gitbook/assets/music-01-pair.json" path="/v2/generate/audio/minimax/upload" method="post" %}
253-
[music-01-pair.json](../../../.gitbook/assets/music-01-pair.json)
254-
{% endopenapi %}
255-
256-
### Generate music sample <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
257-
258-
This endpoint generates a new music piece based on the voice and/or instrumental pattern identifiers obtained from the first endpoint above.\
259-
The generation can be completed in 50-60 seconds or take a bit more.
260-
261-
{% openapi src="../../../.gitbook/assets/music-01.json" path="/v2/generate/audio/minimax/generate" method="post" %}
262-
[music-01.json](../../../.gitbook/assets/music-01.json)
263-
{% endopenapi %}

docs/api-references/music-models/elevenlabs/eleven_music.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ An advanced audio generation model designed to create high-quality audio tracks
1414

1515
<summary>Step-by-Step Instructions</summary>
1616

17-
#### :digit\_one: Setup You Can’t Skip
17+
:digit\_one: **Setup You Can’t Skip**
1818

1919
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet).\
2020
:black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.
2121

22-
#### :digit\_two: Copy the code example
22+
:digit\_two: **Copy the code example**
2323

2424
At the bottom of this page, you'll find [a code example](eleven_music.md#full-example-generating-and-retrieving-the-video-from-the-server) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
2525

@@ -32,16 +32,16 @@ Generating a music piece using this model involves sequentially calling two endp
3232
The code example combines both endpoint calls.
3333
{% endhint %}
3434

35-
#### :digit\_three: Modify the code example
35+
:digit\_three: **Modify the code example**
3636

3737
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key from your account.\
3838
:black\_small\_square: Provide your instructions via the `prompt` parameter. The model will use them to generate a musical composition.
3939

40-
#### :digit\_four: <sup><sub><mark style="background-color:yellow;">(Optional)<mark style="background-color:yellow;"><sub></sup> Adjust other optional parameters if needed
40+
:digit\_four: <sup><sub><mark style="background-color:yellow;">**(Optional)**<mark style="background-color:yellow;"><sub></sup>**&#x20;Adjust other optional parameters if needed**
4141

4242
Only `prompt` is a required parameter for this model (and we’ve already filled it in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding [API schema](eleven_music.md#api-schemas) ("Generate a music sample"), which lists all available parameters along with notes on how to use them.
4343

44-
#### :digit\_five: Run your modified code
44+
:digit\_five: **Run your modified code**
4545

4646
Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds 30 seconds.
4747

@@ -51,6 +51,24 @@ If you need a more detailed walkthrough for setting up your development environm
5151

5252
</details>
5353

54+
## API Schemas
55+
56+
### Generate a music sample
57+
58+
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
59+
60+
{% openapi-operation spec="eleven-music" path="/v2/generate/audio" method="post" %}
61+
[OpenAPI eleven-music](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/elevenlabs/eleven_music.json)
62+
{% endopenapi-operation %}
63+
64+
### Retrieve the generated music sample from the server <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
65+
66+
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 30-40 seconds or take a bit more.
67+
68+
{% openapi-operation spec="eleven-music-fetch" path="/v2/generate/audio" method="get" %}
69+
[OpenAPI eleven-music-fetch](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/elevenlabs/eleven_music-pair.json)
70+
{% endopenapi-operation %}
71+
5472
## Quick Code Example
5573

5674
Here is an example of generation an audio file based on a prompt using this music model.
@@ -150,21 +168,3 @@ Listen to the track we generated:
150168
{% embed url="https://drive.google.com/file/d/1qwu_K_iGtTLdlR_mrZkoSjQ040Q4Nqng/view?usp=sharing" %}
151169
"`lo-fi pop hip-hop ambient music, slow intro: 10 s, then faster and with loud bass: 10 s"`
152170
{% endembed %}
153-
154-
## API Schemas
155-
156-
### Generate a music sample
157-
158-
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
159-
160-
{% openapi-operation spec="eleven-music" path="/v2/generate/audio" method="post" %}
161-
[OpenAPI eleven-music](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/elevenlabs/eleven_music.json)
162-
{% endopenapi-operation %}
163-
164-
### Retrieve the generated music sample from the server <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
165-
166-
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 30-40 seconds or take a bit more.
167-
168-
{% openapi-operation spec="eleven-music-fetch" path="/v2/generate/audio" method="get" %}
169-
[OpenAPI eleven-music-fetch](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/elevenlabs/eleven_music-pair.json)
170-
{% endopenapi-operation %}

docs/api-references/music-models/google/lyria-2.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ An advanced audio generation model designed to create high-quality audio tracks
1414

1515
<summary>Step-by-Step Instructions</summary>
1616

17-
#### :digit\_one: Setup You Can’t Skip
17+
:digit\_one: **Setup You Can’t Skip**
1818

1919
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet).\
2020
:black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.
2121

22-
#### :digit\_two: Copy the code example
22+
:digit\_two: **Copy the code example**
2323

2424
At the bottom of this page, you'll find [a code example](lyria-2.md#full-example-generating-and-retrieving-the-video-from-the-server) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
2525

@@ -32,16 +32,16 @@ Generating a music piece using this model involves sequentially calling two endp
3232
The code example combines both endpoint calls.
3333
{% endhint %}
3434

35-
#### :digit\_three: Modify the code example
35+
:digit\_three: **Modify the code example**
3636

3737
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key from your account.\
3838
:black\_small\_square: Provide your instructions via the `prompt` parameter. The model will use them to generate a musical composition.
3939

40-
#### :digit\_four: <sup><sub><mark style="background-color:yellow;">(Optional)<mark style="background-color:yellow;"><sub></sup> Adjust other optional parameters if needed
40+
:digit\_four: <sup><sub><mark style="background-color:yellow;">**(Optional)**<mark style="background-color:yellow;"><sub></sup>**&#x20;Adjust other optional parameters if needed**
4141

4242
Only `prompt` is a required parameter for this model (and we’ve already filled it in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding [API schema](lyria-2.md#api-schemas) ("Generate a music sample"), which lists all available parameters along with notes on how to use them.
4343

44-
#### :digit\_five: Run your modified code
44+
:digit\_five: **Run your modified code**
4545

4646
Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds 40 seconds.
4747

@@ -51,6 +51,24 @@ If you need a more detailed walkthrough for setting up your development environm
5151

5252
</details>
5353

54+
## API Schemas
55+
56+
### Generate a music sample
57+
58+
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
59+
60+
{% openapi-operation spec="lyria2" path="/v2/generate/audio" method="post" %}
61+
[OpenAPI lyria2](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/Google/Lyria-2.json)
62+
{% endopenapi-operation %}
63+
64+
### Retrieve the generated music sample from the server <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
65+
66+
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 30-40 seconds or take a bit more.
67+
68+
{% openapi-operation spec="lyria2-fetch" path="/v2/generate/audio" method="get" %}
69+
[OpenAPI lyria2-fetch](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/Google/Lyria-2-pair.json)
70+
{% endopenapi-operation %}
71+
5472
## Quick Code Example
5573

5674
Here is an example of generation an audio file based on a prompt using the music model **Lyria 2**.
@@ -301,21 +319,3 @@ Listen to the track we generated:
301319
{% embed url="https://drive.google.com/file/d/1E1dZrg_oU20JuQ6EdLPJGfCUYCppZuxK/view" %}
302320
`"Majestic orchestral film score recorded in a top-tier London studio. A full-scale symphony orchestra delivers sweeping, cinematic music with rich emotional depth. The composition features soaring themes, dynamic contrasts, and complex harmonies. Expect powerful percussion, expressive strings, and prominent French horns and timpani. The arrangement emphasizes a dramatic narrative arc with intricate orchestrations and a profound, awe-inspiring atmosphere."`
303321
{% endembed %}
304-
305-
## API Schemas
306-
307-
### Generate a music sample
308-
309-
This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.
310-
311-
{% openapi-operation spec="lyria2" path="/v2/generate/audio" method="post" %}
312-
[OpenAPI lyria2](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/Google/Lyria-2.json)
313-
{% endopenapi-operation %}
314-
315-
### Retrieve the generated music sample from the server <a href="#retrieve-the-generated-video-from-the-server" id="retrieve-the-generated-video-from-the-server"></a>
316-
317-
After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 30-40 seconds or take a bit more.
318-
319-
{% openapi-operation spec="lyria2-fetch" path="/v2/generate/audio" method="get" %}
320-
[OpenAPI lyria2-fetch](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/music-models/Google/Lyria-2-pair.json)
321-
{% endopenapi-operation %}

0 commit comments

Comments
 (0)