Input
   
POST https://gateway.appypie.com/getImage/v1/getSDXLImage HTTP/1.1

Content-Type: application/json
Cache-Control: no-cache

{
    "prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow's feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
    "negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
    "height": 1024,
    "width": 1024,
    "num_steps": 20,
    "guidance_scale": 5,
    "seed": 40
}
import urllib.request, json

try:
    url = "https://gateway.appypie.com/getImage/v1/getSDXLImage"

    hdr ={
    # Request headers
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    }

    # Request body
    data =  
    data = json.dumps(data)
    req = urllib.request.Request(url, headers=hdr, data = bytes(data.encode("utf-8")))

    req.get_method = lambda: 'POST'
    response = urllib.request.urlopen(req)
    print(response.getcode())
    print(response.read())
    except Exception as e:
    print(e)

                                    
// Request body
const body = {
    "prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow's feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
    "negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
    "height": 1024,
    "width": 1024,
    "num_steps": 20,
    "guidance_scale": 5,
    "seed": 40
};

fetch('https://gateway.appypie.com/getImage/v1/getSDXLImage', {
        method: 'POST',
        body: JSON.stringify(body),
        // Request headers
        headers: {
            'Content-Type': 'application/json',
            'Cache-Control': 'no-cache',}
    })
    .then(response => {
        console.log(response.status);
        console.log(response.text());
    })
    .catch(err => console.error(err));
   curl -v -X POST "https://gateway.appypie.com/getImage/v1/getSDXLImage" -H "Content-Type: application/json" -H "Cache-Control: no-cache" --data-raw "{
    \"prompt\": \"High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow's feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.\",
    \"negative_prompt\": \"Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.\",
    \"height\": 1024,
    \"width\": 1024,
    \"num_steps\": 20,
    \"guidance_scale\": 5,
    \"seed\": 40
}"
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import java.io.UnsupportedEncodingException;
import java.io.DataInputStream;
import java.io.InputStream;
import java.io.FileInputStream;

public class HelloWorld {

  public static void main(String[] args) {
    try {
        String urlString = "https://gateway.appypie.com/getImage/v1/getSDXLImage";
        URL url = new URL(urlString);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();

        //Request headers
    connection.setRequestProperty("Content-Type", "application/json");
    
    connection.setRequestProperty("Cache-Control", "no-cache");
    
        connection.setRequestMethod("POST");

        // Request body
        connection.setDoOutput(true);
        connection
            .getOutputStream()
            .write(
             "{ \"prompt\": \"High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow's feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.\", \"negative_prompt\": \"Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.\", \"height\": 1024, \"width\": 1024, \"num_steps\": 20, \"guidance_scale\": 5, \"seed\": 40 }".getBytes()
             );
    
        int status = connection.getResponseCode();
        System.out.println(status);

        BufferedReader in = new BufferedReader(
            new InputStreamReader(connection.getInputStream())
        );
        String inputLine;
        StringBuffer content = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            content.append(inputLine);
        }
        in.close();
        System.out.println(content);

        connection.disconnect();
    } catch (Exception ex) {
      System.out.print("exception:" + ex.getMessage());
    }
  }
}
$url = "https://gateway.appypie.com/getImage/v1/getSDXLImage";
$curl = curl_init($url);

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

# Request headers
$headers = array(
    'Content-Type: application/json',
    'Cache-Control: no-cache',);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

# Request body
$request_body = '{
    "prompt": "High-resolution, realistic image of a sparrow bird perched on a blooming cherry blossom branch during springtime. The sparrow's feathers should be finely detailed with natural colors, including shades of brown and white. The background should be soft-focused with a clear blue sky, creating a serene and peaceful atmosphere.",
    "negative_prompt": "Low-quality, blurry image, with any other birds or animals. Avoid abstract or cartoonish styles, dark or gloomy atmosphere, unnecessary objects or distractions in the background, harsh lighting, and unnatural colors.",
    "height": 1024,
    "width": 1024,
    "num_steps": 20,
    "guidance_scale": 5,
    "seed": 40
}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $request_body);

$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
Output
SDXL API

Stable Diffusion XL (SDXL): A Powerful Text-to-image Generation Model

meta

Stable Diffusion XL (SDXL), developed by Stability AI, is a leading-edge text-to-image generation model that has redefined the landscape of AI image generation. As a reverse-engineered version of stabilityai/stable-diffusion, SDXL is renowned for its ability to interpret concise text prompts with remarkable efficiency, producing stunning, high-quality visuals that push the boundaries of creativity. By building on the strengths of its predecessors, Stable Diffusion XL 1.0 excels in generating diverse image variations through advanced techniques such as image-to-image prompting. Using latent diffusion technology, SDXL delivers visually appealing images that accurately reflect the input prompts, offering unparalleled prompt understanding. Its ability to create photorealistic, intricate images makes it a valuable tool for applications ranging from digital art and advertising to entertainment and branding, making it a game-changer for creative industries.

