Interface ImageProjectParams

interface ImageProjectParams {
    appSource?: string;
    attribution?: WorkloadAttributionInput;
    billingMode?: BillingMode;
    contextImages?: InputMedia[];
    controlNet?: ControlNetParams;
    disableNSFWFilter?: boolean;
    gptImageBackground?: GptImageBackground;
    gptImageQuality?: GptImageQuality;
    guidance?: number;
    height?: number;
    loras?: string[];
    loraStrengths?: number[];
    modelId: string;
    negativePrompt?: string;
    network?: SupernetType;
    numberOfMedia: number;
    numberOfPreviews?: number;
    outputFormat?: ImageOutputFormat;
    positivePrompt: string;
    sampler?: string;
    scheduler?: string;
    seed?: number;
    sizePreset?: string;
    startingImage?: InputMedia;
    startingImageStrength?: number;
    steps?: number;
    stylePrompt?: string;
    tokenType?: TokenType;
    type: "image";
    vae?: string;
    width?: number;
}

Hierarchy (View Summary)

Properties

appSource?: string

Optional client app/source label to attach to the project request for server-side attribution.

Optional workload attribution for this project. Fields override the immutable defaults configured on SogniClient.

billingMode?: BillingMode

Select how eligible jobs should be billed.

  • auto: use Unlimited subscription coverage when available, otherwise use tokens.
  • subscription: require Unlimited subscription coverage; fail if unavailable.
  • tokens: opt out of Unlimited coverage and use Spark/SOGNI tokens.
contextImages?: InputMedia[]

Context images for multi-reference image generation. GPT Image 2 supports up to 16 context images. Qwen Image Edit supports up to 3 context images. Krea 2 Identity Edit supports up to 2 context images. Flux Kontext supports up to 2 context images.

controlNet?: ControlNetParams

ControlNet model parameters

disableNSFWFilter?: boolean

Requested content-filter policy. The server remains authoritative.

gptImageBackground?: GptImageBackground

GPT Image 2 background mode. Only used by external OpenAI image models.

gptImageQuality?: GptImageQuality

GPT Image 2 quality preset. Only used by external OpenAI image models. Defaults to 'medium'.

guidance?: number

Guidance scale. For most Stable Diffusion models, optimal value is 7.5. For video models: Regular models range 0.7-8.0, LoRA version (lightx2v) range 0.7-1.6, step 0.01. This maps to guidanceScale in the keyFrame for both image and video models.

height?: number

Output image height. Only used if sizePreset is "custom"

loras?: string[]

LoRA IDs to apply, in the order they should be chained.

Which LoRAs are available depends on the model; the Krea 2 family carries the largest set. Workers download a LoRA on first use, so the first render with an uncached one takes longer to start.

Order is significant. The LoRAs are applied in sequence and the same set in a different order produces a measurably different image, because these models run fp8-quantized and the patches do not commute.

Up to 8 per render. IDs are resolved to filenames by the worker. Example: ['krea2-detail-enhancer', 'krea2-amateur']

loraStrengths?: number[]

Strength for each entry in loras, positionally matched. Defaults to 1.0.

Not restricted to positive values. Most Krea 2 LoRAs are bipolar sliders where a negative strength applies the inverse effect and 0 does nothing - Warm Light warms at 2 and cools at -2. Each LoRA has its own valid range and its author's recommended band; values outside the valid range are clamped server-side, and pushing past the recommended band usually costs detail rather than adding effect.

Example: [3, -2]

modelId: string

ID of the model to use, available models are available in the availableModels property of the ProjectsApi instance.

negativePrompt?: string

Prompt for what to be avoided. LTX 2.5, LTX 2.3, and WAN video workflows accept this field; provider workflows such as MiniMax H3 and Seedance do not. If not provided, the server or workflow default is used.

network?: SupernetType

Override current network type. Default value can be read from sogni.account.currentAccount.network

numberOfMedia: number

Number of media files to generate. Depending on project type, this can be number of images or number of videos.

numberOfPreviews?: number

Number of previews to generate. Note that previews affect project cost

outputFormat?: ImageOutputFormat

Output format. Can be 'png' or 'jpg'. Defaults to 'png'.

positivePrompt: string

Prompt for what to be created

sampler?: string

Sampler, available options depend on the model. Use sogni.projects.getModelOptions(modelId) to get the list of available samplers.

scheduler?: string

Scheduler, available options depend on the model. Use sogni.projects.getModelOptions(modelId) to get the list of available schedulers.

seed?: number

Seed for one of images in project. Other will get random seed. Must be Uint32

sizePreset?: string

Size preset ID to use. You can query available size presets from sogni.projects.sizePresets(network, modelId)

startingImage?: InputMedia

Starting image for img2img workflows. Supported types: File - file object from input[type=file] Buffer - Node.js buffer object with image data Blob - blob object with image data true - indicates that the image is already uploaded to the server

startingImageStrength?: number

How strong effect of starting image should be. From 0 to 1, default 0.5

steps?: number

Number of steps. For most Stable Diffusion models, optimal value is 20.

stylePrompt?: string

Image style prompt. If not provided, server default is used.

tokenType?: TokenType

Select which tokens to use for the project. If not specified, the Sogni token will be used.

type: "image"
vae?: string

VAE filename, available options depend on the model. Use sogni.projects.getModelOptions(modelId) to get the list of available VAEs.

width?: number

Output image width. Only used if sizePreset is "custom"