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 Name | Type | Description | Remarks |
---|---|---|---|
prompt | String | Text description of the image to generate | Required |
trigger_word | String | Specific word to trigger the Lora model | Required |
steps | Number | Number of inference steps | Optional. Default is 10. Controls the quality and generation time |
guidance_scale | Number | Controls how closely the model follows the prompt | Optional. Default is 3.5 |
lora_strength | Number | Strength of the Lora model's influence | Optional. Default is 1.0. Value between 0 and 1 |
image_size | String | Size of the output image in format "width*height" | Optional. Default is "768*1024" |
lora_url | String | URL to the Lora model | Required. Must be a valid HTTPS URL |
seed | Number | Random seed for reproducible results | Optional. 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 Name | Type | Description | Remarks |
---|---|---|---|
ids | String | Task ID to query | Required. 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"
}
]