Skip to content

Commit 94bfeff

Browse files
feat: re-gen all image models (remove http autoexamples)
1 parent 5ce14f6 commit 94bfeff

17 files changed

Lines changed: 11425 additions & 6302 deletions

File tree

docs/api-references/3d-generating-models/Tencent/hunyuan-part.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,17 @@
136136
},
137137
"x-hideTryItPanel": true,
138138
"x-codeSamples": [
139+
{
140+
"lang": "cURL",
141+
"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\": \"tencent/hunyuan-part\",\n \"mesh_url\": \"https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb\"\n }'"
142+
},
139143
{
140144
"lang": "JavaScript",
141145
"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\": \"tencent/hunyuan-part\",\n \"mesh_url\": \"https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
142146
},
143147
{
144148
"lang": "Python",
145149
"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\": \"tencent/hunyuan-part\",\n \"mesh_url\": \"https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb\"\n }\n)\n\ndata = response.json()\nprint(data)"
146-
},
147-
{
148-
"lang": "cURL",
149-
"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\": \"tencent/hunyuan-part\",\n \"mesh_url\": \"https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb\"\n }'"
150-
},
151-
{
152-
"lang": "HTTP",
153-
"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\": \"tencent/hunyuan-part\",\n \"mesh_url\": \"https://storage.googleapis.com/falserverless/model_tests/video_models/base_basic_shaded.glb\"\n}"
154150
}
155151
]
156152
}

docs/api-references/image-models/Alibaba-Cloud/qwen-image-edit.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@
116116
"x-codeSamples": [
117117
{
118118
"lang": "cURL",
119-
"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\": \"alibaba/qwen-image-edit\",\n \"prompt\": \"Add a crown to the T-rex’s head.\",\n \"image\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\"\n }'"
119+
"source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v1/images/edits' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --form \"prompt=Add a crown to the T-rex’s head.\" \\\n --form \"image=@<YOUR_IMAGE_PATH.png>;type=image/png;filename=<IMAGE_NAME>\""
120120
},
121121
{
122122
"lang": "JavaScript",
123-
"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\": \"alibaba/qwen-image-edit\",\n \"prompt\": \"Add a crown to the T-rex’s head.\",\n \"image\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
123+
"source": "import fs from 'fs';\nimport fetch from 'node-fetch';\nimport FormData from 'form-data';\n\nasync function main() {\n const formData = new FormData();\n formData.append('model', 'openai/gpt-image-1');\n formData.append('prompt', \"Add a crown to the T-rex's head.\");\n formData.append('image', fs.createReadStream('<YOUR_IMAGE_PATH.png>'), {\n filename: '<IMAGE_NAME>',\n contentType: 'image/png',\n });\n\n const response = await fetch('https://api.aimlapi.com/v1/images/edits', {\n method: 'POST',\n headers: {\n Authorization: 'Bearer <YOUR_AIMLAPI_KEY>',\n ...formData.getHeaders(),\n },\n body: formData,\n });\n\n const data = await response.json();\n console.log(data);\n}\n\nmain();"
124124
},
125125
{
126126
"lang": "Python",
127-
"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\": \"alibaba/qwen-image-edit\",\n \"prompt\": \"Add a crown to the T-rexs head.\",\n \"image\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\"\n }\n)\n\ndata = response.json()\nprint(data)"
127+
"source": "import requests\nwith open(\"<YOUR_IMAGE_PATH.png>\", \"rb\") as file:\n files = {\"image\": (\"<IMAGE_NAME>\", file, \"image/png\")}\n response = requests.post(\n \"https://api.aimlapi.com/v1/images/edits\",\n headers={\n \"Authorization\":\"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n data={\n \"model\":\"alibaba/qwen-image-edit\",\n \"prompt\": \"Add a crown to the T-rex's head.\"\n },\n files=files\n )\n\n data = response.json()\n print(data)"
128128
}
129129
]
130130
}

docs/api-references/image-models/ByteDance/seedream-4-5.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"openapi": "3.0.0",
33
"info": {
4-
"title": "Seedream 4.5 - AI/ML API",
5-
"version": "1.0.0",
6-
"description": "Seedream 4.5 is ByteDance’s latest high‑end image generation model focused on commercial visual production, with improved editing consistency, portrait quality, small text rendering, and multi‑image fusion for complex scenes and creative content."
4+
"title": "AIML API",
5+
"version": "1.0.0"
76
},
87
"servers": [
98
{
@@ -156,21 +155,17 @@
156155
},
157156
"x-hideTryItPanel": true,
158157
"x-codeSamples": [
158+
{
159+
"lang": "cURL",
160+
"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\": \"bytedance/seedream-4-5\",\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 }'"
161+
},
159162
{
160163
"lang": "JavaScript",
161164
"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\": \"bytedance/seedream-4-5\",\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();"
162165
},
163166
{
164167
"lang": "Python",
165-
"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\": \"bytedance/seedream-4-5\",\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)"
166-
},
167-
{
168-
"lang": "cURL",
169-
"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\": \"bytedance/seedream-4-5\",\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 }'"
170-
},
171-
{
172-
"lang": "HTTP",
173-
"source": "POST / HTTP/1.1\nHost: test.com\nAuthorization: Bearer <YOUR_AIMLAPI_KEY>\nContent-Type: application/json\nAccept: */*\n\n{\n \"model\": \"bytedance/seedream-4-5\",\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}"
168+
"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\": \"bytedance/seedream-4-5\",\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)"
174169
}
175170
]
176171
}

docs/api-references/image-models/ByteDance/seedream-v4-edit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
},
179179
{
180180
"lang": "Python",
181-
"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\": \"bytedance/seedream-v4-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)"
181+
"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\": \"bytedance/seedream-v4-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)"
182182
}
183183
]
184184
}

docs/api-references/image-models/ByteDance/uso.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
},
206206
{
207207
"lang": "Python",
208-
"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\": \"bytedance/uso\",\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)"
208+
"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\": \"bytedance/uso\",\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)"
209209
}
210210
]
211211
}

docs/api-references/image-models/Google/gemini-2.5-flash-image-edit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
},
142142
{
143143
"lang": "Python",
144-
"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-2.5-flash-image-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)"
144+
"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-2.5-flash-image-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)"
145145
}
146146
]
147147
}

docs/api-references/image-models/Google/gemini-3-pro-image-preview-edit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
},
153153
{
154154
"lang": "Python",
155-
"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/nano-banana-pro-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)"
155+
"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/nano-banana-pro-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)"
156156
}
157157
]
158158
}

0 commit comments

Comments
 (0)