Skip to content

Commit 8a59f2b

Browse files
Merge pull request #78 from tryAGI/bot/update-openapi_202505130342
feat:@coderabbitai
2 parents e4d7078 + fa5df5f commit 8a59f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libs/Ideogram/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ paths:
547547
- sdk: curl
548548
code: "curl -X POST https://api.ideogram.ai/upscale \\\n -H \"Api-Key: <apiKey>\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F image_file=@<file1> \\\n -F image_request='{\n \"resemblance\": 55,\n \"detail\": 90\n }'\n"
549549
- sdk: python
550-
code: "import requests\n\nresponse = requests.post(\n \"https://api.ideogram.ai/upscale\",\n headers={\n \"Api-Key\": \"<apiKey>\"\n },\n data={\n \"image_request\": {\n \"resemblance\": 55,\n \"detail\": 90\n }\n },\n files={\n \"image_file\": open(\"<file1>\", \"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"
550+
code: "import requests\nimport json\n\nresponse = requests.post(\n \"https://api.ideogram.ai/upscale\",\n headers={\n \"Api-Key\": \"<apiKey>\"\n },\n data={\n \"image_request\": json.dumps({\n \"resemblance\": 55,\n \"detail\": 90\n })\n },\n files={\n \"image_file\": open(\"<file1>\", \"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"
551551
- sdk: typescript
552552
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(\"<file1>\")], {\n type: 'image/png'\n}));\nconst response = await fetch('https://api.ideogram.ai/upscale', {\n method: 'POST',\n headers: { 'Api-Key': '<apiKey>' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n"
553553
x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller

0 commit comments

Comments
 (0)