ImaginePro
HomeDocs
HomeDocs
  1. API Documentation
  • Introduction
  • System Design
  • Get Started
  • My Account
    • Credits
    • Generation Modes
  • API Documentation
    • Generate Image
      POST
    • Get Progress
      GET
    • Upscale
      POST
    • Variation
      POST
    • Zoom
      POST
    • Pan
      POST
    • Reroll
      POST
    • Make Square
      POST
    • Cancel Job
      POST
    • Inpainting
      POST
    • Image to Text (describe)
      POST
    • Image to Image
      POST
    • Face Swap
      POST
    • Blend
      POST
    • History
      GET
    • Generate Image Boost
      POST
    • Button Boost
      POST
    • Prompt Check
      POST
    • Account Info
      GET
    • Generate Image - Flux Model
      POST
    • Remove Background
      POST
  • FLUX API Documentation
    • Generate Image
      POST
    • Upscale Image
      POST
  • DIY Plan Endpoints
    • Queue Management
      • Count jobs in queue
      • Reboot the queue
      • Pause the queue
      • Resume the queue
    • Get Linked Discord Token Details
    • Toggle Linked Discord Token
    • Get Message Trace
    • Get Ban Words List
    • Update Ban Words List
    • Get Linked Account List
    • Get Linked Account queue status
    • Excute MJ commad
  • Guide
    • FAQ
    • Troubleshoot
  • HowTos
    • How to get Discord token, server and channel ID
    • How to use ImaginePro web app
    • How to make ImaginePro API request in Postman
    • How to use Midjourney V6
    • How to link your own Discord account
    • How to debug the ImaginePro web app
  • Web App
    • Credits
  1. API Documentation

Generate Image - Flux Model

POST
https://api.imaginepro.ai/api/v1/flux/imagine
The API to generate your image, in FLUX 1.1 PRO.
Note:
If n > 1, the images fields in the completed response will have all the generated images.
The uri field in the completed response is the first image's URL.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
prompt
string 
required
The imagine prompt, you can also include an image URL or other valid parameters in it, same like you using Midjourney in Discord.
ref
string  | null 
optional
The reference metadata which will return as part of the webhook.
webhookOverride
string  | null 
optional
The webhook URL which the response will send to, the payload of this webhook is same as our Message endpoint.
Default:
YOUR_BACKEND_API_ENDPOINT
timeout
integer  | null 
optional
Custom timeout, default to 900 in seconds
>= 10<= 900
Default:
900
n
integer  | null 
optional
How many images to be generated, default is 1, and maximum to 4
>= 1<= 4
Default:
1
height
integer  | null 
optional
Image height, default to 1024, must be divided by 8
Default:
1024
width
integer  | null 
optional
Image width, default to 1024, must be divided by 8
Default:
1024
aspect_ratio
string  | null 
optional
Aspect ratio of the image, default to 1:1
Default:
1:1
output_format
string  | null 
optional
Image type, default to png, try to use webp to reduce size a lot
Default:
png
output_quality
string  | null 
optional
Image quality, default to 100
Default:
100
model
string  | null 
optional
Different flux model to use, default to flux-1.1-pro
Default:
flux-1.1-pro
Example
{
    "prompt": "string",
    "ref": "string",
    "webhookOverride": "YOUR_BACKEND_API_ENDPOINT",
    "timeout": 900,
    "n": 1,
    "height": 1024,
    "width": 1024,
    "aspect_ratio": "1:1",
    "output_format": "png",
    "output_quality": "100",
    "model": "flux-1.1-pro"
}

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.imaginepro.ai/api/v1/flux/imagine' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "string",
    "ref": "string",
    "webhookOverride": "YOUR_BACKEND_API_ENDPOINT",
    "timeout": 900,
    "n": 1,
    "height": 1024,
    "width": 1024,
    "aspect_ratio": "1:1",
    "output_format": "png",
    "output_quality": "100",
    "model": "flux-1.1-pro"
}'

Responses

🟢200Success
application/json
Body
success
boolean 
required
The status of the request.
messageId
string 
required
The messageId of the request, which will be used for querying the progress, sending subsequential actions later, etc.
createdAt
string 
required
The timestamp of the job creation.
error
string 
optional
The error message, if any
Example
{
    "success": true,
    "messageId": "d15c1541-229a-442b-9873-d3494dede12a",
    "createdAt": "2023-08-01T14:03:01.817Z"
}
Previous
Account Info
Next
Remove Background
Built with