OpenAI-Hub中文文档
首页控制台
首页控制台
  1. Ideogram(绘画)
  • 序言
  • OpenAI接口
    • 聊天通用
      • 如何上传文件?
      • 语音对话接口
      • 聊天(通用)
      • gpts接口
      • gpt-4-all(生成图片)
      • gpt-4-all(分析图片)
    • 内容补全
      • 创建完成
    • 图像接口
      • 创建图像
      • 创建图像编辑
      • 创建图像变化
    • 音频接口
      • 创建语音
      • 创建转录
    • 向量生成
      • 创建嵌入
    • 模型列表
      • 列出模型
    • 内容审核
      • 创建内容审核
    • 帮助中心
      • HTTP接口状态码
  • Suno音乐接口
    • 接口格式(通用)
      • 生成音乐
      • 生成歌词
      • 查询单个任务
      • 批量查询任务
    • 其他接口格式
      • 生成音乐
      • 查询任务
  • 绘画接口
    • Midjourney
      • InsightFace任务提交
        • 提交swap_face任务(废弃)
      • 任务提交
        • 提交Imagine任务
        • 执行动作
        • 提交Blend任务
        • 提交Describe任务
        • 提交Modal
        • 提交Shorten任务
        • 上传文件到discord
      • 任务查询
        • 指定ID获取任务
        • 根据ID列表查询任务
        • 根据ID列表查询任务-字段displays
        • 获取任务图片的seed
    • Flux(暂不可用)
      • 生成图片
    • Ideogram(绘画)
      • Generate(文生图)
        POST
      • Remix(混合图)
        POST
      • Upscale(放大高清)
        POST
      • Describe(描述)
        POST
  • 视频接口
    • Luma视频接口
      • 官方接口格式
        • 视频生成
        • 获取结果
      • 平台格式
        • 任务提交
          • 生成视频
          • 扩展视频
          • 获取视频无水印链接
        • 任务查询
          • 查询单个任务
          • 批量查询任务
    • Runway视频接口
      • feed
      • generate(文本)
      • generate(参考图片)
    • Pika视频接口
      • 任务提交
      • 查询任务
  • 文本生成(通用)
    • 聊天(通用)
      POST
    • Anthropic Claude(全系列,已更新支持第三代)
      POST
    • gemini-pro
      POST
  • 可灵AI
    • 回调协议
    • 生成图像
    • 生成视频
    • 图生视频
    • 查询单个任务
  1. Ideogram(绘画)

Upscale(放大高清)

POST
https://api.openai-hub.com/ideogram/upscale
Upscale
Upscale provided images synchronously with an optional prompt.
提供图像的高分辨率版本,并可选附带提示。

请求参数

Header 参数
Authorization
string 
必需
在 Header 添加参数 Authorization,其值为在 Bearer 之后拼接 令牌
示例
Authorization: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379
默认值:
Bearer {{YOUR_API_KEY}}
Content-Type
string 
可选
默认值:
application/json
Body 参数multipart/form-data
image_file
file 
必需
An image binary; only JPEG, WEBPs and PNGs are supported at this time
图像二进制;目前仅支持 JPEG、WEBP 和 PNG 格式
image_request
string 
必需
A request to generate a new image using a provided image and a prompt.
请求生成一张新图像,使用提供的图像和提示。大致和Generate相同。
示例值:
{"resemblance":50,"magic_prompt_option":"AUTO","prompt":"A serene tropical beach ","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.openai-hub.com/ideogram/upscale' \
--header 'Authorization;' \
--form 'image_file=@""' \
--form 'image_request="{\"resemblance\":50,\"magic_prompt_option\":\"AUTO\",\"prompt\":\"A serene tropical beach \",\"seed\":12345,\"detail\":50}"'

返回响应

🟢200OK
application/json
Body
data
array [object {5}] 
可选
A list of ImageObjects that contain the generated image(s).
包含生成图像的图像对象列表。
seed
integer 
可选
0 to 2147483647
prompt
string 
可选
The prompt used for the generation. This may be different from the original prompt.
用于生成的提示。这可能与原始提示不同。
resolution
string 
可选
The resolution of the final image.
最终图像的分辨率。
url
string  | null 
可选
The direct link to the image generated.
生成的图像的直接链接。
is_image_safe
boolean 
可选
Whether this request passes safety checks. If false, the url field will be empty.
该请求是否通过安全检查。如果为假,网址字段将为空。
created
string 
可选
The time the request was created.
请求创建的时间。
示例
{
  "data": [
    {
      "seed": 12345,
      "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
      "resolution": "1024x1024",
      "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
      "is_image_safe": true
    },
    {
      "seed": 12345,
      "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
      "resolution": "1024x1024",
      "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
      "is_image_safe": true
    }
  ],
  "created": "2000-01-23T04:56:07.000Z"
}
上一页
Remix(混合图)
下一页
Describe(描述)
Built with