generate

Text To Image

Generate images from text prompts.

post/text-to-image

Request body

model_idstring required

Hugging Face model ID used for image generation.

lorasstring

A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { "latent-consistency/lcm-lora-sdxl": 1.0, "nerijs/pixel-art-xl": 1.2}.

promptstring required

Text prompt(s) to guide image generation. Separate multiple prompts with '|' if supported by the model.

heightinteger

The height in pixels of the generated image.

widthinteger

The width in pixels of the generated image.

guidance_scalenumber

Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality).

negative_promptstring

Text prompt(s) to guide what to exclude from image generation. Ignored if guidance_scale < 1.

safety_checkboolean

Perform a safety check to estimate if generated images could be offensive or harmful.

seedinteger

Seed for random number generation.

num_inference_stepsinteger

Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength.

num_images_per_promptinteger

Number of images to generate per prompt.

Response

Successful Response

Changes

Changed in 9 of the 50 revisions of this API.3036

  • 0dfb43d0278636See the full diff
    • the detail response's property type/format changed from / to object/ for status 400

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 401

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 500

      response-property-type-changed

    • removed APIError from the detail response property allOf list for the response status 400

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 401

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 500

      response-property-all-of-removed

    • added the required property detail/msg to the response with the 400 status

      response-required-property-added

    • added the required property detail/msg to the response with the 401 status

      response-required-property-added

    • added the required property detail/msg to the response with the 500 status

      response-required-property-added

  • 0e0e976fd9e063See the full diff
    • the detail response's property type/format changed from object/ to / for status 400

      response-property-type-changed

    • the detail response's property type/format changed from object/ to / for status 401

      response-property-type-changed

    • the detail response's property type/format changed from object/ to / for status 500

      response-property-type-changed

    • removed the required property detail/msg from the response with the 400 status

      response-required-property-removed

    • removed the required property detail/msg from the response with the 401 status

      response-required-property-removed

    • removed the required property detail/msg from the response with the 500 status

      response-required-property-removed

    • added APIError to the detail response property allOf list for the response status 400

      response-property-all-of-added

    • added APIError to the detail response property allOf list for the response status 401

      response-property-all-of-added

    • added APIError to the detail response property allOf list for the response status 500

      response-property-all-of-added

  • 0dfb43d0278636See the full diff
    • the detail response's property type/format changed from / to object/ for status 400

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 401

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 500

      response-property-type-changed

    • removed APIError from the detail response property allOf list for the response status 400

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 401

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 500

      response-property-all-of-removed

    • added the required property detail/msg to the response with the 400 status

      response-required-property-added

    • added the required property detail/msg to the response with the 401 status

      response-required-property-added

    • added the required property detail/msg to the response with the 500 status

      response-required-property-added

  • 0579502149da63See the full diff
    • the detail response's property type/format changed from object/ to / for status 400

      response-property-type-changed

    • the detail response's property type/format changed from object/ to / for status 401

      response-property-type-changed

    • the detail response's property type/format changed from object/ to / for status 500

      response-property-type-changed

    • removed the required property detail/msg from the response with the 400 status

      response-required-property-removed

    • removed the required property detail/msg from the response with the 401 status

      response-required-property-removed

    • removed the required property detail/msg from the response with the 500 status

      response-required-property-removed

    • added APIError to the detail response property allOf list for the response status 400

      response-property-all-of-added

    • added APIError to the detail response property allOf list for the response status 401

      response-property-all-of-added

    • added APIError to the detail response property allOf list for the response status 500

      response-property-all-of-added

  • e0203b5e3aff36See the full diff
    • the detail response's property type/format changed from / to object/ for status 400

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 401

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 500

      response-property-type-changed

    • removed APIError from the detail response property allOf list for the response status 400

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 401

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 500

      response-property-all-of-removed

    • added the required property detail/msg to the response with the 400 status

      response-required-property-added

    • added the required property detail/msg to the response with the 401 status

      response-required-property-added

    • added the required property detail/msg to the response with the 500 status

      response-required-property-added

  • 494e040533b463See the full diff
    • the detail response's property type/format changed from object/ to / for status 400

      response-property-type-changed

    • the detail response's property type/format changed from object/ to / for status 401

      response-property-type-changed

    • the detail response's property type/format changed from object/ to / for status 500

      response-property-type-changed

    • removed the required property detail/msg from the response with the 400 status

      response-required-property-removed

    • removed the required property detail/msg from the response with the 401 status

      response-required-property-removed

    • removed the required property detail/msg from the response with the 500 status

      response-required-property-removed

    • added APIError to the detail response property allOf list for the response status 400

      response-property-all-of-added

    • added APIError to the detail response property allOf list for the response status 401

      response-property-all-of-added

    • added APIError to the detail response property allOf list for the response status 500

      response-property-all-of-added

  • 0d725f57417336See the full diff
    • the detail response's property type/format changed from / to object/ for status 400

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 401

      response-property-type-changed

    • the detail response's property type/format changed from / to object/ for status 500

      response-property-type-changed

    • removed APIError from the detail response property allOf list for the response status 400

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 401

      response-property-all-of-removed

    • removed APIError from the detail response property allOf list for the response status 500

      response-property-all-of-removed

    • added the required property detail/msg to the response with the 400 status

      response-required-property-added

    • added the required property detail/msg to the response with the 401 status

      response-required-property-added

    • added the required property detail/msg to the response with the 500 status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property loras

      new-optional-request-property

    • api operation id text_to_image removed and replaced with genTextToImage

      api-operation-id-removed

    • api tag generate added

      api-tag-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog