Skip to content

Commit cc46a2f

Browse files
feat: re-gen minimax/music-cover
1 parent 5134a9d commit cc46a2f

3 files changed

Lines changed: 137 additions & 235 deletions

File tree

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,121 @@
11
# Grok Imagine Image
22

3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `x-ai/grok-imagine-image`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/x-ai/grok-imagine-image" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
xAI’s latest and fastest text-to-image model as of March 2026.
20+
21+
## Setup your API Key
22+
23+
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).
24+
25+
## API Schema
26+
27+
{% openapi-operation spec="grok-imagine-image" path="/v1/images/generations" method="post" %}
28+
[OpenAPI grok-imagine-image](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/image-models/xAI/grok-imagine-image.json)
29+
{% endopenapi-operation %}
30+
31+
## Quick Example
32+
33+
Let's generate an image of the specified size using a simple prompt.
34+
35+
{% tabs %}
36+
{% tab title="Python" %}
37+
{% code overflow="wrap" %}
38+
```python
39+
import requests
40+
import json # for getting a structured output with indentation
41+
42+
def main():
43+
response = requests.post(
44+
"https://api.aimlapi.com/v1/images/generations",
45+
headers={
46+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
47+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
48+
"Content-Type": "application/json",
49+
},
50+
json={
51+
"model": "x-ai/grok-imagine-image",
52+
"prompt": "A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.",
53+
"aspect_ratio": "16:9"
54+
}
55+
)
56+
57+
data = response.json()
58+
print(json.dumps(data, indent=2, ensure_ascii=False))
59+
60+
if __name__ == "__main__":
61+
main()
62+
```
63+
{% endcode %}
64+
{% endtab %}
65+
66+
{% tab title="JS" %}
67+
{% code overflow="wrap" %}
68+
```javascript
69+
async function main() {
70+
const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
71+
method: 'POST',
72+
headers: {
73+
// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
74+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
75+
'Content-Type': 'application/json',
76+
},
77+
body: JSON.stringify({
78+
model: 'x-ai/grok-imagine-image',
79+
prompt: 'A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.',
80+
aspect_ratio: '16:9'
81+
}),
82+
});
83+
84+
const data = await response.json();
85+
console.log('Generation:', data);
86+
}
87+
88+
main();
89+
```
90+
{% endcode %}
91+
{% endtab %}
92+
{% endtabs %}
93+
94+
<details>
95+
96+
<summary>Response</summary>
97+
98+
{% code overflow="wrap" %}
99+
```json5
100+
{
101+
"data": [
102+
{
103+
"url": "https://cdn.aimlapi.com/xolmis/xai-imgen/xai-tmp-imgen-7d3be922-98a2-4cd2-b467-87e7dedc816e.png",
104+
"mime_type": "image/png",
105+
"revised_prompt": ""
106+
}
107+
],
108+
"meta": {
109+
"usage": {
110+
"credits_used": 52000
111+
}
112+
}
113+
}
114+
```
115+
{% endcode %}
116+
117+
</details>
118+
119+
We obtained the following 2816x1536 image by running this code example:
120+
121+
<div align="left"><figure><img src="../../../.gitbook/assets/x-ai-grok-imagine-image_output.png" alt=""><figcaption><p><code>"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses."</code></p></figcaption></figure></div>

