wenwen
  1. 绘图模型-OpenAI格式(/images)
wenwen
  • 聊天对话-OpenAI格式(/chat/completions)
    • 聊天
      POST
    • 流式返回
      POST
    • 结构化输出
      POST
    • 工具调用(function call)
      POST
    • 分析图片
      POST
    • 修改图片
      POST
    • 生成图片
      POST
  • 聊天对话-Anthropic格式(/messages)
    • 聊天
      POST
    • 流式返回
      POST
    • 分析图片
      POST
  • 绘图模型-OpenAI格式(/images)
    • 文生图(基础)
      POST
    • 文生图(高质量)
      POST
    • 文生图(base64)
      POST
    • 图像编辑(dall-e-2)
      POST
    • 图像编辑(gpt-image-1)
      POST
  • 绘图模型-Midjourney(/mj)
    • 文生图(Imagine)
      POST
    • 图片融合(Blend)
      POST
  • 向量化(/embeddings)
    • 文本向量化
      POST
  1. 绘图模型-OpenAI格式(/images)

文生图(高质量)

POST
/v1/images/generations
根据提示词创建图像。
可以使用 DALL·E, Flux等生图模型,模型列表请参考问问平台:https://api.wenwen-ai.com/pricing
BASE_URL: https://api.wenwen-ai.com

请求参数

Header 参数
Content-Type
string 
必需
示例值:
application/json
Authorization
string 
必需
示例值:
Bearer {YOUR_API_KEY}
Body 参数application/json
model
string 
dall-e-3
必需
prompt
string 
必需
quality
string 
必需
style
string 
必需
size
string 
必需
示例
{
    "model": "dall-e-3",
    "prompt": "一只可爱的小海獭",
    "quality": "hd",
    "style": "vivid",
    "size": "1024x1024"
  }

示例代码

HTTP
Shell
JavaScript
Java
Swift
Go
PHP
Python
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
HTTP
Shell
JavaScript
Java
curl --location --request POST 'https://api.wenwen-ai.com/v1/images/generations' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "dall-e-3",
    "prompt": "一只可爱的小海獭",
    "quality": "hd",
    "style": "vivid",
    "size": "1024x1024"
  }'

返回响应

🟢200成功
application/json
Body
created
integer 
必需
data
array [object {4}] 
必需
content_filter_results
object 
可选
prompt_filter_results
object 
可选
revised_prompt
string 
可选
url
string 
可选
示例
{
    "created": 1749539239,
    "data": [
        {
            "content_filter_results": {
                "hate": {
                    "filtered": false,
                    "severity": "safe"
                },
                "self_harm": {
                    "filtered": false,
                    "severity": "safe"
                },
                "sexual": {
                    "filtered": false,
                    "severity": "safe"
                },
                "violence": {
                    "filtered": false,
                    "severity": "safe"
                }
            },
            "prompt_filter_results": {
                "hate": {
                    "filtered": false,
                    "severity": "safe"
                },
                "profanity": {
                    "detected": false,
                    "filtered": false
                },
                "self_harm": {
                    "filtered": false,
                    "severity": "safe"
                },
                "sexual": {
                    "filtered": false,
                    "severity": "safe"
                },
                "violence": {
                    "filtered": false,
                    "severity": "safe"
                }
            },
            "revised_prompt": "A cute little sea otter floating in the water, surrounded by calm waves. The sea otter has soft, brown fur and is holding a small pebble. The scene is set during daylight with sunlight reflecting on the water's surface, creating a serene atmosphere.",
            "url": "https://dalleprodaue.blob.core.windows.net/private/images/5d03da43-1b7a-4052-a7a7-c479587cee7a/generated_00.png?se=2025-06-11T07%3A07%3A34Z&sig=mHlEYbhDKLMZqgdOnN4U9YqkGA32y5rNLuKPQ%2BUwpyA%3D&ske=2025-06-14T08%3A06%3A25Z&skoid=f4f58869-78fa-4857-8a87-4ce5ae4ba8c3&sks=b&skt=2025-06-07T08%3A06%3A25Z&sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d&skv=2020-10-02&sp=r&spr=https&sr=b&sv=2020-10-02"
        }
    ]
}
修改于 2025-06-14 09:16:55
上一页
文生图(基础)
下一页
文生图(base64)
Built with