The text-to-image pipeline of the AI Subnet allows you to generate high-quality images from text descriptions. This pipeline is powered by the latest diffusion models in the HugginFace text-to-image pipeline.


Warm Models

The current warm model requested for the text-to-image pipeline is:

Furthermore, several Orchestrators are currently maintaining the following model in a ready state:

For faster responses with different text-to-video diffusion models, ask Orchestrators to load it on their GPU via the ai-video channel in Discord Server.

On-Demand Models

The following models have been tested and verified for the text-to-image pipeline:

If a specific model you wish to use is not listed, please submit a feature request on GitHub to get the model verified and added to the list.

Basic Usage Instructions

For a detailed understanding of the text-to-image endpoint and to experiment with the API, see the AI Subnet API Reference.

To generate an image with the text-to-image pipeline, send a POST request to the Gateway’s text-to-image API endpoint:

curl -X POST "https://<gateway-ip>/text-to-image" \
    -H "Content-Type: application/json" \
    -d '{
        "prompt":"A cool cat on the beach",
        "width": 1024,
        "height": 1024

In this command:

  • <gateway-ip> should be replaced with your AI Gateway’s IP address.
  • model_id is the diffusion model for image generation.
  • prompt is the text description for the image.

For additional optional parameters, refer to the AI Subnet API Reference.

After execution, the Orchestrator processes the request and returns the response to the Gateway:

  "images": [
      "nsfw": false,
      "seed": 2562822894,
      "url": "https://<gateway-ip>/stream/d0fc1fc6/8fdf5a94.png"

The url in the response is the URL of the generated image. Download the image with:

curl -O "https://<gateway-ip>/stream/d0fc1fc6/8fdf5a94.png"

API Reference

API Reference

Explore the text-to-image endpoint and experiment with the API in the AI Subnet API Reference.