docs/api-references/music-models/MiniMax/music-cover.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@
3232
"maxLength": 2000,
3333
"description": "A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters."
3434
},
35-
"lyrics": {
36-
"type": "string",
37-
"minLength": 10,
38-
"maxLength": 3000,
39-
"description": "Lyrics of the song. Use (\n) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters.",
40-
"example": "[Verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes"
41-
},
4235
"reference_audio_url": {
4336
"type": "string",
4437
"format": "uri",
4538
"description": "A URL or a Base64-encoded of the reference audio. Reference audio constraints:\n- Duration: 6 seconds to 6 minutes\n- Size: max 50 MB\n- Format: common audio formats (mp3, wav, flac, etc.)\n"
4639
},
40+
"lyrics": {
41+
"type": "string",
42+
"minLength": 10,
43+
"maxLength": 3000
44+
},
4745
"audio_setting": {
4846
"type": "object",
4947
"properties": {
@@ -85,7 +83,6 @@
8583
"required": [
8684
"model",
8785
"prompt",
88-
"lyrics",
8986
"reference_audio_url"
9087
],
9188
"title": "minimax/music-cover"
Lines changed: 13 additions & 227 deletions
Original file line numberDiff line numberDiff line change
@@ -1,231 +1,17 @@
11
[
22
{
3-
"name": "o1",
4-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=o1",
5-
"alias": "o1-RESPONSES",
6-
"category": "text-models-llm",
7-
"vendor": "OpenAI",
8-
"codeSamples": "responses"
9-
},
10-
{
11-
"name": "openai/o3-2025-04-16",
12-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/o3-2025-04-16",
13-
"alias": "o3-RESPONSES",
14-
"category": "text-models-llm",
15-
"vendor": "OpenAI",
16-
"codeSamples": "responses"
17-
},
18-
{
19-
"name": "o3-mini",
20-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=o3-mini",
21-
"alias": "o3-mini-RESPONSES",
22-
"category": "text-models-llm",
23-
"vendor": "OpenAI",
24-
"codeSamples": "responses"
25-
},
26-
{
27-
"name": "openai/o3-pro",
28-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/o3-pro",
29-
"alias": "o3-pro-RESPONSES",
30-
"category": "text-models-llm",
31-
"vendor": "OpenAI",
32-
"codeSamples": "responses"
33-
},
34-
{
35-
"name": "openai/o4-mini-2025-04-16",
36-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/o4-mini-2025-04-16",
37-
"alias": "o4-mini-RESPONSES",
38-
"category": "text-models-llm",
39-
"vendor": "OpenAI",
40-
"codeSamples": "responses"
41-
},
42-
{
43-
"name": "gpt-3.5-turbo",
44-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=gpt-3.5-turbo",
45-
"alias": "gpt-3.5-turbo-RESPONSES",
46-
"models": ["gpt-3.5-turbo", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-1106"],
47-
"category": "text-models-llm",
48-
"vendor": "OpenAI",
49-
"codeSamples": "responses"
50-
},
51-
{
52-
"name": "gpt-4-0125-preview",
53-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=gpt-4-0125-preview",
54-
"alias": "gpt-4-preview-RESPONSES",
55-
"models": ["gpt-4-0125-preview", "gpt-4-1106-preview"],
56-
"category": "text-models-llm",
57-
"vendor": "OpenAI",
58-
"codeSamples": "responses"
59-
},
60-
{
61-
"name": "gpt-4",
62-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=gpt-4",
63-
"alias": "gpt-4-RESPONSES",
64-
"category": "text-models-llm",
65-
"vendor": "OpenAI",
66-
"codeSamples": "responses"
67-
},
68-
{
69-
"name": "gpt-4-turbo",
70-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=gpt-4-turbo",
71-
"alias": "gpt-4-turbo-RESPONSES",
72-
"models": ["gpt-4-turbo", "gpt-4-turbo-2024-04-09"],
73-
"category": "text-models-llm",
74-
"vendor": "OpenAI",
75-
"codeSamples": "responses"
76-
},
77-
{
78-
"name": "gpt-4o",
79-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-4o",
80-
"alias": "gpt-4o-RESPONSES",
81-
"models": ["gpt-4o", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13"],
82-
"category": "text-models-llm",
83-
"vendor": "OpenAI",
84-
"codeSamples": "responses"
85-
},
86-
{
87-
"name": "gpt-4o-mini",
88-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=gpt-4o-mini",
89-
"alias": "gpt-4o-mini-RESPONSES",
90-
"models": ["gpt-4o-mini", "gpt-4o-mini-2024-07-18"],
91-
"category": "text-models-llm",
92-
"vendor": "OpenAI",
93-
"codeSamples": "responses"
94-
},
95-
{
96-
"name": "openai/gpt-4.1-2025-04-14",
97-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-4.1-2025-04-14",
98-
"alias": "gpt-4.1-RESPONSES",
99-
"category": "text-models-llm",
100-
"vendor": "OpenAI",
101-
"codeSamples": "responses"
102-
},
103-
{
104-
"name": "openai/gpt-4.1-mini-2025-04-14",
105-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-4.1-mini-2025-04-14",
106-
"alias": "gpt-4.1-mini-RESPONSES",
107-
"category": "text-models-llm",
108-
"vendor": "OpenAI",
109-
"codeSamples": "responses"
110-
},
111-
{
112-
"name": "openai/gpt-4.1-nano-2025-04-14",
113-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-4.1-nano-2025-04-14",
114-
"alias": "gpt-4.1-nano-RESPONSES",
115-
"category": "text-models-llm",
116-
"vendor": "OpenAI",
117-
"codeSamples": "responses"
118-
},
119-
{
120-
"name": "openai/gpt-5-2025-08-07",
121-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-2025-08-07",
122-
"alias": "gpt-5-RESPONSES",
123-
"category": "text-models-llm",
124-
"vendor": "OpenAI",
125-
"codeSamples": "responses"
126-
},
127-
{
128-
"name": "openai/gpt-5-mini-2025-08-07",
129-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-mini-2025-08-07",
130-
"alias": "gpt-5-mini-RESPONSES",
131-
"category": "text-models-llm",
132-
"vendor": "OpenAI",
133-
"codeSamples": "responses"
134-
},
135-
{
136-
"name": "openai/gpt-5-nano-2025-08-07",
137-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-nano-2025-08-07",
138-
"alias": "gpt-5-nano-RESPONSES",
139-
"category": "text-models-llm",
140-
"vendor": "OpenAI",
141-
"codeSamples": "responses"
142-
},
143-
{
144-
"name": "openai/gpt-5-chat-latest",
145-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-chat-latest",
146-
"alias": "gpt-5-chat-RESPONSES",
147-
"category": "text-models-llm",
148-
"vendor": "OpenAI",
149-
"codeSamples": "responses"
150-
},
151-
{
152-
"name": "openai/gpt-5-pro",
153-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-pro",
154-
"alias": "gpt-5-pro-RESPONSES",
155-
"category": "text-models-llm",
156-
"vendor": "OpenAI",
157-
"codeSamples": "responses"
158-
},
159-
{
160-
"name": "openai/gpt-5-1",
161-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-1",
162-
"alias": "gpt-5-1-RESPONSES",
163-
"category": "text-models-llm",
164-
"vendor": "OpenAI",
165-
"codeSamples": "responses"
166-
},
167-
{
168-
"name": "openai/gpt-5-1-chat-latest",
169-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-1-chat-latest",
170-
"alias": "gpt-5-1-chat-latest-RESPONSES",
171-
"category": "text-models-llm",
172-
"vendor": "OpenAI",
173-
"codeSamples": "responses"
174-
},
175-
{
176-
"name": "openai/gpt-5-1-codex",
177-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-1-codex",
178-
"alias": "gpt-5-1-codex-RESPONSES",
179-
"category": "text-models-llm",
180-
"vendor": "OpenAI",
181-
"codeSamples": "responses"
182-
},
183-
{
184-
"name": "openai/gpt-5-1-codex-mini",
185-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-1-codex-mini",
186-
"alias": "gpt-5-1-codex-mini-RESPONSES",
187-
"category": "text-models-llm",
188-
"vendor": "OpenAI",
189-
"codeSamples": "responses"
190-
},
191-
{
192-
"name": "openai/gpt-5-2-pro",
193-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-2-pro",
194-
"alias": "gpt-5-2-pro-RESPONSES",
195-
"category": "text-models-llm",
196-
"vendor": "OpenAI",
197-
"codeSamples": "responses"
198-
},
199-
{
200-
"name": "openai/gpt-5-2-codex",
201-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-2-codex",
202-
"alias": "gpt-5-2-codex-RESPONSES",
203-
"category": "text-models-llm",
204-
"vendor": "OpenAI",
205-
"codeSamples": "responses"
206-
},
207-
{
208-
"name": "openai/gpt-5-3-codex",
209-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-3-codex",
210-
"alias": "gpt-5-3-codex-RESPONSES",
211-
"category": "text-models-llm",
212-
"vendor": "OpenAI",
213-
"codeSamples": "responses"
214-
},
215-
{
216-
"name": "openai/gpt-5-4",
217-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-4",
218-
"alias": "gpt-5-4-RESPONSES",
219-
"category": "text-models-llm",
220-
"vendor": "OpenAI",
221-
"codeSamples": "responses"
222-
},
223-
{
224-
"name": "openai/gpt-5-4-pro",
225-
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/responses/submit&model=openai/gpt-5-4-pro",
226-
"alias": "gpt-5-4-pro-RESPONSES",
227-
"category": "text-models-llm",
228-
"vendor": "OpenAI",
229-
"codeSamples": "responses"
3+
"name": "minimax/music-cover",
4+
"url": "https://ai.aimlapi.com/docs-json?endpoint=internal/audio-generations/submit&model=minimax/music-cover",
5+
"alias": "music-cover",
6+
"category": "music-models",
7+
"vendor": "MiniMax",
8+
"codeSamples": "custom",
9+
"customUrlApi": "https://api.aimlapi.com/v2/generate/audio",
10+
"customParams":{
11+
"model": "minimax/music-cover",
12+
"prompt": "Use the reference audio as the intro as it is. Then gradually begin the vocal section, expanding the arrangement with gentle piano and soft strings.",
13+
"lyrics": "[Intro][Verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes back\nWarm lights flicker, memories awaken\nIn this small cafe, I find my way\n[Verse]\nRaindrops tap on the windowpane\nA melody plays, soft and low\nThe clink of cups, the murmur of dreams\nIn this haven, I find my home\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes back\nWarm lights flicker, memories awaken\nIn this small cafe, I find my way",
14+
"reference_audio_url": "https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/female-vocalization.mp3"
15+
}
23016
}
23117
]

0 commit comments

Comments
 (0)