Skip to content

Commit 44bef31

Browse files
docs: 2nd edition of gemini-2.5-flash-image-edit.json
1 parent 7637f82 commit 44bef31

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"x-codeSamples": [
66
{
77
"lang": "JavaScript",
8-
"source": "async function main() {\n try {\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-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: '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\n if (!response.ok) {\n throw new Error('HTTP error!');\n }\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n\n } catch (error) {\n console.error('Error', error);\n }\n}\n\nmain();"
8+
"source": "async function main() {\n try {\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-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 });\n\n if (!response.ok) {\n throw new Error('HTTP error!');\n }\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n\n } catch (error) {\n console.error('Error', error);\n }\n}\n\nmain();"
99
},
1010
{
1111
"lang": "Python",
12-
"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 [\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)"
12+
"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)"
1313
}
1414
],
1515
"operationId": "ImageGenerationsController_generateImage_v1",

0 commit comments

Comments
 (0)