The Stable Diffusion XL (SDXL) API extends the power of this model to developers, designers, and creatives, enabling easy integration into various applications and platforms. With the SDXL API, users can effortlessly generate photorealistic images from text prompts, unlocking new possibilities for content creation, design, and visualization. Whether for marketing, entertainment, or artistic projects, the SDXL API offers consistent, reliable results with high-quality image modifications and AI-driven text-to-image editing. Its versatility and ease of use make it an essential tool for enhancing creative projects, allowing professionals and enterprises to explore new levels of innovation in image generation. By combining efficiency, flexibility, and scalability, the SDXL API empowers users to transform ideas into reality with precision and speed, making it a must-have resource for anyone looking to elevate their visual content.

Pricing

This image generation API is offered on a monthly subscription basis.

Basic$19/month

  • 5,000 API calls/month
  • Personalized API key
  • API Documentation
  • Personalized support
  • Cancel anytime

Standard$49/month

  • 15,000 API calls/month
  • $0.004 per API calls after exceeding the monthly limit.
  • Personalized API key
  • API Documentation
  • Personalized support
  • Cancel anytime

Pro$99/month

  • 40,000 API calls/month
  • $0.0035 per API calls after exceeding the monthly limit.
  • Personalized API key
  • API Documentation
  • Personalized support
  • Cancel anytime

How to Generate Images using Stable Diffusion XL (SDXL) API?

Generating images using the Stable Diffusion XL (SDXL) API is a straightforward process that leverages the power of advanced text-to-image generation technology. Follow these steps to get started:

generate_01

Obtain API Key

Begin by signing up or logging into the platform that provides access to the Stable Diffusion XL (SDXL) API. Once signed in, you will be provided with an API key. This key is essential for authenticating your API requests and ensuring secure access to the service.

generate_02

Set Up the Environment and Add Text Prompts

Choose your preferred programming language, such as Python, JavaScript, or PHP, and install any required libraries for API interaction (e.g., requests for Python). Ensure your environment can handle HTTP requests. Then, create a detailed text prompt that describes the image you want to generate and other parameters.

generate_03

Send the API Request

After setting up your environment, send an HTTP POST request to the SDXL API with your API key and the prompt. Be sure to include any additional parameters, such as resolution or output format, if needed.

generate_04

Process and Save the Response

Once the request is successful, the API will return the generated image in the response. You can save the image to your local machine or directly integrate it into your application or project.

Use Cases of SDXL API

Stable Diffusion XL (SDXL) API offers powerful and flexible solutions for developers, artists, and businesses looking to add image generation capabilities to their projects. Here are some of the key applications:

cases_1

Product Visualization for E-Commerce

Using the SDXL API, e-commerce platforms can produce high-quality images of products, including different variations and styles, without requiring extensive photoshoots. This capability allows for dynamic product listings, enhancing the user experience and driving sales.

cases_2

Art and Design Prototyping

Artists and designers can use the SDXL API for rapid prototyping and exploration of creative ideas. Whether generating abstract art, testing design concepts, or creating mood boards, the API provides a powerful tool for visual experimentation, allowing creatives to iterate and refine their ideas quickly.

cases_3

Custom Comic Book Creation

Comic book creators can utilize this ai image generator API to generate unique comic panels and illustrations directly from written scripts. By translating textual narratives into vivid, the API streamlines the creative process, allowing writers and artists to quickly visualize their stories. This application supports the creation of custom comic books, graphic novels, and webcomics.

cases_4

Education and Training Materials

Educational institutions and training providers can use the SDXL API to generate custom illustrations, infographics, and visual aids for educational content. This helps in making complex topics more understandable for students. By creating visuals that are specifically tailored to the curriculum or training modules, educators can improve the learning experience.

cases_5

Content Creation for Marketing

Marketers can leverage the SDXL API to create visually compelling images for various marketing channels, such as social media, email campaigns, and online ads. By generating custom visuals that align with brand messaging, businesses can increase engagement, attract more attention to their campaigns, and improve conversion rates.

cases_6

Game Development and Concept Art

Game developers can use the SDXL API to create detailed concept art for characters, environments, and scenes. By generating high-quality visuals from text descriptions, the API aids in visualizing ideas and designing elements quickly. This can significantly speed up the creative process, allowing for more rapid iteration and refinement of game assets.

Top Trending Generative AI APIs

 

Maximize the potential of your projects with our Generative AI APIs. From video generation & image creation to text generation, animation, 3D modeling, prompt generation, image restoration, and code generation, our advanced APIs cover all aspects of generative AI to meet your needs.