Skip to main content

Flux Lora

Basic API Configuration

Base URL: https://api.foxaihub.com/api/v1

Headers Parameters:

{
"api-key": "Your API Key",
}
warning

The parameter is api-key instead of api_key.

Create Flux-Lora Task

Path: /flux_lora/tasks

Method: POST

Type: application/json

Parameters:

Parameter NameTypeDescriptionRemarks
promptStringText description of the image to generateRequired
trigger_wordStringSpecific word to trigger the Lora modelRequired
stepsNumberNumber of inference stepsOptional. Default is 10. Controls the quality and generation time
guidance_scaleNumberControls how closely the model follows the promptOptional. Default is 3.5
lora_strengthNumberStrength of the Lora model's influenceOptional. Default is 1.0. Value between 0 and 1
image_sizeStringSize of the output image in format "width*height"Optional. Default is "768*1024"
lora_urlStringURL to the Lora modelRequired. Must be a valid HTTPS URL
seedNumberRandom seed for reproducible resultsOptional. Default is random

Example Request:

POST /flux_lora/tasks HTTP/1.1
Content-Type: application/json
api-key: your_api_key_here

{
"prompt": "A beautiful landscape with mountains",
"trigger_word": "landscape",
"steps": 10,
"guidance_scale": 3.5,
"lora_strength": 1.0,
"image_size": "768*1024",
"lora_url": "https://example.com/lora-model",
"seed": 42
}

Example Response:

{
"success": true,
"status": "pending",
"task_id": "432xx446-3275-46e5-8f22-s976eb7a4caa",
"gen_params": {
"prompt": "A beautiful landscape with mountains",
"trigger_word": "landscape",
"steps": 10,
"guidance_scale": 3.5,
"lora_strength": 1.0,
"image_size": "768*1024",
"lora_url": "https://example.com/lora-model",
"seed": 42
},
"data": {},
"created_at": "2025-04-21T10:57:32.452Z"
}

Query Task Status

Path: /flux_lora/task

Method: GET

Type: application/json

Query Parameters:

Parameter NameTypeDescriptionRemarks
idsStringTask ID to queryRequired. Can be obtained from the create task response

Example Request:

GET /flux_lora/task?ids=432xx446-3275-46e5-8f22-s976eb7a4caa HTTP/1.1
Content-Type: application/json
api-key: your_api_key_here

Example Response:

[
{
"status": "completed",
"task_id": "432xx446-3275-46e5-8f22-s976eb7a4caa",
"gen_params": {
"prompt": "A beautiful landscape with mountains",
"trigger_word": "landscape",
"steps": 10,
"guidance_scale": 3.5,
"lora_strength": 1.0,
"image_size": "768*1024",
"lora_url": "https://example.com/lora-model",
"seed": 42
},
"data": [
"https://cdn2.foxai.me/flux-lora-images/landscape-432xx446.png"
],
"created_at": "2025-04-21T10:52:16.000Z"
}
]