diff --git a/src/libs/Ideogram/openapi.yaml b/src/libs/Ideogram/openapi.yaml index 0bdf50e..6ec9c09 100644 --- a/src/libs/Ideogram/openapi.yaml +++ b/src/libs/Ideogram/openapi.yaml @@ -547,7 +547,7 @@ paths: - sdk: curl code: "curl -X POST https://api.ideogram.ai/upscale \\\n -H \"Api-Key: \" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F image_file=@ \\\n -F image_request='{\n \"resemblance\": 55,\n \"detail\": 90\n }'\n" - sdk: python - code: "import requests\n\nresponse = requests.post(\n \"https://api.ideogram.ai/upscale\",\n headers={\n \"Api-Key\": \"\"\n },\n data={\n \"image_request\": {\n \"resemblance\": 55,\n \"detail\": 90\n }\n },\n files={\n \"image_file\": open(\"\", \"rb\")\n }\n)\nprint(response.json())\nwith open('output.png', 'wb') as f:\n f.write(requests.get(response.json()['data'][0]['url']).content)\n" + code: "import requests\nimport json\n\nresponse = requests.post(\n \"https://api.ideogram.ai/upscale\",\n headers={\n \"Api-Key\": \"\"\n },\n data={\n \"image_request\": json.dumps({\n \"resemblance\": 55,\n \"detail\": 90\n })\n },\n files={\n \"image_file\": open(\"\", \"rb\")\n }\n)\nprint(response.json())\nwith open('output.png', 'wb') as f:\n f.write(requests.get(response.json()['data'][0]['url']).content)\n" - sdk: typescript code: "const formData = new FormData();\nformData.append('image_request', JSON.stringify({\n resemblance: 55,\n detail: 90\n}));\nformData.append('image_file', new Blob([fs.readFileSync(\"\")], {\n type: 'image/png'\n}));\nconst response = await fetch('https://api.ideogram.ai/upscale', {\n method: 'POST',\n headers: { 'Api-Key': '' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n" x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller