- OpenAI通用接口
- 全能模型接口
- kimi
- 通义千问
- 智谱
- 秘塔搜索
- 讯飞星火
- 海螺
- deepseek
- Openai
- Suno(音乐)
- Midjourney(绘画)
- Flux(绘图)
- Recraft(绘图)
- Ideogram(绘画)
- Luma(视频)
- Runway(视频)
- 可灵(视频)
文生图
测试中
POST
https://api.ephone.ai/ideogram/generate
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
image_request
object
必需
prompt
string
生成图像的提示语
aspect_ratio
string
可选
默认值:
ASPECT_1_1
model
enum<string>
可选
枚举值:
V_1V_1_TURBOV_2V_2_TURBO
默认值:
V_2
magic_prompt_option
enum<string>
可选
枚举值:
AUTOONOFF
默认值:
AUTO
seed
integer
可选
style_type
enum<string>
可选
枚举值:
GENERALREALISTICDESIGNRENDER_3DANIME
negative_prompt
string
可选
resolution
string
最终图像的分辨率。
示例值:
RESOLUTION_832_1152
示例
{
"image_request": {
"model": "V_1_TURBO",
"magic_prompt_option": "AUTO",
"seed": 111,
"prompt": "cat"
}
}
示例代码
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.ephone.ai/ideogram/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_request": {
"model": "V_1_TURBO",
"magic_prompt_option": "AUTO",
"seed": 111,
"prompt": "cat"
}
}'
返回响应
🟢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-20T16:10:56.882175+00:00",
"data": [
{
"is_image_safe": true,
"prompt": "A playful and curious cat with bright green eyes, perched on a wooden windowsill. Its soft white fur contrasts with the grayish-blue sky outside the window. The cat's ears are perked up, revealing its alert and attentive nature. The background shows a cozy, sunlit room with a patterned rug, a bookshelf filled with books, and a warm, inviting atmosphere.",
"resolution": "1024x1024",
"seed": 111,
"style_type": null,
"url": "https://ideogram.ai/api/images/ephemeral/rdmsq6uHT8qdi_3ZCNlg6w.png?exp=1734797463&sig=ad766482b18ed3c4564d17af9836b8afc3c6ab9c79989e469c481157d91b0187"
}
]
}
修改于 2024-12-20 16:51:14