Image Generation

Job request to generate Images using AI models.

Input

Clients must provide a prompt in the "i" tag field. For altering existing images user may optionally provide a second "i" tag containing the url to the existing image

Params

model

Description: Specifies the identifier for the AI model to be used for the image generation task. Different models might produce different outcomes.

Usage: Set this parameter to the specific ID or name of the AI model you wish to use. This is especially useful if you have multiple models available and you want to select a particular one for a task. Ensure that the specified model is compatible with the task at hand and has been adequately trained or fine-tuned for optimal results.

lora

Description: Specifies the identifier of a lora. A lora provides weights that can be applied on top of a model. Users can combine models and loras to create unique images.

ratio

Description: The Ratio of the output image. Allowed ratios are: 1:1 4:3 16:9 16:10 3:4 9:16 10:16

negative_prompt

Description: Define a negative prompt that includes what the model should avoid during Generation. This sometimes helps improving the outcome quality

size

Description: Specifies in the format of ${width}x${height} (i.e 512x512, 1024x768) the exact size/dimension the image will be generated in. This param takes precedence over ratio. DVMs SHOULD ignore the job request if unable to fulfill the requested size

Output

A link to the generated image(s)

Example 1

Generates an output image based on the input prompt and params

{
    "content": "",
    "kind": 5100,
    "tags": [
        [ "i", "A purple ostrich watching the sunset", "text" ],
        [ "param", "ratio", "4:3"],
        [ "param",  "negative_prompt", "broken hands, bad quality"]
    ]
}

Example 2

Converts the style of an input image

{
    "content": "",
    "kind": 5100,
    "tags": [
        [ "i", "https://image.nostr.build/cbfedf544d1ab82d26332bf70c1ea55b8f275ae59a04c3dac175d9cae536725e.jpg", "url" ],
        [ "i", "In style of Pablo Picasso", "text" ]
        [ "param", "size", "512x512" ]
    ]
}