Xalora AI Docs
  • Getting Started
    • Welcome to Xalora
  • Agent Framework
    • Social Agents
  • Xalora Mesh
  • Ecosystem
    • Xalora Imagine
  • imaginaries NFT
  • Developer Reference
    • Integration Overview
  • Supported Models
  • Understanding Image Prompting
  • Using Xalora API with Eliza
  • REST API
    • Xalora Mesh API
  • Synchronous Request
  • Image Generation API
  • Xalora SDK
    • Introduction
  • Getting Started
  • Basic Image Generation
  • SmartGen
  • ComfyUI Workflow
  • FluxLora Workflow
  • Text2Video Workflow
  • LLM Gateway
    • Introduction
  • LLM Tool Calling
  • Embeddings
Powered by GitBook
On this page
  • ​Example Request
  • ​Example Response
  • ​Workflow ID Mapping
  • ​Parameters
  • ​Returns
  • ​Authentication
  • ​Types

FluxLora Workflow

PreviousComfyUI WorkflowNextText2Video Workflow

Last updated 7 days ago

Generate images from text descriptions using LoRA models with advanced AI.

This workflow extends the base ComfyUI Workflow functionality to support text-to-image generation using LoRA models.

Example Request

Copy

import Xalora from 'xalora'

const xalora = new Xalora({
  apiKey: process.env['XALORA_API_KEY']
});

async function generateImage() {
  const fluxLoraTask = new FluxLoraTask({
    workflow_id: '3',
    prompt: 'A photo of GECKO with dark green skin spots playing american football, cartoon, comic, anime',
    lora_name: 'gecko',
    timeout_seconds: 300 // optional
  });

  const response = await Xalora.workflow.executeWorkflowAndWaitForResult(
    fluxLoraTask,
    600000,  // 10 minutes timeout
    3000     // 3 seconds polling interval
  );

  console.log('Generated image URL:', response.result);
}

Copy

{
  "task_id": "9034a6ca80",
  "task_type": "txt2img",
  "workflow_id": "3",
  "status": "finished",
  "timeout_seconds": 300,
  "create_timestamp": 1738916890,
  "result": "https://sequencer-v2.Xalora.xyz/files/flux-lora/flux-lora-0x737c3fcc8def561dbE0D3de8Cc3B0646574b7651-9034a6ca80.jpg",
  "miner_id": "0x737c3fcc8def561dbE0D3de8Cc3B0646574b7651",
  "queue_position": 1,
  "inference_latency": 18.42825,
  "msg": ""
}
Workflow ID
Model

3

FluxLora

Type: FluxLoraTask

Property
Type
Required
Description

workflow_id

string

true

The ID of the workflow to execute.

prompt

string

true

The prompt to use for the video generation.

lora_name

string

true

The name of the LoRA model to use.

width

number

false

The width of the image. Default is 680.

height

number

false

The height of the image. Default is 1024.

steps

number

false

The number of steps to use for the image generation. Default is 15.

noise_seed

number

false

The seed to use for the image generation. Default is 966993914913986.

job_id_prefix

string

false

An optional prefix for the job ID. Default is “sdk-workflow”.

timeout_seconds

number

false

The timeout for the task in seconds. If the task is not finished within the timeout, it will be canceled.

consumer_id

string

false

The ID of the consumer.

api_key

string

false

The API key of the consumer.

Type: WorkflowTaskResult

Property
Type
Required
Description

task_id

string

true

The ID of the executed task.

status

enum

true

The status of the task.

result

any

false

The result of the task, if available.

task_details

any

false

The details of the task, if available.

timeout_seconds

number

false

The timeout for the task in seconds.

workflow_id

string

false

The ID of the workflow that executed the task.

create_timestamp

number

false

The timestamp when the task was created.

inference_latency

number

false

The latency of the inference in seconds.

upload_latency

number

false

The latency of the upload in seconds.

Authentication uses a combined consumer ID and API key format: consumerId#apiKey. You can provide these in two ways:

  1. In the Xalora client initialization using environment variables:

Copy

const Xalora = new Xalora({
  apiKey: process.env['XALORA_API_KEY']  // format: consumerId#apiKey
});
  1. In the FluxLoraTask object, the task-specific values will override the client defaults if provided.

Copy

const fluxLoraTask = new FluxLoraTask({
  consumer_id: 'consumerId',
  api_key: 'apiKey',
  ...
});

FluxLoraTask

A class representing a FluxLora task, extending the abstract WorkflowTask class.

Copy

class FluxLoraTask extends WorkflowTask {
  constructor(options: FluxLoraTaskOptions)
  get task_type(): WorkflowTaskType.FluxLora
  get task_details(): {
    parameters: {
      prompt: string
      lora_name: string
      width?: number
      height?: number
      steps?: number
      noise_seed?: number
    }
  }
}

WorkflowTaskType

An enum representing the types of workflow tasks.

Copy

enum WorkflowTaskType {
  FluxLora = 'flux-lora'
}

Example Response

Workflow ID Mapping

Parameters

Returns

Authentication

Types

​
​
​
​
​
​
​