Skip to main content
POST
/
v1
/
images
/
generations
Images Generations
curl --request POST \
  --url https://api.algo-tech.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "black-forest-labs/flux-1-dev",
  "prompt": "The sky is",
  "width": 1024,
  "height": 1024,
  "num_inference_steps": 10
}'
This response does not have an example.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
default:Bearer <API_KEY>
required

Bearer authentication header of the form Bearer <API_KEY>, where <API_KEY> is your auth token.

Accept
enum<string>

Specifies which format to return the response in. With image/png and image/jpeg, the server will populate the response body with a binary image of the specified format. With application/json, the server will populate the response body with schema {base64: [string, ...], finishReason: string enum [SUCCESS, CONTENT_FILTERED], seed: int}. base64 contains a list of base64-encoded image files in PNG format. finishReason is SUCCESS unless safety_check=true and the image response was filtered. seed is the seed that was used when generating the image.

Available options:
image/png,
image/jpeg,
application/json

Body

application/json
model
string

The name of the model to use.

Example:

"black-forest-labs/flux-1-dev"

prompt
string

The prompt to generate completions for. It can be a single string or an array of strings. It can also be an array of integers or an array of integer arrays, which allows to pass already tokenized prompt. If multiple prompts are specified, several choices with corresponding index will be returned in the output."

Example:

"The sky is"

width
integer
default:1024

Width

Required range: 512 <= x <= 2048
height
integer
default:1024

Height

Required range: 512 <= x <= 2048
num_inference_steps
integer
default:10

Number of steps to use for the image generation process.

Required range: 1 <= x <= 30
Example:

10

Response

OK