You can use cURL or any other http client to run inferences:
curl -X POST \
-d '{"prompt": "The biggest cake in the middle of a black forest"}' \
-H "Authorization: bearer $DEEPINFRA_TOKEN" \
-H 'Content-Type: application/json' \
'https://api.deepinfra.com/v1/inference/black-forest-labs/FLUX-pro'
which will give you back something similar to:
{
"status": "ok",
"image_url": "/model/inference/flux_pro_cake.jpg",
"request_id": null,
"inference_status": {
"status": "unknown",
"runtime_ms": 0,
"cost": 0.0,
"tokens_generated": 0,
"tokens_input": 0
}
}
width
integerWidth of the generated image in pixels. Must be a multiple of 32
Default value: 1024
Range: 256 ≤ width ≤ 1440
height
integerHeight of the generated image in pixels. Must be a multiple of 32
Default value: 1024
Range: 256 ≤ height ≤ 1440
prompt_upsampling
booleanWhether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation
Default value: false
guidance_scale
numberGuidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism
Default value: 3
Range: 1.5 ≤ guidance_scale ≤ 5
safety_tolerance
integerTolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict
Default value: 2
Range: 0 ≤ safety_tolerance ≤ 6
interval
numberInterval is a setting that increases the variance in possible outputs letting the model be a tad more dynamic in what outputs it may produce in terms of composition, color, detail, and prompt interpretation. Setting this value low will ensure strong prompt following with more consistent outputs, setting it higher will produce more dynamic or varied outputs
Default value: 2
Range: 1 ≤ interval ≤ 4
webhook
fileThe webhook to call when inference is done, by default you will get the output in the response of your inference request