Saltar al contenido principal

Generate an image from stored images

POST 

/api/v2/Image/generate/file

Creates a new image from the source images following the prompt, e.g. to edit one image or combine several. Only models that accept source images support it, each up to its own number of images. The generated image is uploaded as a public file and a download URL is returned.

Request​

Query Parameters

    culture string

    Use this param to override the culture of the response. Options: - en (default) - es

Body

The request containing the source file ids, the prompt, and optional model and user identifier.

    modelId uuidnullable

    The AI Model Id to use for image generation.

    fileIds uuid[]required

    Possible values: >= 1, <= 16

    The ids of the source images, in the order the prompt refers to them. The files must already exist in the system.

    prompt stringrequired

    Possible values: non-empty and <= 32000 characters

    How to combine or change the source images.

    userIdentifier stringnullable

    Possible values: <= 256 characters

    Optional user identifier for tracking and cost management purposes.

    channel stringnullable

    Possible values: <= 64 characters

    The channel used in the execution.

Responses​

Returns the generated image.

Schema

    instanceId uuid
    imageUrl stringnullable

    cost

    object

    amount double
    currency stringnullable

    usage

    object

    inputUnit stringnullable
    input int32nullable
    outputUnit stringnullable
    output int32nullable
Loading...