xfusionai
  1. Flux API
xfusionai
  • 产品介绍
  • 模型价格
  • 快速开始
  • Azure语音服务
  • Azure翻译服务
  • Azure open AI
  • 常见问题
  • OpenAI API
    • About OpenAI Compatible API
    • Chat
      • Chat Completion
    • Images
      • Create Image
    • Audio
      • Text To Speech API
  • Midjourney Open API
    • About Midjourney and Prices
    • Submit Imagine Task
      POST
    • Specify ID Query Task (fetch)
      GET
    • Specify the ID List Query Task
      GET
    • Obtain the seed of the Task Image
      GET
    • Specify ID Query Task
      GET
    • Submit Blend Task
      POST
    • Submit Modal Task
      POST
    • Submit Describe Task
      POST
    • Submit Shorten Task
      POST
    • Submit FaceSwap Task
      POST
    • Upload Files to Discord
      POST
    • Submit Action Task(All associated button actions UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      POST
  • Luma video
    • Luma Task Creation
      POST
    • Luma Expand Video
      POST
    • Luma Query Task
      GET
    • Luma Download video
      GET
  • Suno Music
    • Generate music
    • Query task
  • Anthropic Claude
    • Claude Chat Completion
  • Flux API
    • Create Image
      POST
  1. Flux API

Create Image

开发中
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v1/images/generations
Model Capabilities:
Flux-plus is optimized based on Flux-Schnell. It has surpassed the official dev model in some scenarios and is approaching the pro model. Its price is 1/8.33 of the official dev model, 1/16.66 of the pro model, and 1/13.33 of the dall-e-3.
Model Pricing:
For resolutions 1024*1024 and below:
Flux-plus: $0.003 per image
Flux-pro-2: $0.006 per image
For resolutions above 1024*1024:
Price * 2
Parameter Suggestions:
( n ): Currently set to 1, official release will support 1-4.
Size: Customizable.
Update Preview:
1.
Support for custom generation quantities.
2.
Support for asynchronous callbacks.
3.
Support for multi-interface mode.

请求参数

Header 参数
Authorization
string 
必需
示例值:
Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxx
Body 参数application/json
model
string 
必需
Model name.
示例值:
flux-plusflux-pro-2
prompt
string 
必需
A text description of the desired image. Maximum length is 1000 characters.
示例值:
cat
n
string 
必需
The number of images to generate. Must be between 1 and 10.
示例值:
1
size
string 
必需
The size of the generated image. Must be one of 256x256, 512x512 or 1024x1024.
示例值:
1024x1024
示例
{
    "prompt": "couple before a kiss, blonde girl, brunette man, magic, evening, romance",
    "model": "flux-plus",
    "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 'http://dev-cn.your-api-server.com/v1/images/generations' \
--header 'Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "couple before a kiss, blonde girl, brunette man, magic, evening, romance",
    "model": "flux-plus",
    "n": 1,
    "size": "1024x1024"
}'

返回响应

🟢200OK
application/json
Body
object {0}
示例
{
    "images": [
        {
            "url": "https://flux-images.maxapi.ai/outputs/686a7b08-c678-4020-ac3a-ce90ef508f34_0.png",
            "width": "1024",
            "height": "1024",
            "content_type": "image/jpeg"
        }
    ],
    "timings": {
        "inference": 0.725739479996264
    },
    "seed": 1118944383,
    "has_nsfw_concepts": [
        false,
        false
    ],
    "prompt": "couple before a kiss, blonde girl, brunette man, magic, evening, romance"
}
修改于 2024-11-09 17:14:40
上一页
Claude Chat Completion
Built with