B3n-AI API 文档
  1. 图像生成
  • OpenAI
    • README
    • 使用 OpenAI 官方 Python 包
    • 对话
      • gpt-3.5-turbo
      • gpt-4
      • gpt-4-turbo
      • gpt-4o
      • gpt-4o-mini
      • o1-preview
      • o1-mini
    • 多模态-图片
      • gpt-4-turbo
      • gpt-4o
      • gpt-4o-mini
    • 图像生成
      • DALL-E-3
        POST
    • 文本向量化
      • text-embedding-ada-002
      • text-embedding-3-small
      • text-embedding-3-large
    • 文本转语音
      • tts-1
      • tts-1-hd
    • 语音转文本
      • 转录
        • whisper-1
    • JSON mode
      • gpt-3.5-turbo
      • gpt-4-turbo
      • gpt-4o
    • Tools Call
      • gpt-3.5-turbo
      • gpt-4
      • gpt-4-turbo
      • gpt-4o
    • 逆向模型
      • gpt-4-all
      • gpt-4o-all
      • gpts
      • search-gpts
  • Anthropic
    • README
    • 使用 Anthropic 官方 Python 包
    • 对话 ( 适配为 OpenAI 格式 )
      • claude-3-opus-latest
      • claude-3-5-sonnet-latest
      • claude-3-5-haiku-latest
    • 图像分析 ( 适配为 OpenAI 格式 )
      • claude-3-opus-latest
      • claude-3-5-sonnet-latest
      • claude-3-5-haiku-latest
  • Google
    • 对话
      • gemini-1.5-flash-latest
      • gemini-1.5-pro-latest
    • 图像识别
      • gemini-1.5-flash-latest
      • gemini-1.5-pro-latest
  • 用户个人信息查询
    GET
  1. 图像生成

DALL-E-3

POST
https://api.b3n.fun/v1/images/generations

请求参数

Header 参数
Authorization
string 
必需
示例值:
{{KEY}}
Body 参数application/json
model
string 
必需
prompt
string 
必需
n
integer 
必需
size
string 
必需
示例
{
  "model": "dall-e-3",
  "prompt": "a white siamese cat",
  "n": 1,
  "size": "1024x1024"
}

示例代码

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.b3n.fun/v1/images/generations' \
--header 'Authorization: sk-abc' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "dall-e-3",
  "prompt": "a white siamese cat",
  "n": 1,
  "size": "1024x1024"
}'

返回响应

🟢200成功
application/json
Body
created
integer 
必需
data
array [object {2}] 
必需
revised_prompt
string 
可选
url
string 
可选
示例
{
  "created": 1726381830,
  "data": [
    {
      "revised_prompt": "Create a detailed image of a Siamese cat featuring its signature sleek, short, and glossy coat that is predominantly white in color. The cat should possess striking blue almond-shaped eyes, which are a characteristic trait of this breed. Its ears, paws, tail, and mask should be darker, consistent with the unique color-point pattern that Siamese cats are known for. The environment should be comfortable and homely, perhaps with a soft carpet or a warm blanket nearby for the cat to cozy up in. The cat's stance should depict elegance and grace, inherent traits of this exotic breed.",
      "url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-RNgYUEswmoeVDC6Ta92lJvyX/user-rnKAAtSiEyuaNpCddZDl0mb6/img-sxoWVi7llzk2j8rDJmHfsWcn.png?st=2024-09-15T05%3A30%3A30Z&se=2024-09-15T07%3A30%3A30Z&sp=r&sv=2024-08-04&sr=b&rscd=inline&rsct=image/png&skoid=d505667d-d6c1-4a0a-bac7-5c84a87759f8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-09-14T23%3A38%3A38Z&ske=2024-09-15T23%3A38%3A38Z&sks=b&skv=2024-08-04&sig=U/viKKHYVRtFm9lFWxKXouD/Q7STp6q6FbE3oC1S4U4%3D"
    }
  ]
}
上一页
gpt-4o-mini
下一页
text-embedding-ada-002
Built with