Skip to main content

Flux Schnell

Text to image with in-house optimised Flux Schnell base model.

Tip
  • Generate v3 with Flux is currenly available on dedicated servers.
  • Test servers are available at $1/hour price. You can generate as many images as you like during this time.

import requests
import json

url = "https://api.imagepipeline.io/generate/v3"
headers = {
"API-Key": "Your API Key"
}
data = {
"prompt": "High end wildlife photography, beautiful colourful toucan sitting on a tree branch, trending on artstation",
"width": 1024,
"height": 1024,
"server_id": "your-server-id"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())

Available JSON Parameters for Control

ParameterTypeNotes
promptstringrequired. The prompt text for generating the image.
negative_promptstringOptional. The negative prompt to influence the image generation.
num_inference_stepsintegerDefault: 20. Number of inference steps.
samplesintegerMax: 4. Default: 2. Number of image samples to generate.
heightintegerMax: 1536. Default: 1024. Height of the image.
widthintegerMax: 1536. Default: 1024. Width of the image.
seedintegerDefault: -1. Controlling the seed can help you generate reproducible images.
direct_linkbooleanFetches the friendly URL in PNG format.
server_idstringOptional. Provide a server ID to use an enterprise subscription or for load-balancing.
webhookstringURL to send the generated image to.
batch_idstringAdds a batch ID for the image generation request.
file_prefixstringAdds a prefix to the generated files.
queued_image_urlsbooleanReturns the links of the images prematurely. The link will have the image once the task is run successfully.

Status

Your response will include a status.

  • If the status = SUCCESS, you will also have download_urls that will have the links to your generated image based on the number of samples you have entered. The maximum number of samples that can be generated is 4.
  • If the status = PENDING, you will receive a id. You can use the status endpoint to fetch your image using the id.
  • If the status = FAILURE, you will receive only an error message.

Endpoint: [GET]

  • https://api.imagepipeline.io/generate/v3/status/{{id}}

Pass the API-Key as the authorization in the header.