- 引言
- 在线调试说明
- 发出请求
- 中转站基本介绍
- Chat模型
- 文生图模型
- 文生视频模型
- GPTs 相关
- 文生音乐 Suno
- 系统API
- Python配置方式
- python openai官方库(使用AutoGPT,langchain等)
- python 连续对话
- python 使用 语音转文本
- python 使用文本转语音
- python 使用Embeddings 向量化
- python 调用DALL·E
- python简单调用 openai function-calling demo
- python 简单langchain 调用openai demo
- python llama_index 配置
- Python使用gpt-4o识别图片-本地图片
- python 库流式输出
- gpt realtime模型调用
- python request 请求 流式输出demo
- Python基础对话
- Python使用gpt-4o识别图片
- Python使用Claude识别图片
- nodejs 配置方式
- 各种插件/软件使用教程
- 帮助中心
ideogram(文生图)
POST
https://yunwu.ai/ideogram/generate
具体参数请看官方文档:https://developer.ideogram.ai/api-reference/generate/post-generate-image
返回的图像 URL 在 24 小时内有效,超过该时间将无法访问图像。
已反代图片
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string
必需
示例值:
application/json
Accept
string
必需
示例值:
application/json
Authorization
string
必需
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
image_request
object
必需
prompt
string
必需
aspect_ratio
string
必需
model
string
必需
magic_prompt_option
string
必需
seed
integer
必需
style_type
string
必需
negative_prompt
string
必需
num_images
integer
必需
resolution
string
必需
color_palette
object
必需
示例
{
"image_request": {
"aspect_ratio": "ASPECT_10_16",
"magic_prompt_option": "AUTO",
"model": "V_1",
"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 is 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."
}
}
示例代码
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://yunwu.ai/ideogram/generate' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_request": {
"aspect_ratio": "ASPECT_10_16",
"magic_prompt_option": "AUTO",
"model": "V_1",
"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 is 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."
}
}'
返回响应
🟢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-12-15T17:32:00.965408+00:00",
"data": [
{
"is_image_safe": true,
"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 is 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": "768x1232",
"seed": 1785282233,
"style_type": null,
"url": "https://ideogram.ai/api/images/ephemeral/WkoxvqiOTaaCqG1nO2tQoA.png?exp=1734370337&sig=110fe96dc9e01002c8d837e5b4cde1aaa266195561d231ce76e19e095e478ffe"
}
]
}
修改于 2024-12-15 17:59:57