Skip to content

Commit bcb9357

Browse files
feat: re-gen /responses (scalar) + gen gemini 3 image pro (scalar)
1 parent 91b4fdf commit bcb9357

23 files changed

Lines changed: 536 additions & 621935 deletions
Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
{
2+
"openapi": "3.0.0",
3+
"info": {
4+
"title": "AIML API",
5+
"version": "1.0.0"
6+
},
7+
"servers": [
8+
{
9+
"url": "https://api.aimlapi.com"
10+
}
11+
],
12+
"paths": {
13+
"/v1/images/generations": {
14+
"post": {
15+
"operationId": "_v1_images_generations",
16+
"requestBody": {
17+
"required": true,
18+
"content": {
19+
"application/json": {
20+
"schema": {
21+
"type": "object",
22+
"properties": {
23+
"model": {
24+
"type": "string",
25+
"enum": [
26+
"google/gemini-3-pro-image-preview-edit"
27+
]
28+
},
29+
"prompt": {
30+
"type": "string",
31+
"description": "The text prompt describing the content, style, or composition of the image to be generated."
32+
},
33+
"image_urls": {
34+
"type": "array",
35+
"items": {
36+
"type": "string",
37+
"format": "uri"
38+
},
39+
"description": "List of URLs or local Base64 encoded images to edit."
40+
},
41+
"num_images": {
42+
"type": "number",
43+
"minimum": 1,
44+
"maximum": 4,
45+
"default": 1,
46+
"description": "The number of images to generate."
47+
}
48+
},
49+
"required": [
50+
"model",
51+
"prompt",
52+
"image_urls"
53+
],
54+
"title": "google/gemini-3-pro-image-preview-edit"
55+
}
56+
}
57+
}
58+
},
59+
"responses": {
60+
"200": {
61+
"content": {
62+
"application/json": {
63+
"schema": {
64+
"type": "object",
65+
"properties": {
66+
"data": {
67+
"type": "array",
68+
"nullable": true,
69+
"items": {
70+
"type": "object",
71+
"properties": {
72+
"url": {
73+
"type": "string",
74+
"nullable": true,
75+
"description": "The URL where the file can be downloaded from.",
76+
"example": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png"
77+
},
78+
"b64_json": {
79+
"type": "string",
80+
"nullable": true,
81+
"description": "The base64-encoded JSON of the generated image.",
82+
"example": null
83+
}
84+
}
85+
},
86+
"description": "The list of generated images."
87+
},
88+
"meta": {
89+
"type": "object",
90+
"nullable": true,
91+
"properties": {
92+
"usage": {
93+
"type": "object",
94+
"nullable": true,
95+
"properties": {
96+
"tokens_used": {
97+
"type": "number",
98+
"description": "The number of tokens consumed during generation.",
99+
"example": 120000
100+
}
101+
},
102+
"required": [
103+
"tokens_used"
104+
]
105+
}
106+
},
107+
"description": "Additional details about the generation."
108+
}
109+
}
110+
}
111+
}
112+
}
113+
}
114+
},
115+
"x-hideTryItPanel": true,
116+
"x-codeSamples": [
117+
{
118+
"lang": "JavaScript",
119+
"source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v1/images/generations', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
120+
},
121+
{
122+
"lang": "Python",
123+
"source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v1/images/generations\",\n headers={\n \"Content-Type\":\"application/json\", \n \"Authorization\":\"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }\n)\n\ndata = response.json()\nprint(data)"
124+
},
125+
{
126+
"lang": "cURL",
127+
"source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v1/images/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }'"
128+
},
129+
{
130+
"lang": "HTTP",
131+
"source": "POST /v1/images/generations HTTP/1.1\nHost: api.aimlapi.com\nAuthorization: Bearer <YOUR_AIMLAPI_KEY>\nContent-Type: application/json\nAccept: */*\n\n{\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n}"
132+
}
133+
]
134+
}
135+
},
136+
"/images/generations": {
137+
"post": {
138+
"operationId": "_images_generations",
139+
"requestBody": {
140+
"required": true,
141+
"content": {
142+
"application/json": {
143+
"schema": {
144+
"type": "object",
145+
"properties": {
146+
"model": {
147+
"type": "string",
148+
"enum": [
149+
"google/gemini-3-pro-image-preview-edit"
150+
]
151+
},
152+
"prompt": {
153+
"type": "string",
154+
"description": "The text prompt describing the content, style, or composition of the image to be generated."
155+
},
156+
"image_urls": {
157+
"type": "array",
158+
"items": {
159+
"type": "string",
160+
"format": "uri"
161+
},
162+
"description": "List of URLs or local Base64 encoded images to edit."
163+
},
164+
"num_images": {
165+
"type": "number",
166+
"minimum": 1,
167+
"maximum": 4,
168+
"default": 1,
169+
"description": "The number of images to generate."
170+
}
171+
},
172+
"required": [
173+
"model",
174+
"prompt",
175+
"image_urls"
176+
],
177+
"title": "google/gemini-3-pro-image-preview-edit"
178+
}
179+
}
180+
}
181+
},
182+
"responses": {
183+
"200": {
184+
"content": {
185+
"application/json": {
186+
"schema": {
187+
"type": "object",
188+
"properties": {
189+
"data": {
190+
"type": "array",
191+
"nullable": true,
192+
"items": {
193+
"type": "object",
194+
"properties": {
195+
"url": {
196+
"type": "string",
197+
"nullable": true,
198+
"description": "The URL where the file can be downloaded from.",
199+
"example": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png"
200+
},
201+
"b64_json": {
202+
"type": "string",
203+
"nullable": true,
204+
"description": "The base64-encoded JSON of the generated image.",
205+
"example": null
206+
}
207+
}
208+
},
209+
"description": "The list of generated images."
210+
},
211+
"meta": {
212+
"type": "object",
213+
"nullable": true,
214+
"properties": {
215+
"usage": {
216+
"type": "object",
217+
"nullable": true,
218+
"properties": {
219+
"tokens_used": {
220+
"type": "number",
221+
"description": "The number of tokens consumed during generation.",
222+
"example": 120000
223+
}
224+
},
225+
"required": [
226+
"tokens_used"
227+
]
228+
}
229+
},
230+
"description": "Additional details about the generation."
231+
}
232+
}
233+
}
234+
}
235+
}
236+
}
237+
},
238+
"x-hideTryItPanel": true,
239+
"x-codeSamples": [
240+
{
241+
"lang": "JavaScript",
242+
"source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v1/images/generations', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
243+
},
244+
{
245+
"lang": "Python",
246+
"source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v1/images/generations\",\n headers={\n \"Content-Type\":\"application/json\", \n \"Authorization\":\"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }\n)\n\ndata = response.json()\nprint(data)"
247+
},
248+
{
249+
"lang": "cURL",
250+
"source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v1/images/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }'"
251+
},
252+
{
253+
"lang": "HTTP",
254+
"source": "POST /v1/images/generations HTTP/1.1\nHost: api.aimlapi.com\nAuthorization: Bearer <YOUR_AIMLAPI_KEY>\nContent-Type: application/json\nAccept: */*\n\n{\n \"model\": \"google/gemini-3-pro-image-preview-edit\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n}"
255+
}
256+
]
257+
}
258+
}
259+
},
260+
"components": {
261+
"securitySchemes": {
262+
"access-token": {
263+
"scheme": "bearer",
264+
"bearerFormat": "<YOUR_AIMLAPI_KEY>",
265+
"type": "http",
266+
"description": "Bearer key"
267+
}
268+
}
269+
}
270+
}

0 commit comments

Comments
 (0)