- 前言(必读)
- OpenAI官方SDK使用教程
- 批量请求示例
- 聊天模型(Chat)
- 内容审查
- 向量嵌入
- 图片处理
- 音频模型(Audio)
- 绘画模型(Painting)
- MidJourney
- dalle和gpt-image-1
- Grok
- Flux
- Ideogram
- stable-diffusion
- 视频模型(Video)
- 音乐创作(suno)
- 文档处理
- 3D模型
- 更多接口开发中...
- 查询令牌用量GET
- 查询令牌限额GET
Upscale(高清放大)
POST
/ideogram/upscale
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数multipart/form-data
image_file
file
必需
图像二进制;目前仅支持 JPEG、WEBP 和 PNG 格式
image_request
string
必需
注意:实际是object类型。参数大致和Generate相同,resemblance为图片相似度。
示例值:
{"resemblance":50,"magic_prompt_option":"AUTO","prompt":"A%20serene%20tropical%20beach%20","seed":12345,"detail":50}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gpt.ge/ideogram/upscale' \
--form 'image_file=@""' \
--form 'image_request="{\"resemblance\":50,\"magic_prompt_option\":\"AUTO\",\"prompt\":\"A%20serene%20tropical%20beach%20\",\"seed\":12345,\"detail\":50}"'
返回响应
🟢200成功
application/json
Body
created
string
必需
data
array [object {6}]
必需
is_image_safe
boolean
可选
prompt
string
可选
resolution
string
可选
seed
integer
可选
style_type
null
可选
url
string
可选
示例
{
"created": "2024-10-30T22:08:25.135544+00:00",
"data": [
{
"is_image_safe": true,
"prompt": "A serene and picturesque tropical beach scene, featuring a pristine stretch of soft, golden sand. The gently rolling waves of the turquoise ocean caress the shoreline, creating a soothing ambiance. Palm trees sway gracefully, casting dappled shadows on the sand, while a few seagulls fly overhead. A small, vibrant coral reef is visible beneath the surface of the water, teeming with colorful fish and marine life. The sun casts a warm, golden glow over the entire scene.",
"resolution": "1120x732",
"seed": 12345,
"style_type": null,
"url": "https://ideogram.ai/api/images/ephemeral/lRIm5aj3Rx24jvjBrcOlOw.png?exp=1730412562&sig=e365544046272397c7373aab9bfc5d41eab2e36de49cfb5659e86bf41b0e0d48"
}
]
}
修改于 2024-10-30 23:02:44