MaxAPI Docs
  1. Flux API
MaxAPI Docs
  • Quick Start
  • 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
    • Submit Action Task(All associated button actions UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      POST
    • 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
    • Specify ID Query Task
      GET
    • Specify ID Query Task (fetch)
      GET
    • Specify the ID List Query Task
      GET
    • Obtain the seed of the Task Image
      GET
  • Luma video
    • Luma Task Creation
      POST
    • Luma Expand Video
      POST
    • Luma Query Task
      GET
    • Luma Download video
      GET
  • Suno Music
    • Generate music
      POST
    • Query task
      GET
  • Anthropic Claude
    • Claude Chat Completion
  • Flux API
    • Create Image
      POST
  1. Flux API

Create Image

Developing
Main URLs
https://api.maxapi.ai
Main URLs
https://api.maxapi.ai
POST
https://api.maxapi.ai
/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.

Request

Header Params
Authorization
string 
required
Example:
Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxx
Body Params application/json
model
string 
required
Model name.
Examples:
flux-plusflux-pro-2
prompt
string 
required
A text description of the desired image. Maximum length is 1000 characters.
Example:
cat
n
string 
required
The number of images to generate. Must be between 1 and 10.
Example:
1
size
string 
required
The size of the generated image. Must be one of 256x256, 512x512 or 1024x1024.
Example:
1024x1024
Example
{
    "prompt": "couple before a kiss, blonde girl, brunette man, magic, evening, romance",
    "model": "flux-plus",
    "n": 1,
    "size": "1024x1024"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.maxapi.ai/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"
}'

Responses

🟢200OK
application/json
Body
object {0}
Example
{
    "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"
}
Modified at 2024-08-31 10:29:26
Previous
Claude Chat Completion
Built with